我正在使用两个.apk文件,一个用于平板电脑,另一个用于手机。我正在使用Google提供的多个APK处理文档来处理它们。
在我的手机清单中:
<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" />
在我的平板电脑清单中:
<supports-screens android:largeScreens="true" />
<supports-screens android:xlargeScreens="true" />
<supports-screens android:smallScreens="false" />
<supports-screens android:normalScreens="false" />
但现在像Note2,Grand,Nexus-4这样的手机正在挑选平板电脑。
请帮我写一些适用于平板电脑和手机的正确过滤器。
感谢。
答案 0 :(得分:0)
在尝试之前。请完全 READ 。
使你的布局像这样:
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)
TAB :
例如,如果您的应用程序仅适用于可用宽度最小为600dp的平板电脑型设备:
<manifest ... >
<supports-screens android:requiresSmallestWidthDp="600" />
...
</manifest>
For Tablet。希望这会对你有所帮助。