Emulator Nexus 7 use layout folder and not layout-sw600dp

落爺英雄遲暮 提交于 2019-12-23 10:05:47

问题


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.


回答1:


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.




回答2:


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.




回答3:


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

emulator skin




回答4:


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.



来源:https://stackoverflow.com/questions/31991776/emulator-nexus-7-use-layout-folder-and-not-layout-sw600dp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!