There is an easy way to do this -- call setTargetFragment() on the
DialogFragment to tell it who to tell about its result:
http://developer.android.com/reference/android/app/Fragment.html#setTargetFragment(android.app.Fragment,
int)
An ApiDemo using this API is here:
http://developer.android.com
On Fri, Apr 29, 2011 at 5:45 PM, goosedroid wrote:
> Can you provide an example of how this scenario would work?
Not specifically with a DialogFragment, but passing events between
fragments by way the activity is really the only way to do it for
*any* fragments. One fragment should neither know n
FragmentDialog is a cleaner and better solution. If you are using fragments,
use FragmentDialog.
On Fri, Apr 29, 2011 at 5:45 PM, goosedroid wrote:
>
>
> On Apr 29, 1:57 pm, Mark Murphy wrote:
> > On Fri, Apr 29, 2011 at 4:52 PM, goosedroid
> wrote:
> > > Sorry for confusion. My Fragment which
On Apr 29, 1:57 pm, Mark Murphy wrote:
> On Fri, Apr 29, 2011 at 4:52 PM, goosedroid 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
On Fri, Apr 29, 2011 at 4:52 PM, goosedroid 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 needin
>
> The simplest way of showing a dialog from a Fragment is to use a
> DialogFragment. I am unclear what you think the difference is between
> an AlertDialog and an AlertDialog shown by a DialogFragment.
>
> --
> Mark Murphy (a Commons
> Guy)http://commonsware.com|http://github.com/commonsguyhttp:
6 matches
Mail list logo