开发者

Android ==> Which layout should i use?

开发者 https://www.devze.com 2023-01-04 21:31 出处:网络
I want o be able to add items to my layout, and set the exact position of these items. x,y,wid开发者_高级运维th,height.

I want o be able to add items to my layout, and set the exact position of these items. x,y,wid开发者_高级运维th,height. I am currently using AbsoluteLaout which is deprecated, is there any other layout that allows me to locate objects on the screen, by specifying their x,y? I also need to be able to read the x,y of all these objects on the screen. I already use getLeft(), and getTop().


You can use RelativeLayout and set margins to position. This is going to kill various screen size compatibility.

0

精彩评论

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