setEmptyView() doesn't seem to work for (Sherlock)ListFragment
问题 I have a ListFragment and I want to set its empty view, so I use the following code: View emptyView = getLayoutInflater().inflate(R.layout.collection_empty_view, null); detailFragment.getListView().setEmptyView(emptyView); for the following xml layout: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/empty" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" android:orientation="vertical" > <TextView