Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prepare layout,drawable folders for 7",10" android tablets for both landscape and portrait?

I have prepared my drawables for 7" tablets as (Nexus 7)

 drawable-large-hdpi-port
 layout-large-hdpi-port

I am getting errors while doing this. I didnt understand where I am doing wrong.

I want to prepare layouts for both landscape and portrait for both 7", 10" tablets

like image 771
user2376732 Avatar asked Jul 15 '13 05:07

user2376732


People also ask

Why there are different drawable folders in android?

1) The reason behind the different drawable folders - to enhance user experience when using our app, by accomodating each device's screen density.

How do I make a drawable Xxhdpi folder?

Simply go to project Explorer and change your View from Android to project from drop Down and you are good to go. There you can simply create folder like we do in Eclipse. And in android project view it is hidden but when you switch to project. You can create folder like drawable-hdpi,drawable-xhdpi .


1 Answers

The recommended way is to use layout-swxxdp qualifier. If you need to differentiate landscape/portrait

res/layout-sw600dp/   # For 7” tablets (600dp wide and bigger)
res/layout-sw720dp/   # For 10” tablets (720dp wide and bigger)
res/layout-sw600dp-port/   # For 7” tablets in portrait (600dp wide or bigger)
res/layout-sw720dp-port/  # For 10” tablets in portrait (720dp wide or bigger)
like image 131
Neoh Avatar answered Sep 28 '22 02:09

Neoh