Baradwaj Aryasomayajula
Baradwaj Aryasomayajula

Reputation: 1204

Android XML layout Design for various screens

Recently I have to develop a simple app for my company with UI which has to look alike in different set of screens. I was provided only one set of drawable-resources.

I have gone through the android developer.

In the link, they showed an example which divided the drawable folder into based on density and layoput folder based in sizes.

Since I had only one set of images, Can I divide the screen based on density like

  1. layout-ldpi
  2. layout-mdpi
  3. layout-hdpi
  4. layout-xhdpi

Can I do it in this manner? And how far is it reliable?

Upvotes: 0

Views: 905

Answers (1)

M S Gadag
M S Gadag

Reputation: 2057

u should create drawable folders for all layout designs. it automatically takes the respective drawable folder for respectve density.

res/drawable-ldpi
res/drawable-mdpi
res/drawable-hdpi
res/drawable-xhdpi

so on..

mdpi is the base, means u first add images in ur mdpi folder and then convert images for others drawables

check this too: same for drawable and values

res/layout-sw320dp-ldpi
res/layout-sw320dp-mdpi
res/layout-sw320dp-hdpi
res/layout-sw320dp-xhdpi and so on..

res/layout-sw480dp-ldpi
res/layout-sw480dp-mdpi
res/layout-sw480dp-hdpi
res/layout-sw480dp-xhdpi and so on..

res/layout-sw600dp-ldpi
res/layout-sw600dp-mdpi
res/layout-sw600dp-hdpi
res/layout-sw600dp-xhdpi and so on..

res/layout-sw720dp-ldpi
res/layout-sw720dp-mdpi
res/layout-sw720dp-hdpi
res/layout-sw720dp-xhdpi and so on..

more info:

Different resolution support android

Application Skeleton to support multiple screen

Is there a list of screen resolutions for all Android based phones and tablets?

Upvotes: 2

Related Questions