From 2dddb8df698604bc384698e46d405f069e722d80 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Mon, 30 Jan 2017 01:51:55 +0800 Subject: [PATCH] Reset menu every transaction --- app/src/main/java/com/topjohnwu/magisk/MainActivity.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/com/topjohnwu/magisk/MainActivity.java b/app/src/main/java/com/topjohnwu/magisk/MainActivity.java index 859f43bfa..aa38145d2 100644 --- a/app/src/main/java/com/topjohnwu/magisk/MainActivity.java +++ b/app/src/main/java/com/topjohnwu/magisk/MainActivity.java @@ -180,6 +180,7 @@ public class MainActivity extends AppCompatActivity private void displayFragment(@NonNull Fragment navFragment, String tag, boolean setElevation) { FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); + invalidateOptionsMenu(); transaction.setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out); transaction.replace(R.id.content_frame, navFragment, tag).commitNow(); if (setElevation) toolbar.setElevation(toolbarElevation);