I have a Fragment
A which shows a MenuItem
Mi in the toolbar. On clicking Mi, I am showing a DialogFragment
Df to the user to set a value V.
I am passing this value to fragment A by implementing a callback listener interface. Once the value is set, I want to hide Mi from toolbar menu of fragment A.
I wanted to handle this inside onPause()
and onResume()
of fragment A, but showing a DialogFragment doesn't change the lifecycle of fragment. I was wondering how to approach this problem.
How can I achieve this thing?