Reset menu every transaction
This commit is contained in:
parent
d30397e9c0
commit
2dddb8df69
@ -180,6 +180,7 @@ public class MainActivity extends AppCompatActivity
|
|||||||
|
|
||||||
private void displayFragment(@NonNull Fragment navFragment, String tag, boolean setElevation) {
|
private void displayFragment(@NonNull Fragment navFragment, String tag, boolean setElevation) {
|
||||||
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
|
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
|
||||||
|
invalidateOptionsMenu();
|
||||||
transaction.setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out);
|
transaction.setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out);
|
||||||
transaction.replace(R.id.content_frame, navFragment, tag).commitNow();
|
transaction.replace(R.id.content_frame, navFragment, tag).commitNow();
|
||||||
if (setElevation) toolbar.setElevation(toolbarElevation);
|
if (setElevation) toolbar.setElevation(toolbarElevation);
|
||||||
|
Loading…
Reference in New Issue
Block a user