I am trying to pass info from a DialogFragment
to it's hosting Fragment
, but the problem is I am using the android.support.v4.app.Fragment
instead of the regular android.app.Fragment
package for my Fragments
.
This code gives me an error:
messageResponseDialog.setTargetFragment(this, 0);
setTargetFragment
is expecting a Fragment
and not a support.v4.Fragment
.
How can I do implement a callback from the DialogFragment to the hosting Fragment using the android.support.v4.app.Fragment?
You are trying to set a target fragment from a DialogFragment
that is not from the android.support
solution:
change your DialogFragment to android.support
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With