I\'ve got a split ActionBar, and I\'m trying to add functionality almost identical to google play\'s \'Now playing\'..
I can get menu items to appear at the bottom of th
So I managed to find a dirty solution to this.. Well, dirty in my amateurish opinion..
In the oncreateOptionsMenu, I've inflated a menu called option_menu like so:
@Override
public boolean onCreateOptionsMenu(Menu menu) {
new MenuInflater(this).inflate(R.menu.option_menu, menu);
And in the xml for that option_menu item, I've implemented an actionViewClass, and in this case I've used relative layout (I'm guessing I could've just used View..?):
So then I inflated an xml layout, and added it to the layout_item defined in my menu:
@Override
public boolean onCreateOptionsMenu(Menu menu) {
new MenuInflater(this).inflate(R.menu.option_menu, menu);
relativeLayout = (RelativeLayout) menu.findItem(R.id.layout_item)
.getActionView();
View inflatedView = getLayoutInflater().inflate(R.layout.now_playing,
null);
relativeLayout.addView(inflatedView);
return (super.onCreateOptionsMenu(menu));
}
Please feel free to edit/enhance this answer as you see fit.