[英]How to use android.graphics.drawable.bitmapdrawable in android?
so I have used a function to create drawable from imagepath, and I get: android.graphics.drawable.bitmapdrawable@numbers 所以我使用了一个从imagepath创建可绘制对象的函数,并且得到了:android.graphics.drawable.bitmapdrawable@numbers
How do I use it? 如何使用? can it be used as ID?
可以用作ID吗? for example with normal drawable I would write like: findViewById(R.drawable.name);
例如,对于普通的drawable,我会这样写:findViewById(R.drawable.name); can I use same here?
我可以在这里使用吗?
findViewById(android.graphics.drawable.bitmapdrawable@numbers); findViewById(android.graphics.drawable.bitmapdrawable@numbers);
Thank you. 谢谢。
您不能使用findViewById(R.drawable.name),而必须使用R.id.someId
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.