0
我在我的android應用程序中有一個LinearLayout。Android GridView隱藏我的按鈕
只有兩個按鈕效果不錯 - 但是當我添加了GridView控件,它現在隱藏兩個按鈕 - 無論如果我把它們的上方或下方的GridView
誰能幫助?
<?xml version="1.0" encoding="utf-8"?>
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gridview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:numColumns="4"
android:verticalSpacing="10dp"
android:horizontalSpacing="10dp"
android:stretchMode="columnWidth"
android:gravity="center"/>
<Button android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_marginTop="5px"
android:layout_width="fill_parent"
android:text="@string/week" />
<Button android:layout_weight="1"
android:layout_marginTop="5px"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:text="@string/day" />
的引用文字保持隱藏XML文檔的部分。上面的Xml具有一個根層次的LinearLayout,其方向設置爲'vertical'。 – KennetRunner 2010-11-29 21:20:23