11# BottomNavigation
22
3+ <img src =" https://raw.githubusercontent.com/Ashok-Varma/BottomNavigation/master/complete.gif " width =" 300 " height =" 550 " />
34
45## What is this component about?
56
@@ -42,7 +43,7 @@ or Ivy:
4243```
4344### Usage
4445
45- ####Basic setup
46+ #### Basic setup
4647
4748in your activity xml :
4849
@@ -66,6 +67,22 @@ bottomNavigationBar
6667 .addItem(new BottomNavigationItem (R . drawable. ic_videogame_asset_white_24dp, " Games" ))
6768 .initialise();
6869```
70+ #### Add TabChangeListener
71+
72+ ``` java
73+ bottomNavigationBar. setTabSelectedListener(new BottomNavigationBar .OnTabSelectedListener (){
74+ @Override
75+ public void onTabSelected (int position ) {
76+ }
77+ @Override
78+ public void onTabUnselected (int position ) {]
79+ }
80+ @Override
81+ public void onTabReselected (int position ) {
82+ }
83+ });
84+ ```
85+ all methods are self explanatory
6986
7087#### BottomNavigationBar Cutomisations
7188
@@ -74,7 +91,7 @@ bottomNavigationBar
7491BACKGROUND_STYLE_STATIC | <img src =" https://raw.githubusercontent.com/Ashok-Varma/BottomNavigation/master/classic_static.gif " width =" 320 " height =" 50 " /> | <img src =" https://raw.githubusercontent.com/Ashok-Varma/BottomNavigation/master/shift_static.gif " width =" 320 " height =" 50 " />
7592BACKGROUND_STYLE_RIPPLE | <img src =" https://raw.githubusercontent.com/Ashok-Varma/BottomNavigation/master/classic_ripple.gif " width =" 320 " height =" 50 " /> | <img src =" https://raw.githubusercontent.com/Ashok-Varma/BottomNavigation/master/shift_ripple.gif " width =" 320 " height =" 50 " />
7693
77- ##### Modes
94+ ##### 1) Modes
7895library provides two modes MODE_CLASSIC and MODE_SHIFTING
7996
8097to set mode :
@@ -85,18 +102,18 @@ bottomNavigationBar
85102###### default behaviour
86103MODE_DEFAULT: if number of tabs are less than or equal to three then MODE_CLASSIC will be used other cases MODE_SHIFTING will be used.
87104
88- ##### Background Styles
105+ ##### 2) Background Styles
89106library provides two background styles BACKGROUND_STYLE_STATIC and BACKGROUND_STYLE_RIPPLE
90107
91- you can set background style:
108+ to set background style:
92109``` java
93110bottomNavigationBar
94111 .setBackgroundStyle(BottomNavigationBar . BACKGROUND_STYLE_RIPPLE )
95112```
96113###### default behaviour
97114BACKGROUND_STYLE_DEFAULT: if mode is MODE_CLASSIC then BACKGROUND_STYLE_STATIC will be used if mode is MODE_SHIFTING then BACKGROUND_STYLE_RIPPLE will be used.
98115
99- ##### Colors
116+ ##### 3) Colors
100117user can play with three colors : background color, active color and in-active color
101118
102119in-active color : is the icon and text color of the in-active/un-selected tab
0 commit comments