Android清单限制到片 [英] Android Manifest Restrict To Tablets

查看:153
本文介绍了Android清单限制到片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关业务的原因,我想严格限制我的Andr​​oid应用程序的平板电脑。

For business reasons I'd like to restrict my Android application strictly to tablet devices.

目前,我可以通过设置限制的应用程序,以蜂窝设备:

At the moment, I can limit the app to Honeycomb devices by setting:

android:minSdkVersion="11"

但是Android(冰淇淋三明治)的下一个版本将同时为平板电脑和手机的操作系统版本更高的版本号。

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.

有没有明显的属性,我可以指定其限制在平板设备? (蜂窝或以后的任何平板版本)

Is there any manifest attribute I can specify to restrict it to tablet devices? (Honeycomb or any later tablet version)

推荐答案

您会发现这个链接真棒:<一href="http://android-developers.blogspot.com/2011/09/$p$pparing-for-handsets.html">http://android-developers.blogspot.com/2011/09/$p$pparing-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.

我personnaly不认为这是一个平板电脑。

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的错误 - 使用largeScreens,指责HTC 7 inches-)

(There is also a bug in HTC flyer - 7 inches- that uses largeScreens, blame HTC)

我想这与清单屏幕尺寸演奏会满足您的需要:

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清单限制到片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆