user1746708
user1746708

Reputation: 691

ActionBarSherlock with Fragments

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

Answers (2)

Plumillon Forge
Plumillon Forge

Reputation: 1643

You can get the ActionBar via getSupportActionBar() from your Fragment

Upvotes: 1

Egor
Egor

Reputation: 40203

You can refer to the ActionBar from any of your Fragments using the getActivity().getActionBar() call. Hope this helps.

Upvotes: 1

Related Questions