0

For dialogs fragments UI google recommends to extend DialogFragment. However in provided sample it handle alert inside activity, but I need to do it inside fragment that invoke dialog. Any ideas how to solve this?

1 Answer 1

0

Sure that there are numerous ways but I pass a message Handler as a parameter to the constructor of my DialogFragment.

The message handler is a member of my fragment and in its handleMessage method I simply process messages that are sent from within the click events of my DialogFragment.

My message handler has a reference to my fragment so I can simply call onto whatever fragment methods I want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.