我需要一个按钮、一个网格视图和一个按钮,垂直排列。我可以看到 Button 和 GridView 但看不到在网格视图之后声明的按钮。为什么?网格视图声明下方的任何视图都会发生这种情况。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="vertical" >
        <TextView
        android:id="@+id/text_view"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="center_horizontal|center_vertical"
        android:layout_marginTop="20dip"
        android:text="Fragment1"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:textSize="30dip" />
        <Button 
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="Button1"/>
     <GridView 
          android:id="@+id/gridview"
          android:layout_width="wrap_content" 
          android:layout_height="match_parent"overla
          android:columnWidth="90dp"
          android:numColumns="auto_fit"
          android:verticalSpacing="10dp"
          android:horizontalSpacing="10dp"
          android:stretchMode="columnWidth"
          android:gravity="center"/>                            
            <Button 
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="Button1"/>
</LinearLayout>