Spotify like android material bottom navigation bar library.

Overview

SuperBottomBar

About

Spotify like android material bottom navigation bar library.

GIF

Design Credits

All design and inspiration credits belongs to Spotify.

Setup

  • Add it in your root build.gradle at the end of repositories:
allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}
  • Add the dependency
dependencies {
        implementation 'com.github.ertugrulkaragoz:SuperBottomBar:0.4'
}

Usage

  • Create menu.xml in the res/menu/ resource folder:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:id="@+id/home_super_bottom_bar"
        android:icon="@drawable/ic_baseline_home_24"
        android:title="@string/home" />

    <item
        android:id="@+id/radio_super_bottom_bar"
        android:icon="@drawable/ic_baseline_radio_24"
        android:title="@string/radio" />

    <item
        android:id="@+id/search_super_bottom_bar"
        android:icon="@drawable/ic_baseline_search_24"
        android:title="@string/search" />

    <item
        android:id="@+id/library_super_bottom_bar"
        android:icon="@drawable/ic_baseline_library_music_24"
        android:title="@string/library" />

    <item
        android:id="@+id/profile_super_bottom_bar"
        android:icon="@drawable/ic_baseline_person_24"
        android:title="@string/profile" />
</menu>
  • Add SuperBottomBar in your layout:
 <me.ertugrul.lib.SuperBottomBar
        android:id="@+id/bottomBar"
        android:layout_width="match_parent"
        android:layout_height="55dp"
        app:sbb_menu="@menu/menu_bottom" />
  • You can customize some of the attributes:
<me.ertugrul.lib.SuperBottomBar
        android:id="@+id/bottomBar"
        android:layout_width="match_parent"
        android:layout_height="55dp"
        app:sbb_menu="@menu/menu_bottom"
        app:sbb_iconMargin=""
        app:sbb_textSize=""
        app:sbb_iconSize=""
        app:sbb_initialActiveItem=""
        app:sbb_textColor=""
        app:sbb_backgroundColor=""
        app:sbb_activeColor=""
        app:sbb_passiveColor=""
        app:sbb_pressedColor=""
        app:sbb_animationDuration=""
        app:sbb_scalePercent="" />
  • Get notified when SuperBottomBar menu item clicks by callback:
        bottomBar.onItemSelected = { pos ->
            Log.e("onItemSelected", "$pos")
        }

        bottomBar.onItemReselected = { pos ->
            Log.e("onItemReselected", "$pos")
        }

Or set a listener

        bottomBar.setOnItemSelectListener(object : OnItemSelectedListener {
            override fun onItemSelect(pos: Int) {
                Log.e("selectedListener", "$pos")
            }
        })

        bottomBar.setOnItemReselectListener(object : OnItemReselectedListener {
            override fun onItemReselect(pos: Int) {
                Log.e("reSelectedListener", "$pos")
            }
        })

License

MIT License

Copyright (c) 2021 Ertuğrul Karagöz

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.
You might also like...
Simple library which enable you to add a drawer(slide-out) navigation to your android application
Simple library which enable you to add a drawer(slide-out) navigation to your android application

SimpleSideDrawer is an android library to add a drawer navigation into your android application. This library has high affinity with other libraries l

Android-NewPopupMenu 3.9 0.0 Java  is an android library to create popup menu with GoogleMusic app-like style.
Android-NewPopupMenu 3.9 0.0 Java is an android library to create popup menu with GoogleMusic app-like style.

Android-NewPopupMenu Android-NewPopupMenu is an android library to create popup menu with GoogleMusic app-like style. Requirements Tested with APIv4 H

Android library that provides the floating action button to sheet transition from Google's Material Design.
Android library that provides the floating action button to sheet transition from Google's Material Design.

MaterialSheetFab Library that implements the floating action button to sheet transition from Google's Material Design documentation. It can be used wi

Navigation menu for Android (based off Google+ app)
Navigation menu for Android (based off Google+ app)

RibbonMenu Navigation menu for Android (based on Google+ app). Usage Menus are created in xml as normal, adding text and an icon. In the layout you wa

Implementation of
Implementation of "Side Navigation" or "Fly-in app menu" pattern for Android (based on Google+ app)

Android SideNavigation Library Implementation of "Side Navigation" or "Fly-in app menu" pattern for Android (based on Google+ app). Description The Go

A new way to implement navigation in your app 🏎
A new way to implement navigation in your app 🏎

ExpandableBottomBar A new way to improve navigation in your app Its really easy integrate to your project take it, faster, faster Important: library w

A customizable and easy to use BottomBar navigation view with sleek animations, with support for ViewPager, ViewPager2, NavController, and badges.
A customizable and easy to use BottomBar navigation view with sleek animations, with support for ViewPager, ViewPager2, NavController, and badges.

AnimatedBottomBar A customizable and easy to use bottom bar view with sleek animations. Examples Playground app Download the playground app from Googl

A simple Floating Action Button that shows an anchored Navigation View
A simple Floating Action Button that shows an anchored Navigation View

Floating Navigation View A simple Floating Action Button that shows an anchored Navigation View and was inspired by Menu Material Fixed created by Tom

An android custom view which looks like the menu in Path 2.0 (for iOS).

ArcMenu & RayMenu ArcMenu An android custom view which looks like the menu in Path 2.0 (for iOS). RayMenu About The user experience in Path 2.0 (for i

Releases(0.4)
Owner
Ertugrul
Ertugrul
Kai Liao 2.2k Jan 3, 2023
Space Navigation is a library allowing easily integrate fully customizable Google Spaces like navigation to your app.

Space-Navigation-View Introduction Space Navigation is a library allowing easily integrate fully customizable Google [Spaces][1] like navigation to yo

Arman 2k Dec 23, 2022
Suhuf is an android library that is used to build bottom sheets in an elegant way.

Suhuf is an android library that is used to build bottom sheets in an elegant way.

Rahmat Rasyidi Hakim 10 Nov 15, 2021
🚀 A very customizable library that allows you to present menu items (from menu resource and/or other sources) to users as a bottom sheet.

SlidingUpMenu A library that allows you to present menu items (from menu resource and/or other sources) to users as a bottom sheet. Gradle Dependency

Rasheed Sulayman 26 Jul 17, 2022
Spinner with bottom sheet dialog for Android

This is a small library for spinner view with displaying options in bottom sheet dialog. This view doesn't improve or extend the default android Spinner. The library doesn't support any other types of showing menu, only bottom sheet dialog.

Oleg Nestyuk 23 Oct 19, 2022
You can create awesome menus with bottom sheet experience in a few lines

You can create awesome menus with bottom sheet experience in a few lines

Mazen Rashed 19 Nov 1, 2022
Bottom Sheet fragment with a sticky header and a content recycler view

Sticky Header Bottom Sheet A simple library to create a Bottom Sheet with a sticky header and a content recycler view. The bottom sheet expands on scr

Kshitij Kumar 12 Sep 21, 2022
Android - Blur Navigation Drawer like Etsy app.

Blur Navigation Drawer Library[DEPRECATED] Blur Navigation Drawer like Etsy app. Demo You can download a demo here. Updates Version 1.1 Add support fo

Vasilis Charalampakis 414 Nov 23, 2022
Tap Bar Menu

TapBar Menu Simple library that helps creating a "Tap Bar" menu layout. Demo 1: https://youtu.be/DjY0cTWWtao Demo 2: https://youtu.be/dWuPMN6WTOY Inst

Mike 1k Jul 26, 2022