其实应该吧emptyView放在 listView的下面
<!--
The frame layout is here since we will be showing either
the empty view or the list view.
-->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1" >
<!--
Here is the list. Since we are using a ListActivity, we
have to call it "@android:id/list" so ListActivity will
find it
-->
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:drawSelectorOnTop="false" />
<TextView
android:id="@+id/empty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/list_8_no_photos" />
</FrameLayout>
然后list.setEmptyView(findViewById(R.id.empty));
list有数据的时候 textView不会显示 否则就会显示那个 空View