public void setEmptyText ( CharSequence text ) { ensureList ( ) ; if ( mStandardEmptyView == null ) { throw new IllegalStateException ( "Can't be used with a custom content view" ) ; } mStandardEmptyView . setText ( text ) ; if ( mEmptyText == null ) { mList . setEmptyView ( mStandardEmptyView ) ; } mEmptyText = text ; }
The default content for a ListFragment has a TextView that can be shown when the list is empty . If you would like to have it shown call this method to supply the text it should use .