Android Manifest Restrict To Tablets(Android 清单限制为平板电脑)
问题描述
出于商业原因,我想将我的 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 清单限制为平板电脑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Android 清单限制为平板电脑
基础教程推荐
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
