android - Static and dynamic Items in Actionbar -
my app contains master/detail flow. if click listviewitem new fragment displayed in detail flow whith own menu items in actionbar. change them with:
@override public void onprepareoptionsmenu(menu menu) { super.onprepareoptionsmenu(menu); menu.clear(); getactivity().getmenuinflater().inflate(r.menu.klasse, menu); } default items displayed @ right side of screen. want items allways there (not depending on fragment) on left side of screen. want static items on left in actionbar , can change dynamicly on right side. how can realize that?
or in other words: 1 optionmenu activity items static , on left side , 1 optionmenu fragments can change dynamicly in 1 actionbar on top of screen. event static items want handel in activity.
you welcome implement oncreateoptionsmenu() in activity have add action items action bar, in addition being contributed fragments. can use things android:orderincategory control sequencing. however, none of action items "on left side of screen", reserved home affordance, title, , navigation (e.g., drop-down list).
Comments
Post a Comment