[Android] Invalidate the options menu upon switching fragments. This hides the 'clear game list' option faster when switching fragment. Also fixes a rare bug where the option might not even redraw when returning to the game list.
This commit is contained in:
parent
528a733359
commit
a90e82d2c0
|
@ -173,6 +173,7 @@ public final class GameListActivity extends Activity
|
||||||
mCurFragment = new GameListFragment();
|
mCurFragment = new GameListFragment();
|
||||||
FragmentManager fragmentManager = getFragmentManager();
|
FragmentManager fragmentManager = getFragmentManager();
|
||||||
fragmentManager.beginTransaction().replace(R.id.content_frame, mCurFragment).commit();
|
fragmentManager.beginTransaction().replace(R.id.content_frame, mCurFragment).commit();
|
||||||
|
invalidateOptionsMenu();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -182,6 +183,7 @@ public final class GameListActivity extends Activity
|
||||||
mCurFragment = new FolderBrowser();
|
mCurFragment = new FolderBrowser();
|
||||||
FragmentManager fragmentManager = getFragmentManager();
|
FragmentManager fragmentManager = getFragmentManager();
|
||||||
fragmentManager.beginTransaction().replace(R.id.content_frame, mCurFragment).commit();
|
fragmentManager.beginTransaction().replace(R.id.content_frame, mCurFragment).commit();
|
||||||
|
invalidateOptionsMenu();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -198,6 +200,7 @@ public final class GameListActivity extends Activity
|
||||||
mCurFragment = new InputConfigFragment();
|
mCurFragment = new InputConfigFragment();
|
||||||
FragmentManager fragmentManager = getFragmentManager();
|
FragmentManager fragmentManager = getFragmentManager();
|
||||||
fragmentManager.beginTransaction().replace(R.id.content_frame, mCurFragment).commit();
|
fragmentManager.beginTransaction().replace(R.id.content_frame, mCurFragment).commit();
|
||||||
|
invalidateOptionsMenu();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -207,6 +210,7 @@ public final class GameListActivity extends Activity
|
||||||
mCurFragment = new AboutFragment();
|
mCurFragment = new AboutFragment();
|
||||||
FragmentManager fragmentManager = getFragmentManager();
|
FragmentManager fragmentManager = getFragmentManager();
|
||||||
fragmentManager.beginTransaction().replace(R.id.content_frame, mCurFragment).commit();
|
fragmentManager.beginTransaction().replace(R.id.content_frame, mCurFragment).commit();
|
||||||
|
invalidateOptionsMenu();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue