Android 如何设置最小屏幕尺寸?
我已经创建了一个新的应用程序,它不适用于手机。我的应用程序基于7英寸平板电脑设备。 当我尝试将我的应用程序放在play store it show中时,我的应用程序支持2000台android设备,但并非所有的都是平板电脑。事实上,我不想谷歌所有的it设备并设置过滤器,你知道为什么 如何在我的应用程序中编程声明minimnum屏幕大小,就像我可以设置minimun sdk级别一样 更新: 我被设置在AndroidManifest.xmlAndroid 如何设置最小屏幕尺寸?,android,Android,我已经创建了一个新的应用程序,它不适用于手机。我的应用程序基于7英寸平板电脑设备。 当我尝试将我的应用程序放在play store it show中时,我的应用程序支持2000台android设备,但并非所有的都是平板电脑。事实上,我不想谷歌所有的it设备并设置过滤器,你知道为什么 如何在我的应用程序中编程声明minimnum屏幕大小,就像我可以设置minimun sdk级别一样 更新: 我被设置在AndroidManifest.xml和中,如下所示: <supports-screens
和
中,如下所示:
<supports-screens android:requiresSmallestWidthDp="600"
android:smallScreens="false"
android:normalScreens="false"
android:largeScreens="false"
android:xlargeScreens="true"
/>
<compatible-screens>
<screen android:screenSize="xlarge" android:screenDensity="xhdpi"/>
<screen android:screenSize="xlarge" android:screenDensity="ldpi"/>
<screen android:screenSize="xlarge" android:screenDensity="hdpi"/>
<screen android:screenSize="xlarge" android:screenDensity="mdpi"/>
</compatible-screens>
现在,我的应用程序只适用于7英寸以上的平板电脑。您可以在清单中这样定义,以了解更多详细信息
...
对于市场过滤器,您需要使用
您需要按照DJHacktorReborn的建议使用
,而不仅仅是android:requiresMallestWidthDP
,因为Play Store不使用它进行过滤
相反,请使用:
<manifest ... >
<supports-screens android:smallScreens="false"
android:normalScreens="false"
android:largeScreens="true"
android:xlargeScreens="true"
android:requiresSmallestWidthDp="600" />
...
<application ... >
...
</application>
</manifest>
...
更多信息。您忘了提及
有一个非常具体的用例。即使是它的文档也会在大多数情况下警告您不要使用它。对于简单的大小筛选来说,这不是必需的。谢谢,这项工作,我被设置为“largeScreens”为“false”“这也是因为,我为7英寸以上的平板电脑创建了应用程序。请注意,设置android:largeScreens=“true”
意味着任何与640dp x 480dp具有相同或更大倾角的设备都无法安装您的应用程序。一个7英寸的标签的最小宽度为600dp。考虑到这一点,640x480dp大约是5英寸大小
<manifest ... >
<supports-screens android:smallScreens="false"
android:normalScreens="false"
android:largeScreens="true"
android:xlargeScreens="true"
android:requiresSmallestWidthDp="600" />
...
<application ... >
...
</application>
</manifest>