Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以我使用了一个函数从imagepath创建drawable,我得到:android.graphics.drawable.bitmapdrawable@numbers
我该如何使用它?可以用作身份证吗?例如,对于普通的drawable,我会这样写:findViewById(R.drawable.name); 我可以在这里使用相同的吗?
findViewById(android.graphics.drawable.bitmapdrawable@numbers);
谢谢你。
你不能使用 findViewById(R.drawable.name),你必须使用 R.id.someId