Merge "MailboxList: Show the rotating icon when there's no mailbox"

This commit is contained in:
Makoto Onuki 2010-09-03 10:47:01 -07:00 committed by Android (Google) Code Review
commit f66a729cc4
1 changed files with 10 additions and 5 deletions

View File

@ -264,11 +264,16 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
lss = new Utility.ListStateSaver(lv);
}
// Set the adapter.
mListAdapter.changeCursor(cursor);
setListAdapter(mListAdapter);
setListShown(true);
highlightSelectedMailbox();
if (cursor.getCount() == 0) {
mListAdapter.changeCursor(null);
setListShown(false);
} else {
// Set the adapter.
mListAdapter.changeCursor(cursor);
setListAdapter(mListAdapter);
setListShown(true);
highlightSelectedMailbox();
}
// Restore the state
lss.restore(lv);