开发者

Absolute layout uasage

开发者 https://www.devze.com 2023-03-10 03:18 出处:网络
Is that ok to use absolute layout in my application if i know exactly the x,y that i\'ll draw the widget at or it\'ll affect the application appearance on the device ?

Is that ok to use absolute layout in my application if i know exactly the x,y that i'll draw the widget at or it'll affect the application appearance on the device ?

I'm asking this question as I've read开发者_Go百科 that it's deprecated


Even if you know exactly where you want to put each widget, you won't know the exact resolution of the devices which will run your application. Some will have empty space left on the screen, while others might not have room to display all your widgets.

Short version: better not use it, there are always better options.


In case of absolute layout, your application will adjust itself in every phn ,of any resolution or screen size. But in case of fixed coordinates may be screen size becomes a limitation.


It is a very bad practice to use absolute layout coordinates.

Don't use it.

0

精彩评论

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

关注公众号