android - 如何让我的手机应用填满平板电脑 (Xoom) 的整个屏幕?

标签 android android-layout tablet xoom

我尝试将我的应用程序运行到 Xoom 平板电脑中,结果它的大小与手机完全相同(它没有填满整个屏幕)。

因此,我创建了一个非常简单的项目,它只显示降级图像和中间的进度条。我得到了相同的结果,如下图所示:

Xoom - Tiny screen http://raphaeu.com/gvt/Imagem.jpg

那么,我将如何继续编写布局以填满平板电脑的整个屏幕?

这是我的 list :

<?xml version="1.0" encoding="utf-8"?>

<application android:icon="@drawable/icon" android:label="@string/app_name">
    <activity android:name=".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>

</application>

这是我的 main.xml 布局:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:background="@drawable/splash_portrait">

<ProgressBar 
    style="?android:progressBarStyle"
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true" 
    android:layout_centerInParent="true"
/>

</RelativeLayout>

下面是整个项目,如果你想看一看: http://raphaeu.com/gvt/xoom.zip

非常感谢您!!

最佳答案

将此添加到您的 list 中..

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

这里是详细... http://developer.android.com/guide/practices/screens-distribution.html

关于android - 如何让我的手机应用填满平板电脑 (Xoom) 的整个屏幕?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6386200/

相关文章:

java - 无法在 android studio 中解析某些类的 jdk 8

android - 如何创建我自己的 Vector Drawable? (安卓)

Android布局复选框-文本-右对齐按钮组合

java - android eclipse错误二进制xml文件错误膨胀类android.widget.relativelayout

android - 选择框边框半径不适用于 Galaxy Tab 3

visual-studio-2010 - XNA Mono 触摸游戏 - 触摸不起作用

java - Realm 数据库不写数据

java - Oppo、Vivo、MIUI等定制OS手机如何处理FCM通知?

javascript - 如何衡量 Web 上的压力?

android - 如何防止我的 Kotlin 应用程序屏幕旋转?