1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-30 13:12:25 -05:00

Move FolderList initialization a bit earlier so as to not explode on reuse of the activity.

Fixes issue 1164
This commit is contained in:
Jesse Vincent 2010-02-04 01:49:56 +00:00
parent 88854f4123
commit 5ce80cadaa

View File

@ -245,6 +245,26 @@ public class FolderList extends K9ListActivity
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
mListView = getListView();
mListView.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_INSET);
mListView.setLongClickable(true);
mListView.setFastScrollEnabled(true);
mListView.setScrollingCacheEnabled(true);
mListView.setOnItemClickListener(new OnItemClickListener()
{
public void onItemClick(AdapterView parent, View v, int itemPosition, long id)
{
onOpenFolder(((FolderInfoHolder)mAdapter.getItem(id)).name);
}
});
registerForContextMenu(mListView);
mListView.setSaveEnabled(true);
mInflater = getLayoutInflater();
onNewIntent(getIntent());
}
@ -273,26 +293,6 @@ public class FolderList extends K9ListActivity
private void initializeActivityView()
{
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
mListView = getListView();
mListView.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_INSET);
mListView.setLongClickable(true);
mListView.setFastScrollEnabled(true);
mListView.setScrollingCacheEnabled(true);
mListView.setOnItemClickListener(new OnItemClickListener()
{
public void onItemClick(AdapterView parent, View v, int itemPosition, long id)
{
onOpenFolder(((FolderInfoHolder)mAdapter.getItem(id)).name);
}
});
registerForContextMenu(mListView);
mListView.setSaveEnabled(true);
mInflater = getLayoutInflater();
mAdapter = new FolderListAdapter();
final Object previousData = getLastNonConfigurationInstance();