出于商业原因,我想将我的 Android 应用程序严格限制在平板设备上.
For business reasons I'd like to restrict my Android application strictly to tablet devices.
目前,我可以通过设置将应用限制为 Honeycomb 设备:
At the moment, I can limit the app to Honeycomb devices by setting:
android:minSdkVersion="11"
但下一个版本的 Android(Ice Cream Sandwich)将为平板电脑和手机版本的操作系统提供更高的版本号.
But the next version of Android (Ice Cream Sandwich) will have a higher version number for both the tablet and phone versions of the OS.
我可以指定任何清单属性来将其限制为平板设备吗?(Honeycomb 或任何更高版本的平板电脑)
Is there any manifest attribute I can specify to restrict it to tablet devices? (Honeycomb or any later tablet version)
你会发现这个链接很棒:http://android-developers.blogspot.com/2011/09/preparing-for-handsets.html
You will find this link awesome: http://android-developers.blogspot.com/2011/09/preparing-for-handsets.html
我们所说的平板电脑"的问题在于,对于 evryone 的定义并不相同.我想到了与手机大小相同但带有平板电脑"名称的爱可视 5IT.戴尔 Streak 也有同样的问题.
The problem with what we call "tablet" is that the definition is not the same for evryone. I think about the Archos 5IT that is the same size than a phone but branded with "tablet" name. Same issue with Dell Streak.
我个人不会称它为平板电脑..
I would personnaly not call that a tablet..
因此,如果您想限制为 7 或 5 英寸的设备,您应该使用 xlargeScreens 和 largeScreens.
So if you want to restrict to 7 or 5 inches devices, you should use xlargeScreens and largeScreens.
(HTC flyer - 7 英寸 - 使用大屏幕也有一个错误,怪 HTC)
(There is also a bug in HTC flyer - 7 inches- that uses largeScreens, blame HTC)
我猜想在 Manifest 中使用 Screen size 会满足您的需求:
I guess that playing with Screen size in Manifest will fit your needs:
<supports-screens android:smallScreens="false"
android:normalScreens="false"
android:largeScreens="false"
android:xlargeScreens="true"
android:anyDensity="true"
android:requiresSmallestWidthDp="600"
android:compatibleWidthLimitDp="integer"
android:largestWidthLimitDp="integer"/>
这篇关于Android 清单限制为平板电脑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!