On Fri, Apr 29, 2011 at 4:52 PM, goosedroid <[email protected]> wrote:
> Sorry for confusion. My Fragment which needs to show the AlertDialog
> also has the actions for that Dialog - so it seems basic that it
> should just create & show the dialog itself. If I were to break this
> into two Fragments, the first needing to show the Dialog, and the
> second which actually shows the Dialog, how do I communicate the
> result back to the first Fragment?
>
> The example for DialogFragment has the DialogFragment communicating
> back to its containing Activity, which is not what I need.
Have the activity pass the information along to the other fragment.
With managed dialogs being semi-deprecated, I really recommend getting
DialogFragment to do the work. Off the cuff, it feels like you need to
move more of the business logic ("the actions for that Dialog") into
the DialogFragment.
> Looking through the docs, it seems Fragment.setTargetFragment may be
> involved here, but there is not much good information on how this
> works.
Yeah, I haven't tried that.
--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy
Android Training...At Your Office: http://commonsware.com/training
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en