Workaround AndroidX bug

pull/209/head
M66B 2 years ago
parent 6466b81fd6
commit 1d9340f7bc

@ -39,6 +39,8 @@ import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -123,6 +125,12 @@ public class FragmentBase extends Fragment {
updateSubtitle(); updateSubtitle();
} }
@Override
public void onCreateOptionsMenu(@NonNull Menu menu, @NonNull MenuInflater inflater) {
super.onCreateOptionsMenu(menu, inflater);
onPrepareOptionsMenu(menu);
}
void invalidateOptionsMenu() { void invalidateOptionsMenu() {
FragmentActivity activity = getActivity(); FragmentActivity activity = getActivity();
if (activity != null) if (activity != null)

Loading…
Cancel
Save