I have an Activity
with multiple Fragment
s. I want to show a DialogFragment
or open another Fragment
from one of the
To get a maximum in loose coupling you can use an event bus like OTTO from Square or EventBus from GreenRobot. Your fragments can fire events which are handled by your activity and vice versa. The cool thing about this is that the components (activities, fragments) no nothing about each other and you do not need to declare any interfaces or callbacks.
I use it in all my projects and it is robust and has low to no influence on the performance (in normal conditions).