How to define dimens.xml for every different screen size in android? -
when supporting different screen sizes (densities) in android focus on creating different layouts every possible screen. i.e.
- ldpi
- mdpi
- hdpi
- xhdpi
- xxhdpi
- xxxhdpi
i designed layout xhdpi screen reference, , defined it's dimensions in dimens.xml. i want give support every possible screen size. how can that?
as far know, can use this tool figure out proper dimens.xml other screen sizes , add project. right way in situation?
another question, do need create dimens.xml above screen dimensions? if yes w820dp?
thanks help. need support phones only (not tablets or other devices).
you have create different values folder different screens .
values-sw720dp 10.1” tablet 1280x800 mdpi values-sw600dp 7.0” tablet 1024x600 mdpi values-sw480dp 5.4” 480x854 mdpi values-sw480dp 5.1” 480x800 mdpi values-xxhdpi 5.5" 1080x1920 xxhdpi values-xxhdpi 5.5" 1440x2560 xxhdpi values-xhdpi 4.7” 1280x720 xhdpi values-xhdpi 4.65” 720x1280 xhdpi values-hdpi 4.0” 480x800 hdpi values-hdpi 3.7” 480x854 hdpi values-mdpi 3.2” 320x480 mdpi values-ldpi 3.4” 240x432 ldpi values-ldpi 3.3” 240x400 ldpi values-ldpi 2.7” 240x320 ldpi for more information may visit here
different values folders in android
http://android-developers.blogspot.in/2011/07/new-tools-for-managing-screen-sizes.html
edited @humblerookie
you can make use of android studio plugin called dimenify auto generate dimension values other pixel buckets based on custom scale factors. still in beta, sure notify issues/suggestions come across developer.

Comments
Post a Comment