How to manage layout folders for different resolutions and different dpi?

I have doubts that we are going to create different layouts to support all android mobile devices. Since we know we will be creating different layouts (mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi ..) in the res folder. What is my question: for example, I have two mobile models: moto e (253dpi) and samsung galaxy e7 (267dpi) where both are xhpdi. Now I will create xhdpi for them. But here the two screen resolutions are different (moto e (540x960) and e7 (720x1280) respectively). Now if I specify some hardcoded values ​​in the xhpdi xml. If my layout stays the same for both devices without any alignment issues?

+3


source to share


1 answer


Use the following folders if you want to have tablet layouts:

layout-large-mdpi   (1024x600)
layout-large-xhdpi  (1200x1920)
layout-xlarge-mdpi  (1280x800)
layout-xlarge-xhdpi (2560x1600)

      

For mobile phones:



res/drawable        (default)
res/drawable-ldpi  (240x320)
res/drawable-mdpi  (320x480)
res/drawable-hdpi  (480x800)
res/drawable-xhdpi  (720x1280)
res/drawable-xxhdpi (1080x1920)
res/drawable-xxxhdpi (1440X2560)

      

Dinems for mobile phones:

res/values/dimens.xml(default)
res/values-ldpi/dimens.xml   (240x320)
res/values-mdpi/dimens.xml   (320x480)
res/values-hdpi/dimens.xml   (480x800)
res/values-xhdpi/dimens.xml  (720x1280)
res/values-xxhdpi/dimens.xml (1080x1920)

      

0


source







All Articles