Is there a way to add child fragment to an activity in such a way that it covers that activity's options menu overflow popup if it was open?
What I need:
I need to cover entire content of an activity in certain situations. Nothing of the activity's content must be visible. There's a number of reasons why I can't just launch another activity with opaque background.
What I tried:
I tried adding the "cover" fragment to android.R.id.content:
supportFragmentManager.beginTransaction().add(android.R.id.content, myCoverFragment, null).commit()
Problem:
If the activity had its options menu overflow popup open, it stays visible over the cover.
Is it possible for an activity's child fragment to cover its options menu popup? I thought about getting at it from another angle and just forcibly closing the options menu when I need to cover the content, but I'd really rather not.