简体   繁体   English

适用于7英寸以上设备的Android屏幕类型定位

[英]Android Screen Type Targetting for 7"+ Devices

I am about to publish an app to the Google Android Marketplace and would like to ensure it only appears for devices with a screen size of 7"+ (600px x 1024px as a minimum); in specific for the Kindle Fire / Galaxy Tab 7"/10.1". I understand from the Android Developer Site that the way to do this is by way of using the <supports-screens> tag . 我即将将一个应用发布到Google Android Marketplace,并希望确保该应用仅在屏幕尺寸为7英寸以上(最小600像素x 1024像素)的设备上显示;尤其是针对Kindle Fire / Galaxy Tab 7的设备/10.1“。我从Android开发者网站了解到,执行此操作的方法是使用<supports-screens> 标签

Would the following accomplish what I am looking to do: 以下内容是否可以完成我想要做的事情:

<supports-screens
    android:smallScreens="false"
    android:normalScreens="false"
    android:largeScreens="true"
    android:xlargeScreens="true"
    android:resizeable="true"
    android:anyDensity="true"
/>

Is this best practice or am I missing something? 这是最佳实践还是我缺少什么?

If you really want to do this, I would leave only xlarge screens. 如果您真的想这样做,我将只留下xlarge屏幕。 As you can see at the Supporting Multiple Screens page, large screens are roughly from 4" to 7", which is not what you've described. 正如您在“ 支持多屏幕”页面上看到的那样,大屏幕大约是4英寸到7英寸,这不是您所描述的。

By the way, resolution and screen size are not the same . 顺便说一下,分辨率和屏幕尺寸是不一样的 Screen size refers to the physical size of the screen, and a large screen can still have quite different resolutions depending on the pixel density. 屏幕尺寸是指屏幕的物理尺寸,根据像素密度,大屏幕仍然可以具有完全不同的分辨率。 For example, 1024x600 you mentioned can be qualified as xlarge, large, or even normal depending on the pixel density. 例如,根据像素密度,您提到的1024x600可以被定义为xlarge,large甚至是normal。

Some other remarks: I wouldn't use anyDensity because it is true by default and also wouldn't use resizable because it is deprecated. 其他一些说明:我不会使用anyDensity因为默认情况下它为true ,也不会使用resizable因为它已弃用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM