2

I have been trying to Set screen resolution for an Array of devices,I have looked all the answers up and from what I understood if I create an res/layout-normal,res/layout-large and so on I can put adjusted Layouts there and the app will Load them automatically.

How ever this has not occurred... can someone PLEASE just explain what to do after i have created the layouts and layout folders and allowed the use of all sizes in my XML (although i think the default is all of them).

THANK YOU!

Jony-Y
  • 1,579
  • 1
  • 13
  • 30
  • Have you looked at [Supporting Multiple Screens](http://developer.android.com/guide/practices/screens_support.html)? – Rajesh Sep 28 '13 at 10:11
  • I have, I just need an implementation to sort thing out in my head i Guess... I just dont see how to connect them... I also saw the code to check out your resolution but how could i differentiate between different layouts with the same name... – Jony-Y Sep 28 '13 at 10:16
  • Add different background color to same name layout, so that you can easily know which one is loading. – Swetank Sep 28 '13 at 10:19
  • possible duplicate of [Do I need 14 different layouts to support all Android devices?](http://stackoverflow.com/questions/5558534/do-i-need-14-different-layouts-to-support-all-android-devices) – Sanket Kachhela Sep 28 '13 at 10:21
  • not a duplicate:) but this is a good explanation... – Jony-Y Sep 28 '13 at 10:39

1 Answers1

2

Its just a example:

Device resolution-

res/values/dimens.xml(default)

res/values-ldpi/dimens.xml (240*320 and nearer resolution)

res/values-mdpi/dimens.xml (320*480 and nearer resolution)

res/values-hdpi/dimens.xml (480*800 and nearer resolution)

res/values-xhdpi/dimens.xml (720*1280 Samsung s3,Micromax HD canvas etc)

res/values-xxhdpi/dimens.xml (1080*1920 samsung s4,HTC one etc)

Tablet resolution-

res/values-sw600dp/dimens.xml (600*1024)

res/values-sw720dp-land/dimens.xml (800*1280)

<TextView
    android:id="@+id/textView1"
    style="@android:style/TextAppearance.Small"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Sample Text - Small" />
<TextView
    android:id="@+id/textView2"
    style="@android:style/TextAppearance.Medium"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Sample Text  - Medium" />
<TextView
    android:id="@+id/textView3"
    style="@android:style/TextAppearance.Large"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Sample Text  - Large" />
Kanwaljit Singh
  • 4,339
  • 2
  • 18
  • 21
  • http://developer.android.com/training/multiscreen/screensizes.html, http://developer.android.com/training/multiscreen/screendensities.html, http://developer.android.com/guide/practices/tablets-and-handsets.html also check these links. – Kanwaljit Singh Sep 28 '13 at 10:23
  • So theres is really no need to implement any code? just create the dimensions and the app will automatically check which dim to apply? – Jony-Y Sep 28 '13 at 10:37
  • 1
    Check this: http://stackoverflow.com/questions/9877946/text-size-and-different-android-screen-sizes – Kanwaljit Singh Sep 28 '13 at 10:43
  • your question is also nice one. – Kanwaljit Singh Sep 28 '13 at 11:06