0

I have been using the layout-small, layout-large and such folders for multiscreen support but I was told to do with res-values-dimensions, but I am not sure how do it.

How can you have Multiscreen support with res-values-dimensions?

Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697
Saraschandraa
  • 478
  • 1
  • 10
  • 28

1 Answers1

0

you might try the following, if it just concerns dimensions and sizes. I didn't try it, but the main idea should work

  1. make for every wished resolution a dimension file

    values.xml, values-hdpi.xml, values-xhdpi.xml,

  2. inside each you can declare your values, eg:

< resources >
< bool name="myboolvalue" > true < /bool >
< dimen  name="mydimenvalue" > dimension < /dimen >
< /resources >
  1. do this for every resolution. Then you can access these inside your layout, somehow like this:
android:visibility="@bool/myboolvalue"
android:textSize ="@dimen/mydimenvalue"
Anthea
  • 3,741
  • 5
  • 40
  • 64