简体   繁体   中英

How to support different screens in android

After reading the documentation provided here , i felt its better to use DP for all the pixels we declare it in layout file, But doing like this work for all different screen sizes.?

For eg: lets take galaxy phones of samsung and xperia neo phone. Galaxy phone is broader in width but xperia is smaller in width. so in this case how android will adjust the layout?. How to handle these kind of senarios

Using dps is basically like designing in inches- 1 dp is 1/160th of an inch. Android won't adjust anything, it will do things just as you say- in physical units. If that means things go off the screen or you have empty space on the screen, Android won't care.

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