0

I have started my android application with the standard holo theme. Then I added the tabs functionality and now I would like to add a small settings button in the action bar.

How can I do that. I already set this method:

@Override
public boolean onCreateOptionsMenu(Menu menu) {
   com.actionbarsherlock.view.MenuInflater inflater = getSupportMenuInflater();
   inflater.inflate(R.menu.activity_main, (com.actionbarsherlock.view.Menu) menu);
   return super.onCreateOptionsMenu(menu);
}
user2426316
  • 7,131
  • 20
  • 52
  • 83
  • Simular question answered here: http://stackoverflow.com/questions/10278952/adding-a-button-to-the-actionbar-with-actionbarsherlock – Johnny Broberg Aug 04 '13 at 17:18

1 Answers1

0

Try this:

menu.add("some title").setIcon(R.drawable.[your image]).setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
Androiderson
  • 16,865
  • 6
  • 62
  • 72