Android活动将不会填充WVGA屏幕
问题描述:
我正在用一个简单的LinearLayout开发一个带有按钮的活动。当我尝试在我的硬件(WVGA 480x800屏幕)上进行活动时,活动仅填充标准尺寸(480x320),而操作系统本身则填满整个屏幕。Android活动将不会填充WVGA屏幕
可能是什么问题。
感谢,
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="#FFF" android:fitsSystemWindows="true">
<Button android:text="@+id/Button01" android:id="@+id/Button01" android:layout_width="wrap_content"
android:layout_height="wrap_content"></Button>
</LinearLayout>
答
我相信你有,你要允许应用程序扩展到更大的屏幕大小的清单文件来指定。
参见:http://developer.android.com/guide/practices/screens_support.html#attrs了解更多信息。
在清单中有一个关于<supports-screens>
属性的部分可能有您正在寻找的内容。
你说得对!在清单文件中指定屏幕大小解决了我的问题,谢谢! 垫子 – Matx 2010-03-24 18:59:28