Can't support multiple screen sizes Android

穿精又带淫゛_ 提交于 2020-01-23 21:02:54

问题


I need some help with design for multiple screen sizes in Android.

I created layout, layout-sw600dp, values, and values-sw600dp with dimens.xml file with dimension for layout-sw600dp.

But when I run application in emulator with 7" tablet, the design is not set up properly.

How I can fix this?


回答1:


The fundamental size of a screen, as indicated by the shortest dimension of the available screen area. Specifically, the device's smallestWidth is the shortest of the screen's available height and width (you may also think of it as the "smallest possible width" for the screen). You can use this qualifier to ensure that, regardless of the screen's current orientation, your application has at least dps of width available for its UI. the device's smallestWidth does not change when the screen's orientation changes.

Try to use layout-w600dp instead of sw.



来源:https://stackoverflow.com/questions/16893958/cant-support-multiple-screen-sizes-android

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