-3

Is there any possible way to center align the action item icons that are shown in action bar of titanium app for android. I have searched a lot of places for this solution but had no luck. I want the action bar to look like the below image. Also tell me the way to not show app title in the action bar.

enter image description here

Rahul Singh
  • 892
  • 9
  • 24

1 Answers1

2

This is not a Titanium issue.
As you can read in Google's documentation, you won't be able to center anything in the ActionBar. Default (and expected) behaviour is to align action icons on the right (or left if reversed).

I don't recommend it, as it goes against Google's guidelines, but you will be able to center icons if you create a fake ActionBar:
- Remove native ActionBar from any window in your app
- Create a Titanium View that mimics the ActionBar
- Add icons and bind click events.

That's it, you are done.

Pierre vDEV
  • 164
  • 1
  • 11
  • I am not saying that it's an issue in titanium. It's just that I have to achieve the design where icons are center aligned. – Rahul Singh Sep 08 '15 at 09:31
  • I understand. Android simply can't do that. Titanium can only do it if you use a fake ActionBar. Let me know if you need more info. – Pierre vDEV Sep 08 '15 at 10:09