OK, that makes sense.  Thanks Dianne.
-Gregg
On Feb 27, 2011 9:53 PM, "Dianne Hackborn" <[email protected]> wrote:
> Fragment.getActivity().doSomething().
>
> A little more formally, define an interface for the fragment to call back
on
> the activity it is running in, which each activity using that fragment can
> implement.
>
> On Sun, Feb 27, 2011 at 6:39 PM, Gregg Reno <[email protected]> wrote:
>
>> Maybe this covered earlier in this thread and I'm still not
>> understanding it. I like the idea of a each fragment communicating
>> back to the activity rather than to other fragments. Then the activity
>> can decide whether it needs to send information to other fragments.
>>
>> So is there an existing mechanism for a fragment to send a message to
>> the activity? If not, I guess I could just create a handler in the
>> activity and pass the handler pointer to the fragment so it can send a
>> message to the activity.
>>
>> My use case is the activity is responsible for all changes to the
>> action bar and to showing or hiding various fragments.
>>
>> Thanks,
>> -Gregg Reno
>>
>> --
>> 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
>>
>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails. All such
> questions should be posted on public forums, where I and others can see
and
> answer them.

-- 
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

Reply via email to