[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();
|
||||
FragmentManager fragmentManager = getFragmentManager();
|
||||
fragmentManager.beginTransaction().replace(R.id.content_frame, mCurFragment).commit();
|
||||
invalidateOptionsMenu();
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -182,6 +183,7 @@ public final class GameListActivity extends Activity
|
|||
mCurFragment = new FolderBrowser();
|
||||
FragmentManager fragmentManager = getFragmentManager();
|
||||
fragmentManager.beginTransaction().replace(R.id.content_frame, mCurFragment).commit();
|
||||
invalidateOptionsMenu();
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -198,6 +200,7 @@ public final class GameListActivity extends Activity
|
|||
mCurFragment = new InputConfigFragment();
|
||||
FragmentManager fragmentManager = getFragmentManager();
|
||||
fragmentManager.beginTransaction().replace(R.id.content_frame, mCurFragment).commit();
|
||||
invalidateOptionsMenu();
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -207,6 +210,7 @@ public final class GameListActivity extends Activity
|
|||
mCurFragment = new AboutFragment();
|
||||
FragmentManager fragmentManager = getFragmentManager();
|
||||
fragmentManager.beginTransaction().replace(R.id.content_frame, mCurFragment).commit();
|
||||
invalidateOptionsMenu();
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue