Changing the position of the Android action bar

I am currently modifying my Android app to support the action bar as indicated in the Android development instructions.

I successfully created an action bar and added what my menu buttons on the action bar were. However, the action bar shrinks 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 to reposition the action bar? I tried to search on Google and looked at the developer guide, but found nothing.

Thanks for any help you can provide.

+6
source share
5 answers

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

+2
source

According to Layout Design , it is assumed that the ActionBar is at the top of the screen to consistently display the ā€œbrandingā€ application and the ā€œprominent featuresā€ of the application. For example: Search, Logout, etc. The bottom of the screen is for displaying the Context Menu , which is usually displayed when you press the Menu key on the device.

However, take a look at the ā€œSplit Actions Linking Guidelinesā€ in the link above, which shows the ability to display the bottom pane for ā€œactionsā€.

+1
source

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

On many phones, these are soft buttons (without physical separation between the buttons and the screen). Therefore, if you ask the user to click in this area, it is easy to "push with a finger" and launch from the application (by accidentally clicking the "Home" button).

Of course, it’s important to follow design standards to make the app ā€œfitā€ in the Android ecosystem, like other posters.

+1
source
 android:uiOptions="splitActionBarWhenNarrow" 

This option worked for me.

+1
source

You need to add this to the manifest for your activity, if there are action elements that are larger than can be placed in the upper action panel, they will be displayed at the bottom

 uiOptions="splitActionBarWhenNarrow" 
0
source

Source: https://habr.com/ru/post/907594/


All Articles