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?

1 Answer 1

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"
2
  • Thanks Anthea will try it Nov 9, 2013 at 4:08
  • Anthea I tried but it doesn't work. The traditional method of res\layout\small etc and then supports screen in the manifest works. My question is can I create a single layout which can support all screen formats Nov 9, 2013 at 6:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.