Anish Singh
Anish Singh

Reputation: 881

Multiple actionbar (one per fragment) in activity

Is it possible to add an action-bar to a fragment instead of an activity.

What I am trying to create is a master-detail application with left side dedicated to the master fragment and the right side to the detail fragment. I want to add a dedicated actionbar for each of those fragment.

Does actionbarsherlock/appcompat support this feature or I would need to create a custom actionbar? / Is there a library which allows you place actionbar like thing within a linear-layout?

Upvotes: 0

Views: 376

Answers (1)

Dima
Dima

Reputation: 1510

ActionBar is a feature of Activity. You can only control it state from fragment, but not to create. So you should implement it yourself.

Is there a library which allows you place actionbar like thing within a linear-layout?

I don't know, but you can use <include layout="@layout/custom_action_bar"> for ActionBar placing.

Upvotes: 1

Related Questions