不支持多个屏幕尺寸的Android [英] Can't support multiple screen sizes Android
问题描述
我需要一些帮助与设计Android中的多个屏幕尺寸。
我创建的布局,布局sw600dp,价值观和价值观sw600dp与维度布局sw600dp dimens.xml文件。
但是,当我与7平板电脑模拟器上运行的应用程序,设计设置不正确。
我该如何解决这个问题?
画面的基本大小,可用的屏幕区域的最短尺寸如图所示。具体而言,该器件的最小宽度是最短的屏幕的可用高度和宽度(你也可以认为它是最小宽度可能为屏幕)的。你可以使用这个限定词,以确保,无论画面当前的方向,你的应用具有可供其UI宽度至少DPS。 设备的smallestWidth不改变屏幕的方向变化时。
块引用>尝试使用
布局w600dp
而不是SW
。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?
解决方案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 ofsw
.这篇关于不支持多个屏幕尺寸的Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!