为平板电脑设计 Android 应用程序 [英] Designing Android apps for tablets

查看:28
本文介绍了为平板电脑设计 Android 应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Play 开发者控制台中显示:

In the Play developer console it says:

您的 APK 似乎不是为平板电脑设计的

Your APK does not seem to be designed for tablets

但我已经为 layout-sw600dplayout-sw600dp-landlayout-sw720dplayout-sw720dp 添加了布局-land 文件夹.完整清单(原样):

But I have added layouts to layout-sw600dp, layout-sw600dp-land, layout-sw720dp and layout-sw720dp-land folders. The complete manifest (as it is):

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.technicosa.unjumble"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="9"
    android:targetSdkVersion="18" />

<supports-screens
    android:anyDensity="true"
    android:largeScreens="true"
    android:normalScreens="true"
    android:resizeable="true"
    android:smallScreens="true"
    android:xlargeScreens="true" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/Theme.Sherlock.Light.DarkActionBar" >
    <activity
        android:name="com.technicosa.unjumble.MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name="com.technicosa.unjumble.UserSettingsActivity"
        android:label="@string/title_activity_user_settings" >
    </activity>
</application>

该应用程序可以在模拟器中的 Nexus 7 和 Nexus 10 上完美运行.同样在优化提示下的开发者控制台中,它说:

The app runs perfectly on both Nexus 7 and Nexus 10 in the emulator. Also in the developer console under optimization tips it says:

您的正式版 APK 需要满足以下条件:使用 10 英寸平板电脑上的可用屏幕空间

Your Production APK needs to meet the following criteria: Uses available screen space on 10-inch tablets

我的应用截图:

虽然该应用似乎可以在平板电脑上运行(我只在模拟器上进行了测试),但必须做些什么才能满足 Play 标准?

While the app seems to run on tablets (I have tested only on emulator), what must be done to fulfill the Play criteria?

推荐答案

将文件夹 layout-sw600dp、layout-sw600dp-land、layout-sw720dp 和 layout-sw720dp-land 替换为 layout-xlarge,layout-xlarge-land 添加了一个新消息:您的 apk 似乎不是为平板电脑设计的."

Replacing folders layout-sw600dp, layout-sw600dp-land, layout-sw720dp and layout-sw720dp-land with layout-xlarge, layout-xlarge-land added a new message: "your apk does not seem to be designed for tablets."

按照这里.

利用平板电脑上的额外屏幕区域

  • 寻找机会添加其他内容或使用现有内容的替代处理方式.

  • Look for opportunities to include additional content or use an alternative treatment of existing content.

在平板电脑屏幕上使用多窗格布局将单个视图组合成一个复合视图.这让您可以更有效地使用额外的屏幕区域,并让用户更轻松地浏览您的应用.

Use multi-pane layouts on tablet screens to combine single views into a compound view. This lets you use the additional screen area more efficiently and makes it easier for users to navigate your app.

问题实际上是空白,与 xmls 无关.

The problem was really the white space and had nothing to do with the xmls.

我设法通过重新排列布局以覆盖屏幕而不留下太多空白空间来消除 7i 选项卡的消息.但不适用于 10i 平板电脑,因为该区域太大而且我的应用程序的内容非常少.我必须考虑其他内容.

I managed to make the message for 7i tabs go away by rearranging the layouts to cover the screen and not leave too much white space. But not for the 10i tablets as the area is too big and my app has very less content. I must consider additional content.

这篇关于为平板电脑设计 Android 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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