0

Yes this question has been asked before. Two times actually,

ActionBar - custom view with centered ImageView, Action Items on sides

ActionBar logo centered and Action items on sides

Yes I have thoroughly read both and it works except, I cant figure out how to put items to the LEFT of the image. To quote from the second link:

Of course, make sure you also do the other necessary setups for the Action items in your menu xml's as well. This will be for any right-sided action items.

Not much help. This doesn't apply to placement:

To take control of the left action item, you could do this in your Activity:

@Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
        case R.id.yourRightActionItem:
                        //do something
                        return true;
        case android.R.id.home: //<-- this will be your left action item
            // do something
            return true;
        default:
            return super.onOptionsItemSelected(item);
        }
    }

I have tried many things, but never can get buttons to the left. Can someone clear this up for me?

Community
  • 1
  • 1
FrostyFire
  • 3,212
  • 3
  • 29
  • 53

0 Answers0