开发者

How to get the size of a View?

开发者 https://www.devze.com 2023-03-07 06:48 出处:网络
So I\'m trying to make my android app build a bitmap to the size of an imageview. The imageview\'s size changes based on the size of the screen, so how could I pass the size to a met开发者_StackOverfl

So I'm trying to make my android app build a bitmap to the size of an imageview. The imageview's size changes based on the size of the screen, so how could I pass the size to a met开发者_StackOverflow中文版hod that makes a bitmap that is always the size of the imageview?

Thanks


Pass your imageview object to your method which creates bitmap. Use that object to get height and width.

0

精彩评论

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