Chinese version click me or slide to the back

BottomNavigationViewEx

An android lib for enhancing BottomNavigationView.

About Us

Feature

Adding to project

Importing to project

and for Maven:

Step 1. Add it in your root build.gradle at the end of repositories:


    
        jitpack.io
        https://jitpack.io
    

Copy the code

Step 2. Add the dependency

Com. Making. Ittianyu BottomNavigationViewEx 1.0.0Copy the code

Getting started

Adding a custom widget in xml :

Copy the code

Binding view in Activity and setting style:

BottomNavigationViewEx bnve = (BottomNavigationViewEx) findViewById(R.id.bnve);

bnve.enableAnimation(false);

bnve.enableShiftingMode(false);

bnve.enableItemShiftingMode(false);

bnve.setTextVisibility(false);

bnve.setIconVisibility(false);

bnve.setCurrentItem(1);Copy the code

Other usage is the same as official BottomNavigationView. You can click here for detail.

References

The lib is based on BottomNavigationView in Support Library 25 design.

I found it was inflexible when I try in demo. For example, I can’t change the current checked item by code. So I write a class extends it to provide some useful method.

You no need to worry about stability. Because I minimise modifying by reflecting.



BottomNavigationViewEx

An android library that enhances BottomNavigationView.

About us

function

Join the project

Import the library

Maven examples:

Step 1. Add the following code to build. Gradle at the end of the project root directory:


    
        jitpack.io
        https://jitpack.io
    

Copy the code

Step 2. Add a dependency

Com. Making. Ittianyu BottomNavigationViewEx 1.0.0Copy the code

Begin to use

Adding custom controls to an XML layout:

Copy the code

Bind controls in your Activity and style them:

BottomNavigationViewEx bnve = (BottomNavigationViewEx) findViewById(R.id.bnve);

bnve.enableAnimation(false);

bnve.enableShiftingMode(false);

bnve.enableItemShiftingMode(false);

bnve.setTextVisibility(false);

bnve.setIconVisibility(false);

bnve.setCurrentItem(1);Copy the code

The other usage is the same as the official BottomNavigationView. Click here for details

authorization

MIT License

Copyright (c) 2016 ittianyu

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Copy the code