Question

I want to show Action Bar like below.


enter image description here


enter image description here


enter image description here


I have already used this library clickhere

But it takes only two icons on Action Bar. If I add four items, then last two are shown me like menu. I want all in Action bar same as image above.

Is it possible? if yes, then HOW? Can I change Action Bar color or its default style available in Device?

Thanks in Advance.

Was it helpful?

Solution 2

hello try this library

it sure help you And you may have to add you own logic to handle this in below 2.3 Android OS and above 3.0 Android OS.

there is many demo sample available like below :

enter image description here

enter image description here

enter image description here

enter image description here

OTHER TIPS

I recommend you use this:

http://jgilfelt.github.com/android-actionbarstylegenerator/

to style your ActionBar.

If you want all the 4 icons to be there, just add this attribute to all the menu items:

android:showAsAction="always"

There is no way you can be sure of the number of icons displayed in the action bar. There is a large varierty of Android devices out there and they all have different screen sizes. That's why you have to prioritize the actions available in a menu : the most important will be displayed as actions in the action bars and the others will be displayed in the "menu" : the action overflow.

You should think of actions in a functional way, not a graphical way.

With ref to Image that you attached you should decide which design pattern you want to use in your application, there are many UI patterns available for mobiles, tablets. The image you attached looks like Side Navigation UI pattern. It's better you decide which UI pattern perfect for your app.. then start implementing it with custom action bar libs (if you want action bar in less than Android 3.0 ver) or any other.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top