2011-07-28 94 views
0

enter image description here平板电脑的应用程序不填满屏幕完全

什么是你好的应用程序,只需用一些其他的文本不能填满整个屏幕的问题吗?

的TextView控件的属性都是FILL_PARENT ...

如何使用平板电脑的整个屏幕为我的应用>?

main.xml中

<?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" 
    > 
<TextView 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="just small area" 
    /> 
</LinearLayout> 
+0

请显示您的xml .. – vsvydenko

+0

我不认为这是xml问题...但在我的编辑中看到,我发布了main.xml – Lukap

+0

fill_parent已被弃用。从API级别8开始,您应该使用match_parent – Merlin

回答

2

一下添加到AndroidManifest文件。

 
&ltsupports-screens 
      android:smallScreens="true" 
      android:normalScreens="true" 
      android:largeScreens="true" 
      android:anyDensity="true" /> 
+1

如果您使用的是Android 2.2+,即在AndroidManifest文件中指定目标SDK版本为8或更高版本,则不需要包含支持屏幕,则框架将小心处理。 – sat

+0

平板上,你通常希望targetSDK到11甚至没有设置要么在看问题中的图片 – MrJre

+0

他可能会使用在平板电脑上开发1.6 +以上的代码。 – sat

0

有时候Android很难选择特定的图形来使用。 我有同样的问题,我解决了它通过使用特殊的绘图目录 - drawable-hdpi-1200x650。

相关问题