简体   繁体   中英

Android multi Screen Support

I know that for supporting different screen size we use layout,layout-large,layout-xlarge folder , but i have confusion regarding drawable folder,by default they are ,

1. drawable-ldpi For low density screens
2. drawable-mdpi For medium density screens
3. drawable-hdpi For high resolution screens
4. drawable-xhdpi For extra high resolution screens

   But A simple approch is 


   1.Drawable
   2.Drawable-large 
   3.Drawable-xlarge 

is it ok to go with this approch?

Google在API 13(Android 3)之后更改了布局系统,因此两者都可以使用,但是建议使用与屏幕密度有关的dpi系统,但是旧系统已被调整为屏幕尺寸,这可能会导致低dpi屏幕密度的大型屏幕设备出现问题

It is better to use screen density folders because ( quoting the Android doc )

Maintaining density independence is important because, without it, a UI element (such as a button) appears physically larger on a low density screen and smaller on a high density screen. Such density-related size changes can cause problems in your application layout and usability.

So using density-pixels Android scales your widgets (Buttons, ImageViews, etc) by itself relating your Activity and the Drawables you need to the appropiate res folder. In fact, you should be using this density system in your Layouts too (layout-mdpi, layout-hdpi, etc).

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