[Android]ListFragment.setEmptyText() 抛 java.lang.IllegalStateException

在ListFragment子类中直接调用setEmptyText(getString(R.string.msg_no_invited_parties)), 抛java.lang.IllegalStateException: Can't be used with a custom content view

改用 ((TextView)getListView().getEmptyView()).setText(getString(R.string.msg_no_invited_parties)); 则没问题。

 

 

posted @ 2014-06-03 21:36  【雨歌】  阅读(261)  评论(0编辑  收藏  举报