It causes crashes due to causing onCreate to be
called twice when rotating.
outState.putString(C.SEARCH_TOKEN, searchView.getQuery().toString());
}
outState.putString(C.SEARCH_TOKEN, searchView.getQuery().toString());
}
- @Override
- protected void onRestoreInstanceState(final Bundle savedInstanceState) {
- super.onRestoreInstanceState(savedInstanceState);
- Log.d(LOG, "onRestoreInstanceState: " + savedInstanceState.getString(C.SEARCH_TOKEN));
- onCreate(savedInstanceState);
- }
-
@Override
public void onCreate(Bundle savedInstanceState) {
// This needs to be before super.onCreate, otherwise ActionbarSherlock
@Override
public void onCreate(Bundle savedInstanceState) {
// This needs to be before super.onCreate, otherwise ActionbarSherlock