Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork71
BubbleTabBar is a bottom navigation bar with customizable bubble-like tabs
License
akshay2211/BubbleTabBar
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
BubbleTabBar is bottom navigation bar with customizable bubble like tabs
<io.ak1.BubbleTabBarandroid:id="@+id/bubbleTabBar"android:layout_width="match_parent"android:layout_height="wrap_content"android:background="#FFF"android:elevation="16dp"android:padding="7dp"app:bubbletab_menuResource="@menu/list"app:bubbletab_custom_font="@font/opensans"app:bubbletab_disabled_icon_color="@color/colorPrimaryDark"app:bubbletab_horizontal_padding="20dp"app:bubbletab_icon_size="20dp"app:bubbletab_title_size="16sp"app:bubbletab_icon_padding="5sp"app:bubbletab_vertical_padding="10dp"app:bubbletab_tab_corner_radius="25dp"> </io.ak1.BubbleTabBar>
or just use
<io.ak1.BubbleTabBarandroid:id="@+id/bubbleTabBar"android:layout_width="match_parent"android:layout_height="wrap_content"android:padding="7dp"app:bubbletab_menuResource="@menu/list"> </io.ak1.BubbleTabBar>
Inflate menu list
<menuxmlns:android="http://schemas.android.com/apk/res/android"> <itemandroid:id="@+id/home"android:icon="@drawable/ic_grid"android:title="Home"android:checked="true"android:color="@color/home"/> <itemandroid:id="@+id/log"android:icon="@drawable/ic_clock"android:title="Logger"android:color="@color/logger"/></menu>
Add onclick listener
bubbleTabBar.addBubbLeListener(object:OnBubbleClickListener{overridefunonBubbleClick(id:Int) { } })
Connect with components likeViewPager,ViewPager2 andNavController
viewPager.addOnPageChangeListener(object:ViewPager.OnPageChangeListener {overridefunonPageScrolled(position:Int,positionOffset:Float,positionOffsetPixels:Int ) { }overridefunonPageSelected(position:Int) { bubbleTabBar.setSelected(position,false) }overridefunonPageScrollStateChanged(state:Int) { } })
viewPager2.registerOnPageChangeCallback(object:ViewPager2.OnPageChangeCallback() {overridefunonPageSelected(position:Int) {super.onPageSelected(position) bubbleTabBar.setSelected(position) } })
onNavDestinationSelected can be found inhere
bubbleTabBar.addBubbleListener { id-> bubbleTabBar.onNavDestinationSelected(id, navController) } navController.addOnDestinationChangedListener { _, destination, _-> setSelectedWithId(destination.id,false) }
Thanks toAriana for transition in sample
include in app level build.gradle
repositories { mavenCentral() }
implementation'io.ak1:bubbletabbar:1.0.8'
or Maven:
<dependency> <groupId>io.ak1</groupId> <artifactId>bubbletabbar</artifactId> <version>1.0.8</version> <type>pom</type> </dependency>
or ivy:
<dependencyorg='io.ak1'name='bubbletabbar'rev='1.0.8'> <artifactname='bubbletabbar'ext='pom' ></artifact> </dependency>
Licensed under the Apache License, Version 2.0,click here for the full license.
This project was created byAkshay Sharma.
If you appreciate my work, consider buying me a cup of ☕ to keep me recharged 🤘 byPayPal
I love using my work and I'm available for contract work. Freelancing helps to maintain and keepmy open source projects up to date!
About
BubbleTabBar is a bottom navigation bar with customizable bubble-like tabs
Topics
Resources
License
Code of conduct
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Contributors6
Uh oh!
There was an error while loading.Please reload this page.