1

Just like the below image i want to show my icon

Click here

I want to split top and bottom action bar in both landscape and portrait mode of smartphone. The below code is working only in portrait mode(top and bottom action bar show) but not in landscape mode bottom action bar options are showed in top action bar.

 <application
    android:uiOptions="splitActionBarWhenNarrow"

I just want to show both action bar in both landscape and portrait mode of smartphone like above image.

Thanks

Solution:

I have found the very nice solution for this problem, i think you will be also benefited using this solution

If you want both action bar will be separate then you should use Sherlock Action bar library. Using this library you can customize action bar as you like. Here is the link

Thanks

Community
  • 1
  • 1
Md. Naushad Alam
  • 8,011
  • 6
  • 25
  • 23

1 Answers1

1

You want the SplitActionBar, try this:

AndroidManifest.xml

 <application
    android:uiOptions="splitActionBarWhenNarrow"

http://developer.android.com/guide/topics/manifest/activity-element.html#uioptions

Add a bar at the bottom of the screen to display action items in the ActionBar, when constrained for horizontal space (such as when in portrait mode on a handset). Instead of a small number of action items appearing in the action bar at the top of the screen, the action bar is split into the top navigation section and the bottom bar for action items. This ensures a reasonable amount of space is made available not only for the action items, but also for navigation and title elements at the top. Menu items are not split across the two bars; they always appear together.

Community
  • 1
  • 1
Blundell
  • 75,855
  • 30
  • 208
  • 233
  • 1
    I have used android:uiOptions="splitActionBarWhenNarrow" but it shows all action items in bottom bar not in top action bar. I want to fixed the top and bottom action items. They will not move from bottom to top. – Md. Naushad Alam May 15 '13 at 05:53
  • look at the link i sent you http://stackoverflow.com/questions/12077690/how-to-display-both-normal-and-split-actionbar – Blundell May 15 '13 at 14:44
  • Don't worry android geeks i have found the solution. – Md. Naushad Alam May 16 '13 at 08:49
  • @Md.NaushadAlam can you share the solution? – LOG_TAG Dec 10 '13 at 04:21
  • @LOG_TAG if you want both action bar top and bottom then i suggest you to use Sherlock Action bar library. Using this library you can customize action bar as you like. Thanks – Md. Naushad Alam Dec 15 '13 at 14:21