How Android manages screen?

我的未来我决定 提交于 2019-12-12 07:03:41

问题


I'm just curious look at here

Galaxy Note falls under normal size and XHDPI Sony Xperia S falls under normal size and XHDPI

But how come in real device the layout look different on each device? How I provide layout for each Android device out there?


回答1:


I don't think you can ever make a layout that will suit every Android device. I find the best results are by:
(1) Using RelativeLayouts
(2) Avoiding use of any hardcoded dimensions, instead using wrap_content and fill_parent where possible

I build three main layouts: normal, small and large, and I use as many as five sets of graphics for different screen densities and sizes.

It's a challenge!



来源:https://stackoverflow.com/questions/10992764/how-android-manages-screen

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!