开发者

Create a drawable from a created imageview

开发者 https://www.devze.com 2023-03-28 11:10 出处:网络
I\'m trying to create a drawable from an ImageView I know that we can do that with getre开发者_开发知识库ssources :

I'm trying to create a drawable from an ImageView I know that we can do that with getre开发者_开发知识库ssources :

Drawable drawable = getResources().getDrawable(imageview.getId());

But my imageview is created programmatically, I can not get the ID even with the getID() method.


if you can access to the ImageView you cam simply call getDrawable() to get its drawable

0

精彩评论

暂无评论...
验证码 换一张
取 消