Android的活动将不填WVGA屏幕 [英] Android activity won't fill WVGA screen
问题描述
我正在开发一个简单的LinearLayout一个按钮一个活动。当我尝试对我的硬件的活动,而操作系统本身填充整个屏幕(480×800 WVGA屏)活动只填充标准尺寸(分辨率480x320)。
这可能是什么问题。
谢谢,
<?XML版本=1.0编码=UTF-8&GT?;
< LinearLayout中的xmlns:机器人=http://schemas.android.com/apk/res/android
机器人:方向=垂直
机器人:layout_width =FILL_PARENT
机器人:layout_height =FILL_PARENT机器人:背景=#FFF机器人:fitsSystemWindows =真正的>
<按钮的android:文本=@ + ID / Button01机器人:ID =@ + ID / Button01的android:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT>< /按钮>
< / LinearLayout中>
我相信你有,你要允许应用程序扩展到更大的屏幕大小清单文件来指定。
请参阅: http://developer.android.com/guide/practices/ screens_support.html#ATTRS 获取更多信息。
有一个关于部分<支持分屏方式>
属性在清单中可能有你在找什么。
I'm developing an Activity with a simple LinearLayout with a button. When I try the activity on my hardware (WVGA 480x800 screen) the activity only fills the standard size (480x320) while the OS itself fills the whole screen.
What could be the issue.
Thanks,
<?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>
I believe you have to specify in the manifest file that you want to allow the application to scale to the size of a larger screen.
See: http://developer.android.com/guide/practices/screens_support.html#attrs for more info.
There is a part about <supports-screens>
attribute in the manifest that might have what you are looking for.
这篇关于Android的活动将不填WVGA屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!