Reputation: 691
I'm new to Android and using this very useful API. In my application I have a pager and 4 fragments.
I want to update the action bar based on events on each fragment e.g. an OnlistItemClick event. But I can't interfere with the ActionBar from the fragment.
How can I overcome this problem?
Upvotes: 0
Views: 98
Reputation: 1643
You can get the ActionBar via getSupportActionBar()
from your Fragment
Upvotes: 1
Reputation: 40203
You can refer to the ActionBar
from any of your Fragments
using the getActivity().getActionBar()
call. Hope this helps.
Upvotes: 1