开发者

How to dynamically set position of widget in RelaltiveLayout?

开发者 https://www.devze.com 2023-03-21 01:14 出处:网络
I am using RelativeLayout with Imageview and few buttons. I am dynamically changing the size of the ImageView according to the size of the screen (usingDisplay class). The problem is that one of the

I am using RelativeLayout with Imageview and few buttons.

I am dynamically changing the size of the ImageView according to the size of the screen (usingDisplay class). The problem is that one of the button's location refers开发者_开发知识库 to the Imageview.

How do I dynamically change its location according to the new size of the Imageview?


try calling requestLayout() when you updated the imageView.

0

精彩评论

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

关注公众号