0

I have developed an app for phones. Now I need to support it to tablets as well. I need to change few dimensions of few views. I had kept 4 values folders for hdpi, xhdpi, xxhdpi and xxxhdpi. Now for a 7" tab I have kept values-sw600dp and for 10" inch tab I have kept values-sw720dp. But any changes I make in the dimens folders of the 600dp and 720dp does not change when I run in the tab. The 7" tab takes the values of values-hdpi folder. How do I support for both screens and tabs?

Please suggest.

Sahana Prabhakar
  • 581
  • 1
  • 8
  • 21

2 Answers2

0

If you actually have a tablet that has a smallest width of 600dp (values-sw600dp), then it should prioritize that over that over values-hdpi (see here). Are you sure your tablet is actually 600dp?

z153
  • 156
  • 5
0

My 7" inch tap get resourses from sw320dp folder, You need use

dp = px / (dpi / 160)

to find right size qualifier.

This link have morе information: Application Skeleton to support multiple screen

And answer from https://developer.android.com/guide/practices/screens_support.html?hl=ru#DeclaringTabletLayouts The proper way to declare tablet layouts was to put them in a directory with the xlarge configuration qualifier (for example, res/layout-xlarge/).

Community
  • 1
  • 1
Ridami
  • 391
  • 2
  • 6