其实应该吧emptyView放在 listView的下面
<!--The frame layout is here since we will be showing eitherthe empty view or the list view.--><FrameLayoutandroid:layout_width="match_parent"android:layout_height="0dip"android:layout_weight="1" ><!--Here is the list. Since we are using a ListActivity, wehave to call it "@android:id/list" so ListActivity willfind it--><ListViewandroid:id="@android:id/list"android:layout_width="match_parent"android:layout_height="match_parent"android:drawSelectorOnTop="false" /><TextViewandroid: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