设置最小屏幕宽度

Set minimum screen width

查看@CommonsWare 的回答here,他提到可以将以下内容添加到清单中以设置支持的最小屏幕宽度:

<manifest ... >
    <supports-screens android:smallScreens="false"
                      android:normalScreens="false"
                      android:largeScreens="true"
                      android:xlargeScreens="true"
                      android:requiresSmallestWidthDp="600" />
    ...
    <application ... >
    ...
    </application>
</manifest>

查看documentation,属性定义如下:

android:smallScreens
Indicates whether the application supports smaller screen form-factors. A small screen is defined as one with a smaller aspect ratio than the "normal" (traditional HVGA) screen. An application that does not support small screens will not be available for small screen devices from external services (such as Google Play), because there is little the platform can do to make such an application work on a smaller screen. This is "true" by default.

android:normalScreens
Indicates whether an application supports the "normal" screen form-factors. Traditionally this is an HVGA medium density screen, but WQVGA low density and WVGA high density are also considered to be normal. This attribute is "true" by default.

android:largeScreens
Indicates whether the application supports larger screen form-factors. A large screen is defined as a screen that is significantly larger than a "normal" handset screen, and thus might require some special care on the application's part to make good use of it, though it may rely on resizing by the system to fill the screen. The default value for this actually varies between some versions, so it's better if you explicitly declare this attribute at all times. Beware that setting it "false" will generally enable screen compatibility mode.

android:xlargeScreens
Indicates whether the application supports extra large screen form-factors. An xlarge screen is defined as a screen that is significantly larger than a "large" screen, such as a tablet (or something larger) and may require special care on the application's part to make good use of it, though it may rely on resizing by the system to fill the screen. The default value for this actually varies between some versions, so it's better if you explicitly declare this attribute at all times. Beware that setting it "false" will generally enable screen compatibility mode.
This attribute was introduced in API level 9.


我的问题:

我不想让事情复杂化,我只想将应用程序下载限制在屏幕尺寸宽度超过 410dp 的设备上。

我应该为上面显示的每个屏幕尺寸添加 android:largeScreens="true",还是我可以只添加以下内容以支持宽度大于 410dp 的所有屏幕尺寸:

<supports-screens
    android:requiresSmallestWidthDp="410"
/>

all I want to do is restrict the app download to devices that has a screen size width of more than 410dp.

这是不可能的,抱歉。另请注意,在自由多 window 环境(Chrome OS、Samsung DeX 等)中,用户可以调整 window.

的大小

can I just add the following to support all screen sizes that has a bigger width than 410dp

没有。 Play 商店不使用它进行过滤。