Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Bottom Navigation View Customisation [closed]

I am new to Android development. I am trying to have a bottom navigation view similar to below attached image

enter image description here

With a background color of selected menu and also a middle button to be overflow over nav bar. Few key points to note in this is:

  • there is no title with icons List item.
  • The middle icon is overflown from navigation bar.
  • The background color is changing on selection of the tab instead of icon color.

If any tutorial or any guidance available then let me know.

Thank you (in advance)

like image 213
user3201500 Avatar asked Aug 30 '17 15:08

user3201500


People also ask

How can we avoid Android system navigation bar overlapping views at the bottom?

Very easy solution. Simply use ConstraintLayout. Align the bottom edge of top view to the top edge of bottom view.

How do I change the navigation bar style in Android?

There are two ways to style the navigation bar depends on how you create it. One is using the XML style file if you create the navigation bar from XML. The other one is to change it using code.


Video Answer


2 Answers

Use the SpaceNavigationView library to get the Bottom Navigation Bar similar to your required design. The library has the option for an overflow icon in the center and also there is no title with icons. However, I am not sure if the is any background color change feature on selection of tab in the library. You can also take a look at other libraries and see if the source codes can be of any help.

  • https://github.com/armcha/Space-Navigation-View

  • https://github.com/aurelhubert/ahbottomnavigation

  • https://github.com/sephiroth74/Material-BottomNavigation

  • https://github.com/Ashok-Varma/BottomNavigation

like image 160
Abhi Avatar answered Oct 23 '22 14:10

Abhi


I can answer about guidance.

  1. Check BottomNavigationView documentation. Play with OnTabSelectListener to change background color on selection. Play with dynamic items adding, to make your central item overflown.

  2. Before BottomNavigationView was added to Android SDK, some kind peron wrote BottomBar library. This library implements even more, then BottomNavigationView, including background color change. Its source code might be helpful for you.

like image 1
Dmitry Smolyaninov Avatar answered Oct 23 '22 14:10

Dmitry Smolyaninov