你可以有一個線性佈局裏面,例如不同的看法和列表視圖:
?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="@drawable/background_new_search_activity_1">
<TextView
android:id="@+id/list_item_amount_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:cacheColorHint="#00000000"/>
</LinearLayout>
是的,你可以在所有的活動中使用的ListView
,沒有必要延長ListActivity
發佈代碼,這會讓事情變得更好 –