首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >手机从Android play商店挑选平板电脑

手机从Android play商店挑选平板电脑
EN

Stack Overflow用户
提问于 2013-07-05 21:51:26
回答 1查看 220关注 0票数 0

我使用了两个.apk文件,一个用于平板电脑,另一个用于手机。我正在使用谷歌的多个APK处理文档来处理它们。

在我的手机清单中:

代码语言:javascript
复制
  <supports-screens android:anyDensity="true"  />
<supports-screens android:largeScreens="false" />
<supports-screens android:xlargeScreens="false" />
<supports-screens android:smallScreens="true" />
<supports-screens android:normalScreens="true" />

在我的平板电脑清单中:

代码语言:javascript
复制
<supports-screens android:largeScreens="true" />
<supports-screens android:xlargeScreens="true" />
<supports-screens android:smallScreens="false" />
<supports-screens android:normalScreens="false" />

但现在,像Note2、格兰德、Nexus-4这样的手机都选择了平板电脑的版本。

请帮助我为平板电脑和手机编写正确的过滤器。

谢谢。

EN

回答 1

Stack Overflow用户

发布于 2013-07-05 22:10:26

在尝试这个之前。请完全它。

让你的布局像这样:

代码语言:javascript
复制
res/layout/main_activity.xml           # For handsets (smaller than 600dp available width)
res/layout-sw600dp/main_activity.xml   # For 7” tablets (600dp wide and bigger)
res/layout-sw720dp/main_activity.xml   # For 10” tablets (720dp wide and bigger)

对于选项卡

例如,如果您的应用程序仅适用于最小可用宽度为600dp的平板电脑样式的设备:

代码语言:javascript
复制
<manifest ... >
<supports-screens android:requiresSmallestWidthDp="600" />
...
</manifest>

。希望这能对你有所帮助。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17490503

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档