7

I am currently changing my android app so that it supports the action bar as stated by the android development guidelines.

I've successfully created the action bar and added, what were my menu buttons to the action bar. However, the action bar is being squished up at the top next to the program name icon and instead I want to show the action bar at the bottom of the screen.

Is there a way of changing the position of the action bar? I've tried doing a Google search and looking at the dev guide, but haven't found anything.

Thanks for any help you can provide.

Thaddeus Albers
  • 4,094
  • 5
  • 32
  • 42
Boardy
  • 35,417
  • 104
  • 256
  • 447
  • Does this answer your question? [How to add a toolbar in the bottom of the screen?](https://stackoverflow.com/questions/30275134/how-to-add-a-toolbar-in-the-bottom-of-the-screen) – Curiousboy Nov 28 '21 at 16:08

6 Answers6

3

Not really. And Google heavily frowns on action bars at the bottom of the screen. They will not feature your application if the action bar is anywhere but where they want it.

Brian Dupuis
  • 8,136
  • 3
  • 25
  • 29
  • 4
    Oh ok, that's a bit annoying. Although isn't the GMail ICS app got the action bar at the bottom – Boardy Feb 03 '12 at 16:45
  • In the link to the Dev post Sagar posted below, it says `You can adapt to such changes by using split action bars, which allow you to distribute action bar content across multiple bars located below the main action bar or at the bottom of the screen.' So you can put the action bar at the bottom of the screen, but Booger's post makes a great point. – Bill Gary Jun 24 '12 at 23:17
  • @Boardy - Gmail don't show the actionbar at the bottom. They use the split actionbar. The title and navigation are at the top and actions at the bottom - if screen is narrow. In landscape, you'll see the actions at the top bar. – AlikElzin-kilaka Jan 04 '13 at 00:22
1
android:uiOptions="splitActionBarWhenNarrow"

This option worked for me

pb2q
  • 58,613
  • 19
  • 146
  • 147
1

According to the Layout Considerations, the ActionBar is supposed to be at the top of the screen to consistently display the app "branding" and "prominent functions" of an app. For eg: Search, Logout, etc. The bottom part of the screen is meant to show Context Menu which typically is shown when you press the "Menu" key on the device.

However, take a look at "Layout Considerations for Split Action Bars" in the above link which shows the possibility of a bottom bar to display "actions".

Sagar Hatekar
  • 8,700
  • 14
  • 56
  • 72
1

The reason they don't want navigation at the bottom of the screen, is because they have the system navigation buttons there (Home, Menu, Search, and App Drawer).

On many phones these are soft buttons (no physical separation between buttons and screen). Therefore, if you encourage the user to click in that area, it is easy to "fat-finger", and launch out of your app (accidentally hitting the "Home" button for instance).

Of course, it is important to follow design standards, to make you app "fit" into the Android ecosystem, like the other posters suggested.

Booger
  • 18,579
  • 7
  • 55
  • 72
0

Actionbar is introduced in API level 11 (Android 3) and since then, the apps using the default theme (Holo) include ActionBar. The actionbar is hardcoded to top just like AppBar. To achieve what you are trying to do now. Using Toolbar is recommended as it offers much more customization and flexibility.

You can refer this: How to add a toolbar in the bottom of the screen?

Curiousboy
  • 21
  • 4
0

You need to add this in the manifest for your activity, if there are action items more than that can be accomodated in the top action bar they will be shown at the bottom

uiOptions="splitActionBarWhenNarrow"
Ankur Kumar
  • 972
  • 7
  • 12