diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/home/MagiskFragment.kt b/app/src/main/java/com/topjohnwu/magisk/ui/home/MagiskFragment.kt index 01c203296..11a4d8554 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/home/MagiskFragment.kt +++ b/app/src/main/java/com/topjohnwu/magisk/ui/home/MagiskFragment.kt @@ -1,7 +1,5 @@ package com.topjohnwu.magisk.ui.home -import android.os.Bundle -import android.view.View import com.skoumal.teanity.viewevents.ViewEvent import com.topjohnwu.magisk.BuildConfig import com.topjohnwu.magisk.Config @@ -41,13 +39,9 @@ class MagiskFragment : NewMagiskFragment() } } - override fun onViewCreated(view: View, savedInstanceState: Bundle?) { - super.onViewCreated(view, savedInstanceState) - setHasOptionsMenu(true) - } - override fun onStart() { super.onStart() + setHasOptionsMenu(true) requireActivity().setTitle(R.string.magisk) } diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/settings/SettingsFragment.java b/app/src/main/java/com/topjohnwu/magisk/ui/settings/SettingsFragment.java index bfadd491e..47e6ddc7f 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/settings/SettingsFragment.java +++ b/app/src/main/java/com/topjohnwu/magisk/ui/settings/SettingsFragment.java @@ -43,6 +43,7 @@ public class SettingsFragment extends BasePreferenceFragment { @Override public void onStart() { super.onStart(); + setHasOptionsMenu(true); requireActivity().setTitle(R.string.settings); } diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/superuser/SuperuserFragment.kt b/app/src/main/java/com/topjohnwu/magisk/ui/superuser/SuperuserFragment.kt index 7c197115c..1547fec3e 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/superuser/SuperuserFragment.kt +++ b/app/src/main/java/com/topjohnwu/magisk/ui/superuser/SuperuserFragment.kt @@ -13,6 +13,7 @@ class SuperuserFragment : override fun onStart() { super.onStart() + setHasOptionsMenu(true) requireActivity().setTitle(R.string.superuser) }