Skip to content Skip to sidebar Skip to footer

How Can I Bring Back The Load Indicator In The (sherlock) Listview When Refreshing?

Observe the image below. This is displayed in place of the ListView data before I set the ListAdapter in my SherlockListFragment. I don't know if this is a product of SherlockActio

Solution 1:

In your SherlockListFragment, call setListShown(false);

The documentation for the compatibility ListFragment (which SherlockListFragment extends from) states:

Control whether the list is being displayed. You can make it not displayed if you are waiting for the initial data to show in it. During this time an indeterminant progress indicator will be shown instead.

Then of course, once you finish refreshing, call setListShown(true);

Solution 2:

Recomendation call

@OverridepublicvoidonStart() {
    super.onStart();

    // When in two-pane layout, set the listview to highlight the selected// list item// (We do this during onStart because at the point the listview is// available.)if (getFragmentManager().findFragmentById(R.id.article_fragment) != null) {

        getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE);
        setListShown(true);
    }
}

Post a Comment for "How Can I Bring Back The Load Indicator In The (sherlock) Listview When Refreshing?"