2011-05-17 91 views
2

我正在使用IO发布的新的10.1 galaxy tab谷歌。我是新来的android布局,但在Eclipse中的图形布局看起来不错,但我的应用程序不会填充选项卡上的父级。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:background="@color/red" 
     android:layout_width="fill_parent" android:layout_height="fill_parent"> 
</LinearLayout> 

这是我看到screenshot

回答

5

下一个标签给您AndroidManifest.xml

<manifest> 
... 
    <supports-screens  
     android:resizeable="true" /> 
</manifest> 

你可以找到更多信息添加这个标签here

+0

在你给它说,这应该是默认的真实链接,使得它听起来就像它已经从1.6弃用 - 事实上,它说: “你不应该使用它”。为什么不是上面的用户默认(至少使用Android 3)? – ace 2012-01-18 20:06:51