Vivian Liu - MSFT
Vivian Liu - MSFT

Reputation: 272

How to hide the action bar (Sherlock) inside a Fragment?

I have an action bar set up in the main activity, and this creates a bunch of fragments. However, there are several fragments that require the action bar to be hidden, but I can't refer to the ActionBarSherlock class inside a fragment.

How can I hide the action bar? Thanks for any suggestions.

Upvotes: 3

Views: 3420

Answers (1)

Desert
Desert

Reputation: 2303

Actually you can refer to ActionBar via activity which you can get from a SherlockFragment by calling SherlockFragment.getSherlockActivity(), then just call SherlockFragmentActivity.getSupportActionBar() and then hide()

Upvotes: 9

Related Questions