diff --git a/src/com/android/email/activity/MailboxListFragment.java b/src/com/android/email/activity/MailboxListFragment.java index cb382542d..9410970ce 100644 --- a/src/com/android/email/activity/MailboxListFragment.java +++ b/src/com/android/email/activity/MailboxListFragment.java @@ -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(); } } diff --git a/src/com/android/email/activity/MessageListFragment.java b/src/com/android/email/activity/MessageListFragment.java index b7f69783f..dda793efe 100644 --- a/src/com/android/email/activity/MessageListFragment.java +++ b/src/com/android/email/activity/MessageListFragment.java @@ -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;