Skip to content
A lightweight Android material bottom navigation bar library
Kotlin
Branch: master
Clone or download
Latest commit 8a3232a Nov 10, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app improve Draw indicator and use RectF() to support lower sdk versions Nov 1, 2019
gradle/wrapper initial Oct 25, 2019
lib Add try catch block to handle notFoundException Nov 8, 2019
.gitignore initial Oct 25, 2019
LICENSE initial Oct 25, 2019
README.md update readme Nov 10, 2019
build.gradle initial Oct 25, 2019
gradle.properties initial Oct 25, 2019
gradlew initial Oct 25, 2019
gradlew.bat initial Oct 25, 2019
settings.gradle initial Oct 25, 2019

README.md

SmoothBottomBar

A lightweight Android material bottom navigation bar library

API Android Arsenal

GIF

Design Credits

All design and inspiration credits belong to Alejandro Ausejo.

Usage

  • Create menu.xml under your res/menu/ folder
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">

    <item
        android:id="@+id/item0"
        android:title="@string/menu_dashboard"
        android:icon="@drawable/ic_dashboard_white_24dp"/>

    <item
        android:id="@+id/item1"
        android:title="@string/menu_leaderboard"
        android:icon="@drawable/ic_multiline_chart_white_24dp"/>

    <item
        android:id="@+id/item2"
        android:title="@string/menu_store"
        android:icon="@drawable/ic_store_white_24dp"/>

    <item
        android:id="@+id/item3"
        android:title="@string/menu_profile"
        android:icon="@drawable/ic_person_outline_white_24dp"/>

</menu>
  • Add view into your layout file
<me.ibrahimsn.lib.SmoothBottomBar
    android:id="@+id/bottomBar"
    android:layout_width="match_parent"
    android:layout_height="70dp"
    app:backgroundColor="@color/colorPrimary"
    app:menu="@menu/menu_bottom"/>
  • Use SmoothBottomBar callbacks in your activity
bottomBar.onItemSelected = {
    status.text = "Item $it selected"
}

bottomBar.onItemReselected = {
    status.text = "Item $it re-selected"
}

Customization

<me.ibrahimsn.lib.SmoothBottomBar
        android:id="@+id/bottomBar"
        android:layout_width="match_parent"
        android:layout_height="70dp"
        app:backgroundColor=""
        app:textColor=""
        app:textSize=""
        app:iconSize=""
        app:indicatorColor=""
        app:sideMargins=""
        app:itemPadding=""
        app:iconTint=""
        app:iconTintActive=""
        app:activeItem=""
        app:duration=""
        app:menu=""/>

Setup

	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}
	
	dependencies {
	        implementation 'com.github.ibrahimsn98:SmoothBottomBar:1.5'
	}

License

MIT License

Copyright (c) 2019 İbrahim Süren

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.

Follow me on Twitter @ibrahimsn98

You can’t perform that action at this time.