I have the following setup, and the empty view text doesn\'t show up...
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstance
I was missing a setContentView(R.layout.listview);
and because of this the view was not picked upped by findViewById.
Shouldn't
<ScrollView
android:id="@android:id/empty"
be
<ScrollView
android:id="@+id/empty"
? I don't know if that makes any difference.
Are you sure that setListAdapter(null);
actually initializes the Adapter, rather than just ignoring the command?
In fact, you doesn't need this line in your java code
getListView().setEmptyView(findViewById(R.id.empty));
The couple of Android ID android:id="@android:id/list"
and android:id="@android:id/empty"
are exclusive !
Best regards, Division-par-zero.