简体   繁体   中英

Android ==> Which layout should i use?

I want o be able to add items to my layout, and set the exact position of these items. x,y,width,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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM