在<supports-screens>
标记中,将android:largeScreens
和android:xlargeScreens
的值设置为false将不会使您的应用不适用于这些屏幕尺寸。它只会在这些屏幕尺寸上为您的应用启用屏幕兼容模式。
从Android开发doc:
机器人:largeScreens
指示应用程序是否支持更大的屏幕形式因子。大屏幕被定义为比“普通”手机屏幕大得多的屏幕,并且因此可能需要对应用程序的一部分进行特别的关注以充分利用它,尽管它可能依赖于系统调整大小以填充屏幕。 实际上,它的默认值在一些版本中有所不同,所以最好是在任何时候都显式声明该属性。请注意,将其设置为“false”通常会启用屏幕兼容模式。
安卓xlargeScreens
表示应用程序是否支持超大屏幕的外形尺寸。 xlarge屏幕被定义为比“大”屏幕(如平板电脑(或更大的屏幕))大得多的屏幕,并且可能需要特别注意应用程序的部分以充分利用它,尽管它可能依赖于调整大小由系统填充屏幕。 实际上,它的默认值在一些版本中有所不同,所以最好是在任何时候都显式声明该属性。请注意,将其设置为“false”通常会启用屏幕兼容模式。
如果你想只对手机的使用你的应用程序,以下内容添加到您的清单:
<compatible-screens>
<!-- all small size screens -->
<screen android:screenSize="small" android:screenDensity="ldpi" />
<screen android:screenSize="small" android:screenDensity="mdpi" />
<screen android:screenSize="small" android:screenDensity="hdpi" />
<screen android:screenSize="small" android:screenDensity="xhdpi" />
<screen android:screenSize="small" android:screenDensity="480" />
<!-- all normal size screens -->
<screen android:screenSize="normal" android:screenDensity="ldpi" />
<screen android:screenSize="normal" android:screenDensity="mdpi" />
<screen android:screenSize="normal" android:screenDensity="hdpi" />
<screen android:screenSize="normal" android:screenDensity="xhdpi" />
<screen android:screenSize="small" android:screenDensity="480" />
</compatible-screens>
与android:screenDensity="480"
的条目是支持xxhdpi桶。
查看Android Developer文档中的this article,其中介绍了如何让您的应用仅适用于手机。