Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emulator Nexus 7 use layout folder and not layout-sw600dp

I'm trying to handle layout for different screen but I found it hard because emulators always use default layout. I cannot understand why. I create a Nexus 7 emulator and I expected to use layout-sw600dp. The same with Nexus 10 emulator. How came?! Thanks in advance R.

like image 214
Ruben Rocco De Luca Avatar asked Aug 13 '15 14:08

Ruben Rocco De Luca


4 Answers

There are 2 versions of the nexus 7 that you can choose from. There's the newer model and the 2012 version. Choose the 2012 version and it should work as expected.

enter image description here

like image 179
DroidT Avatar answered Oct 09 '22 00:10

DroidT


Check your layout directories once again, you might have picked wrong type of resource file. Also I'd suggest to use layout-sw600dp for 7inch tablets and layout-sw720dp for larger ones.

like image 22
Ivan V Avatar answered Oct 09 '22 00:10

Ivan V


When you create emulator go in Advanced settings and custom skin definition enter "no skin"

emulator skin

like image 26
Andrea M Avatar answered Oct 09 '22 00:10

Andrea M


There is a bug with Nexus 7 (2013) emulator. It thinks that its resolution is 1280x800, and since it is xhdpi device, final width is 400dp, so it misses sw600dp qualifier. You can track bug here: https://code.google.com/p/android/issues/detail?id=209440

I will update this answer when the bug is closed.

like image 37
Alexander Mironov Avatar answered Oct 09 '22 00:10

Alexander Mironov