第三次安卓
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <TextView android:id="@+id/textView" android:layout_width="match_parent" android:layout_height="35dp" android:background="#009688" android:gravity="center" android:text="购物清单" android:textColor="#E91E63" android:textSize="25sp" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" android:orientation="vertical"> <ListView android:id="@+id/fruit_item" android:layout_width="match_parent" android:layout_height="match_parent" /> </LinearLayout> </LinearLayout>