Merge "Don't call setListAdapter until adapter is ready."
This commit is contained in:
commit
578402eb40
@ -93,7 +93,6 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
|
||||
registerForContextMenu(listView);
|
||||
|
||||
mListAdapter = new MailboxesAdapter(mActivity);
|
||||
setListAdapter(mListAdapter);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -247,6 +246,7 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
|
||||
|
||||
if (cursor.isClosed()) return;
|
||||
mListAdapter.changeCursor(cursor);
|
||||
setListAdapter(mListAdapter);
|
||||
updateMessageCount();
|
||||
}
|
||||
}
|
||||
|
@ -154,7 +154,6 @@ public class MessageListFragment extends ListFragment implements OnItemClickList
|
||||
listView.setItemsCanFocus(false);
|
||||
|
||||
mListAdapter = new MessagesAdapter(mActivity, new Handler(), this);
|
||||
setListAdapter(mListAdapter);
|
||||
|
||||
mListFooterView = getActivity().getLayoutInflater().inflate(
|
||||
R.layout.message_list_item_footer, listView, false);
|
||||
@ -861,6 +860,7 @@ public class MessageListFragment extends ListFragment implements OnItemClickList
|
||||
|
||||
// TODO changeCursor(null)??
|
||||
mListAdapter.changeCursor(cursor);
|
||||
setListAdapter(mListAdapter);
|
||||
|
||||
// changeCursor occurs the jumping of position in ListView, so it's need to restore
|
||||
// the position;
|
||||
|
Loading…
Reference in New Issue
Block a user