forked from upstream-mirrors/quik
Added case for search
This commit is contained in:
@@ -73,6 +73,7 @@ public class MainActivity extends QKActivity implements SlidingMenu.OnOpenListen
|
|||||||
private final int TYPE_COMPOSE = 0;
|
private final int TYPE_COMPOSE = 0;
|
||||||
private final int TYPE_CONVERSATION = 1;
|
private final int TYPE_CONVERSATION = 1;
|
||||||
private final int TYPE_SETTINGS = 2;
|
private final int TYPE_SETTINGS = 2;
|
||||||
|
private final int TYPE_SEARCH = 3;
|
||||||
|
|
||||||
private static final int THREAD_LIST_QUERY_TOKEN = 1701;
|
private static final int THREAD_LIST_QUERY_TOKEN = 1701;
|
||||||
private static final int UNREAD_THREADS_QUERY_TOKEN = 1702;
|
private static final int UNREAD_THREADS_QUERY_TOKEN = 1702;
|
||||||
@@ -155,6 +156,9 @@ public class MainActivity extends QKActivity implements SlidingMenu.OnOpenListen
|
|||||||
case TYPE_SETTINGS:
|
case TYPE_SETTINGS:
|
||||||
content = SettingsFragment.newInstance(R.xml.settings_simple);
|
content = SettingsFragment.newInstance(R.xml.settings_simple);
|
||||||
break;
|
break;
|
||||||
|
case TYPE_SEARCH:
|
||||||
|
content = new SearchFragment();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
getFragmentManager().beginTransaction()
|
getFragmentManager().beginTransaction()
|
||||||
@@ -526,7 +530,8 @@ public class MainActivity extends QKActivity implements SlidingMenu.OnOpenListen
|
|||||||
}
|
}
|
||||||
|
|
||||||
outState.putInt(KEY_TYPE, content instanceof MessageListFragment ? TYPE_CONVERSATION :
|
outState.putInt(KEY_TYPE, content instanceof MessageListFragment ? TYPE_CONVERSATION :
|
||||||
content instanceof SettingsFragment ? TYPE_SETTINGS : TYPE_COMPOSE);
|
content instanceof SettingsFragment ? TYPE_SETTINGS :
|
||||||
|
content instanceof SearchFragment ? TYPE_SEARCH : TYPE_COMPOSE);
|
||||||
outState.putInt(KEY_POSITION, menuFragment.getPosition());
|
outState.putInt(KEY_POSITION, menuFragment.getPosition());
|
||||||
outState.putLong(KEY_THREADID, threadId);
|
outState.putLong(KEY_THREADID, threadId);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user