0

Is it possible to center anything in the actionbar? I know that the appIcon, appLogo, or the label can be set in the manifest, but it automatically jumps to the left side. Is there anyway to take the logo or title and position it to the center?

I've found some discussions about this on Google, but mostly mentioning Adobe Flex

EGHDK
  • 17,818
  • 45
  • 129
  • 204
  • 1
    Don't know if this is what you are looking for, but you can set any custom view to be your action bars view: getActionBar().setDisplayOption(ActionBar.DISPLAY_SHOW_CUSTOM); getActionBar().setCustomView(yourActionBarView) – Tamara Jul 09 '12 at 15:15
  • Aha! Did not know that. Awesome. That helps a lot. Thanks – EGHDK Jul 09 '12 at 15:17

2 Answers2

2

Figured out that you can have a custom layout in the actionbar. Create a custom layout (Just center an image or text in xml) and then call it in the actionbar.

EGHDK
  • 17,818
  • 45
  • 129
  • 204
0

If I am not wrong you want to set screen title at top center !! if I am correct hope you tried below suggestions in this answer??

screen title in center.

Community
  • 1
  • 1
AAnkit
  • 27,299
  • 12
  • 60
  • 71