Description
SSCustomBottomNavigation is a customizable bottom bar library with curved animations.
The actual features are:
- Bottom Bar which have customizable text, color, background, icon.
- Animated wave with customizable height
Check our iOS Library also on https://github.com/simformsolutions/SSCustomTabbar
SSCustomBottomNavigation alternatives and similar packages
Based on the "Kotlin" category.
Alternatively, view SSCustomBottomNavigation alternatives based on common mentions on social networks and blogs.
-
CalendarView
A highly customizable calendar view and compose library for Android. -
android-youtube-player
YouTube Player library for Android and Chromecast, stable and customizable. -
Balloon
:balloon: Modernized and sophisticated tooltips, fully customizable with an arrow and animations for Android. -
Kotterknife
Android view injection writen in Kotlin based on ButterKnife -
Shortbread
Android library that creates app shortcuts from annotations -
kotlin-android-template
Android + Kotlin + Github Actions + ktlint + Detekt + Gradle Kotlin DSL + buildSrc = β€οΈ -
NotyKT ποΈ
π NotyKT is a complete πKotlin-stack (Backend + Android) π± application built to demonstrate the use of Modern development tools with best practices implementationπ¦Έ. -
Material Chip View
Material Chip view. Can be used as tags for categories, contacts or creating text clouds -
DrawableToolbox
π οΈ The missing drawable toolbox for Android. Create drawables programmatically and get rid of the boring and always repeated drawable.xml files. -
Navigation Toolbar for Android
:octocat: Navigation toolbar is a slide-modeled UI navigation controller made by @Ramotion -
CodeView
Display code with syntax highlighting :sparkles: in native way. -
Time
Type-safe time calculations in Kotlin, powered by generics. -
Appyx
Model-driven navigation + UI components with gesture control for Compose Multiplatform -
Carousel Recyclerview
Carousel Recyclerview let's you create carousel layout with the power of recyclerview by creating custom layout manager. -
Capturable
πJetpack Compose utility library for capturing Composable content and transforming it into Bitmap ImageπΌοΈ -
Pluto Debug Framework
Android Pluto is a on-device debugging framework for Android applications, which helps intercept Network calls, capture Crashes & ANRs, manipulate application data on-the-go, and much more. -
Pdf Viewer For Android
A Lightweight PDF Viewer Android library which only occupies around 125kb while most of the Pdf viewer occupies up to 16MB space. -
CrunchyCalendar β awesome calendar widget for android apps
A beautiful material calendar with endless scroll, range selection and a lot more! -
Yasha
A DSL library for rendering RecyclerView and ViewPager. -
Android Kotlin Samples
Some basic samples of Kotlin for Android -
MaterialTimelineView
With MaterialTimelineView you can easily create a material looking timeline. -
SSComposeCookBook
A Collection of major Jetpack compose UI components which are commonly used.πππ -
MaterialDrawerKt
A Kotlin DSL wrapper around the mikepenz/MaterialDrawer library. -
sliding-panel
Android sliding panel that is part of the view hierarchy, not above it. -
Transition X
{ } Declarative Kotlin DSL for choreographing Android transitions -
Only
:bouquet: An easy way to persist and run code block only as many times as necessary on Android. -
Permission Flow for Android
Know about real-time state of a Android app Permissions with Kotlin Flow APIs. -
Swagger Gradle Codegen
π« A Gradle Plugin to generate your networking code from Swagger -
EasyPermissions-ktx
π Kotlin version of the popular google/easypermissions wrapper library to simplify basic system permissions logic on Android M or higher. -
Nextflix-Composable
Includes jetpack compose, navigation, paging, hilt, retrofit, coil, coroutines, flow.. -
Awesome Jetpack compose
A collaborative list of awesome jetpack compose resources. -
DeviceInfo-Sample
[Android Library] Get easy access to device information super fast, real quick -
Aimybox voice assistant
Embeddable custom voice assistant for Android applications -
CameraViewEx
Easy Android camera integration, advanced features. -
Intro Showcase View
Highlight different features of the app using Jetpack Compose -
ZoomHelper
ZoomHelper will make any view to be zoomable just like Instagram pinch-to-zoom -
Events Calendar
Events Calendar is a user-friendly library that helps you achieve a cool Calendar UI with events mapping. You can customise every pixel of the calendar as per your wish and still achieve in implementing all the functionalities of the native android calendar in addition with adding dots to the calendar which represents the presence of an event on the respective dates. It can be done easily, you are just a few steps away from implementing your own badass looking Calendar for your very own project! -
Mutekt
Simplify mutating "immutable" state models (a Kotlin multiplatform library) -
Compose Compiler Reports to HTML Generator
A utility (Gradle Plugin + CLI) to convert Jetpack Compose compiler metrics and reports to beautified HTML page. -
SSCustomEditTextOutLineBorder
Same as the Outlined text fields presented on the Material Design page but with some dynamic changes. π π -
Maildroid
Maildroid is a small robust android library for sending emails using SMTP server -
Turtle π’
Run shell commands from Kotlin scripts, apps or Gradle tasks with ease. -
Vanilla Place Picker
Simple(vanilla) yet 'Do it all' place picker for your place picking needs in Android -
TimelineView
A customizable and easy-to-use Timeline View library for Android. Works as a RecyclerView decorator (ItemDecoration) -
Crowdin Android SDK
Crowdin Android SDK delivers all new translations from Crowdin project to the application immediately -
MidJourney Images Compose Multiplatform Mobile Application
This application is developed to display the images created by MidJourney. The application is developed with Compose Multiplatform and works on many platforms including Android and iOS platforms.
Appwrite - The open-source backend cloud platform
Do you think we are missing an alternative of SSCustomBottomNavigation or a related project?
README
SSCustomBottomNavigation
Getting Started
SSCustomBottomNavigation is a customizable bottom bar library with curved animations and Jetpack Navigation support.
The actual features are:
- Bottom Bar which have customizable text, color, background, icon.
- Animated wave with customizable height
- Native control and Jetpack Navigation support
Demo
Reverse Curve
Gradle Dependency
Add it in your root build.gradle at the end of repositories:
- For Gradle version 5.x.x or less
allprojects { repositories { ... maven { url 'https://jitpack.io' } } }
- For Gradle version 6.x.x and above, in settings.gradle file inside
pluginManagement
blockpluginManagement { repositories { ... maven { url 'https://jitpack.io' } } }
- For Gradle version 5.x.x or less
Add the dependency in your app's build.gradle file
dependencies { implementation 'com.github.simformsolutions:SSCustomBottomNavigation:3.4' }
All Attributes
Attribute | Description | Default |
---|---|---|
app:ss_defaultIconColor |
Set Default Icon Color | #757575 |
app:ss_selectedIconColor |
Set Selected Icon Color | #00C957 |
app:ss_iconTextColor |
Set Bottom Bar Text Color | #003F87 |
app:ss_iconTextTypeface |
Set Bottom Bar Fonts | #none |
app:ss_selectedIconTextColor |
Set Bottom Bar Selected Text Color | #003F87 |
app:ss_iconTextSize |
Set Bottom Bar Text size | 10sp |
app:ss_waveHeight |
Set Wave Height | 7 |
app:ss_backgroundBottomColor |
Set Background Color for Bottom Bar | #FF5733 |
app:ss_countBackgroundColor |
Set Background Color for Notification Badge | #ff0000 |
app:ss_countTextColor |
Set Notification Badge text Color | #9281c1 |
app:ss_countTypeface |
Set Font for Notification Badge | none |
app:ss_rippleColor |
Set Ripple Color | #757575 |
app:ss_shadowColor |
Set Bottom Bar Shadow Color | shadowColor |
app:ss_reverseCurve |
Set Reverse Bzier Curve | false |
Customization
Usage
<com.simform.custombottomnavigation.SSCustomBottomNavigation
android:id="@+id/bottomNavigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
app:ss_backgroundBottomColor="#ffffff"
app:ss_circleColor="#ff6f00"
app:ss_waveHeight="7"
app:ss_countBackgroundColor="#ff6f00"
app:ss_countTextColor="#ffffff"
app:ss_countTypeface="fonts/graphik_semibold.ttf"
app:ss_defaultIconColor="#6200EE"
app:ss_iconTextColor="#6200EE"
app:ss_iconTextTypeface="fonts/graphik_semibold.ttf"
app:ss_rippleColor="#2f424242"
app:ss_iconTextSize="14sp"
app:ss_selectedIconColor="#ff6f00"
app:ss_selectedIconTextColor="#ff6f00"
app:ss_shadowColor="#1f212121" />
Setup in Code for Jetpack Navigation Support:
First of all, you need to pass activeIndex and which is bottom index only :(Without this it is 0 by default, here I passed 2 means it will start with 2nd position)
val activeIndex = savedInstanceState?.getInt("activeIndex") ?: 2
In your onCreate() of Activity create a list of CbnMenuItem that you want to appear in the SSCustomBottomNavigation.
Then pass the list to the setMenuItems() function that also takes activeIndex(which is 0 by default, and you need to pass specific index if you don't want to start with 0 position) from which you can control which position item should be active when it is initialized.
private fun setBottomNavigationWithNavController(savedInstanceState: Bundle?) {
val activeIndex = savedInstanceState?.getInt("activeIndex") ?: 2
val navController = findNavController(R.id.nav_host_fragment)
// Passing each menu ID as a set of Ids because each
// menu should be considered as top level destinations.
val appBarConfiguration = AppBarConfiguration(
setOf(
R.id.navigation_home,
R.id.navigation_favorite,
R.id.navigation_chat,
R.id.navigation_notifications,
R.id.navigation_profile
)
)
setupActionBarWithNavController(navController, appBarConfiguration)
val menuItems = arrayOf(
Model(
icon = R.drawable.ic_home, // Icon
destinationId = R.id.navigation_home, // destinationID
id = 0, // ID
text = R.string.title_home, // Icon with Text, If you don't want text then don't pass it
count = R.string.empty_value // notification count if you want to show then pass specific count else pass R.string.empty_value or don't pass anything
),
Model(
icon = R.drawable.ic_favorite_border_black,
destinationId = R.id.navigation_favorite,
id = 1,
text = R.string.title_favorite
// notification count not needed here so, not passed
),
Model(
R.drawable.ic_message,
R.id.navigation_chat,
2,
R.string.title_chat,
R.string.empty_value
),
Model(
R.drawable.ic_notification,
R.id.navigation_notifications,
3,
R.string.title_notifications,
R.string.count
),
Model(
R.drawable.ic_account,
R.id.navigation_profile,
4,
R.string.title_profile,
R.string.empty_value
)
)
binding.bottomNavigation.apply {
setMenuItems(menuItems, activeIndex)
setupWithNavController(navController)
}
}
Handling Navigation with Listener
To listen whenever the menu item is clicked you can pass a lambda to setOnMenuItemClickListener
.
binding.navView.setOnMenuItemClickListener { cbnMenuItem, index ->
// handle your own navigation here
}
Handling Navigation with Jetpack Navigation
If you are like :heart: Jetpack then there is a method called setupWithNavController()
that accepts NavController
and will handle the navigaiton for you. Just don't forget to pass the id
of the destination when you are creating CbnMenuItem
.
binding.navView.setupWithNavController(navController)
Manually setting the active item
If you need to manually set the active item you can call the onMenuItemClick()
function and pass the index that you would like to be selected.
binding.navView.onMenuItemClick(4)
Manually change notification count
- If you want to change notification count manually or after bottom navigation initialization done call the
setCount()
function and pass the index and updated count.kotlin setCount(4, R.string.count_update)
Handling configuration changes
- Due to animations, you need to manually handle the configuration changes. You can refer to the sample app for simple implementation.
Setup in Code for without Jetpack Navigation Support(Normal way):
Old way : (2.1 version)
binding.bottomNavigation.apply {
add(
SSCustomBottomNavigation.Model(
ID_HOME,
R.drawable.ic_home,
"Home"
)
)
add(
SSCustomBottomNavigation.Model(
ID_EXPLORE,
R.drawable.ic_heart,
"Favorite"
)
)
add(
SSCustomBottomNavigation.Model(
ID_MESSAGE,
R.drawable.ic_message,
"Chat"
)
)
add(
SSCustomBottomNavigation.Model(
ID_NOTIFICATION,
R.drawable.ic_notification,
"Notification"
)
)
}
New Way: (If you use latest version then you need to change your implementation) (>= 3.0 version)
companion object {
private const val ID_HOME = 0
private const val ID_EXPLORE = 1
private const val ID_MESSAGE = 2
private const val ID_NOTIFICATION = 3
private const val ID_ACCOUNT = 4
}
private fun setBottomNavigationInNormalWay(savedInstanceState: Bundle?) {
val activeIndex = savedInstanceState?.getInt("activeIndex") ?: ID_MESSAGE
binding.bottomNavigation.apply {
// If you don't pass activeIndex then by pass 0 here or call setSelectedIndex function only
// setSelectedIndex() // It will take 0 by default
setSelectedIndex(activeIndex)
add(
Model(
icon = R.drawable.ic_home,
id = ID_HOME,
text = R.string.title_home,
)
)
add(
Model(
icon = R.drawable.ic_favorite_border_black,
id = ID_EXPLORE,
text = R.string.title_favorite,
count = R.string.empty_value
)
)
}
}
Credits
- This library was inspired by:
Find this library useful? :heart:
Support it by joining stargazers for this repository. :star:
iOS Library.
- Check our iOS Library also on Github
Awesome Mobile Libraries
- Check out our other available awesome mobile libraries
License
Copyright 2020 Simform Solutions
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*Note that all licence references and agreements mentioned in the SSCustomBottomNavigation README section above
are relevant to that project's source code only.