• Stars
    star
    498
  • Rank 88,494 (Top 2 %)
  • Language
    Kotlin
  • License
    Apache License 2.0
  • Created over 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Animated TabBar with native control and Jetpack Navigation support..โœจ๐Ÿ”–๐Ÿš€

alt text

SSCustomBottomNavigation

Kotlin Version Platform API Android Arsenal

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


demo_data

Reverse Curve

demo_data

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 block
      pluginManagement {
        repositories {
        ...
        maven { url 'https://jitpack.io' }
        }
    }
    
  • Add the dependency in your app's build.gradle file

     dependencies {
     	implementation 'com.github.simformsolutions:SSCustomBottomNavigation:3.6'
     }
    

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


alt text

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:

  1. 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
  1. In your onCreate() of Activity create a list of CbnMenuItem that you want to appear in the SSCustomBottomNavigation.

  2. 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 โค๏ธ 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.
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


Find this library useful? โค๏ธ

Support it by joining stargazers for this repository. โญ

iOS Library.

  • Check our iOS Library also on Github

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.

More Repositories

1

flutter_showcaseview

Flutter plugin that allows you to showcase your features on flutter application. ๐Ÿ‘Œ๐Ÿ”๐ŸŽ‰
Dart
1,490
star
2

SSComposeCookBook

A Collection of major Jetpack compose UI components which are commonly used.๐ŸŽ‰๐Ÿ”๐Ÿ‘Œ
Kotlin
634
star
3

SSCustomTabbar

Simple Animated tabbar with native control
Swift
582
star
4

SSSpinnerButton

Forget about typical stereotypic loading, It's time to change. SSSpinnerButton is an elegant button with a different spinner animations.
Swift
428
star
5

flutter_credit_card

A credit card widget for Flutter application.
Dart
419
star
6

flutter_calendar_view

A Flutter package allows you to easily implement all calendar UI and calendar event functionality. ๐Ÿ‘Œ๐Ÿ”๐ŸŽ‰
Dart
416
star
7

SSffmpegVideoOperation

This is a library of FFmpeg for android... ๐Ÿ“ธ ๐ŸŽž ๐Ÿš‘
Kotlin
352
star
8

flutter_chatview

Highly customisable chat UI with reply and reaction functionality.
Dart
288
star
9

SSJetPackComposeProgressButton

SSJetPackComposeProgressButton is an elegant button with a different loading animations. ๐Ÿš€
Kotlin
285
star
10

SSImagePicker

Easy to use and configurable library to Pick an image from the Gallery or Capture an image using a Camera... ๐Ÿ“ธ
Kotlin
285
star
11

SSToastMessage

SSToastMessage is written purely in SwiftUI. It will add toast, alert, and floating message view over the top of any view. It is intended to be simple, lightweight, and easy to use. It will be a popup with a single line of code.
Swift
280
star
12

audio_waveforms

Use this plugin to generate waveforms while recording audio in any file formats supported by given encoders or from audio files. We can use gestures to scroll through the waveforms or seek to any position while playing audio and also style waveforms
Dart
277
star
13

ARKit2.0-Prototype

After Appleโ€™s introduction of ARKit 2, we have been consistently working behind to create shared-AR experiences. Our goal is to improve the utility of mobile using AR experiences.
Swift
261
star
14

react-native-story-view

A React Native component to show image and video stories โœจ ๐ŸŽ–
TypeScript
219
star
15

SSCustomEditTextOutLineBorder

Same as the Outlined text fields presented on the Material Design page but with some dynamic changes. ๐Ÿ“ ๐ŸŽ‰
Kotlin
207
star
16

Awesome-Mobile-Libraries

This repo contains all the Open-source Libraries from iOS, Android, Flutter and React-Native.โœจ
174
star
17

react-native-reactions

A React Native animated reaction picker component โœจโœจ
TypeScript
146
star
18

react-native-radial-slider

React Native component to select or highlight a specific value from a range of values ๐Ÿ‘Œ โœจ
TypeScript
139
star
19

SSPullToRefresh

SSPullToRefresh makes PullRefresh easy to use, you can provide your own custom animations or set simple gifs on refresh view. The best feature is Lottie animations in refresh view, it uses lottie animations to render high quality animations on pull refresh. ๐ŸŽ‰๐Ÿ’ฅ
Kotlin
121
star
20

react-native-audio-waveform

React Native component to show audio waveform with ease in react native application โœจ
TypeScript
120
star
21

react-native-spinner-button

React Native button component with multiple animated spinners
JavaScript
106
star
22

SSComposeShowCaseView

SSComposeShowCaseView is a customizable show case view library in Jetpack compose which allows to showcase/highlight the particular features of the application with an engaging overlay. It also provides automatic showcase view feature with customised delay and opacity attributes. ๐ŸŽ‰๐Ÿ’ฅ
Kotlin
105
star
23

SSBiometricsAuthentication

Biometric factors allow for secure authentication on the Android platform.
Kotlin
102
star
24

react-native-animation-catalog

A collection of animated React Native components ๐ŸŒŸ๐Ÿ”ฅ
TypeScript
91
star
25

SSJetpackComposeSwipeableView

SSJetpackComposeSwipeableView is a small library which provides support for the swipeable views. You can use this in your lazyColumns or can add a simple view which contains swipe to edit/delete functionality.
Kotlin
91
star
26

SSSwiftUIGIFView

SSSwiftUIGIFView is a custom controller designed to help load GIFs in SwiftUI. It supports loading GIFs from remote URLs, is compatible with both iOS and macOS, and implements a caching mechanism to improve loading times and reduce data usage.
Swift
85
star
27

Kotlin-multiplatform-sample

A sample Kotlin Multiplatform project having native UI and shared bussiness logic on Android and iOS platforms.
Kotlin
84
star
28

SSCustomTabMenu

Customisable iOS bottom menu works like Tabbar
Swift
80
star
29

SSAndroidNeumorphicKit

Neomorphic UI kit for Android
Kotlin
72
star
30

SSCustomPullToRefresh

SSCustomPullToRefresh is an open-source library that uses UIKit to add an animation to the pull to refresh view in a UITableView and UICollectionView.
Swift
69
star
31

SSStepper

SwiftUI package for creating custom stepper with gesture controls and flexible design as per your choice.
Swift
67
star
32

SSAppUpdater

SSAppUpdater is an open-source framework that compares the current version of the app with the store version and returns the essential details of it like app URL, new app version number, new release note, etc. So you can either redirect or notify the user to update their app.
Swift
67
star
33

VonageVideoCalling_Android

Vonage Video Calling Android
Kotlin
64
star
34

SSExpandableRecylerView

Expandable Recyclerview makes it easy to integrate nested recycler view...๐Ÿ”จ ๐Ÿ“
Kotlin
59
star
35

SSCustomSideMenu

Side Menu Custom Control for iOS apps
Swift
57
star
36

react-native-skia-catalog

A collection of animated React Native Skia components ๐ŸŒŸ
TypeScript
56
star
37

SSArcSeekBar

Different type of arc seekbar. Easy to use and configure your own seekbar using all the attributes.
Kotlin
52
star
38

SSPlaceHolderTableView

SSPlaceholderTableView is Placeholder Library for different different state wise placeHolder for UITableView/UICollectionView. Check https://www.cocoacontrols.com/controls/ssplaceholdertableview
Swift
50
star
39

SSComposeOTPPinView

A custom OTP view to enter a code usually used in authentication. It includes different types of OTPViews which is easy to use and configure your own view and character of OTP using all the attributes. ๐Ÿ“ฒ ๐Ÿ”ข โœจ
Kotlin
50
star
40

react-native-tree-selection

A high-performance and lightweight tree selection library for React Native๐ŸŽ–
TypeScript
45
star
41

SSVerticalPanoramaImage

Capture stunning vertical panorama images with ease and preview them instantly on the built-in screen.
Swift
44
star
42

SSFloatingLabelTextField

Swift
44
star
43

SSLineChart

SSLineChart provides you with the additional functionality of gradient color fill which cannot be found in any library specially Watchkit Libraries.
Swift
44
star
44

SSSwiftUISpinnerButton

SSSwiftUISpinnerButton is a collection of various spinning animations for buttons in SwiftUI.
Swift
43
star
45

SSNaturalLanguage

Swift
42
star
46

react-native-photos-gallery

A React Native custom animated photo gallery component to open and view photos โœจ
TypeScript
41
star
47

react-native-country-code-select

A React Native component that allows users to select a country code โœจ ๐Ÿ”ฅ
TypeScript
41
star
48

react-native-sticky-table

React Native sticky table component to elevate the app's data presentation and visualization experience โœจ
TypeScript
40
star
49

Jetpack-compose-sample

Forget about bunch of XML files for maintaining UIs. Jetpack Compose is Androidโ€™s modern toolkit for building native UI. Here is a small example to get started.
Kotlin
38
star
50

SSMediaLibrary

Swift
38
star
51

SSCircularSlider

A simple, powerful and fully customizable circular slider, written in swift.
Swift
37
star
52

react-native-images-preview

A React Native animated custom image preview component โœจ
TypeScript
36
star
53

SSCalendarControl

SSCalendarControl is small and highly customizable calendar control written in swift.
Swift
35
star
54

SSNeumorphicKit

Swift
35
star
55

SSSwiftyGo

Swift
35
star
56

flutter_vonage_video_call_demo

This application provides demo of one to one video call using Vonage Video API. Since there is no office support for flutter from voyage, this demo uses platform channel to communicate with native voyage SDK.
Kotlin
35
star
57

SSMultiSwipeCellKit

Swift
34
star
58

SSSwiper

SSSwiper is used to create swipe gestures action inside any view just by adding a modifier to the View with various customization options
Swift
31
star
59

SS-iOS-Animations

Elevate your app's user interface with stunning and smooth animations! This library offers easy-to-use animations for both SwiftUI beginners and pros. Enhance your app with cool transitions, fun effects, and interactive touches. Integrating these animations is simpleโ€”just follow a few steps to add the code and bring your project to life.
Swift
31
star
60

Fitness-App-ARKit

Fitness App build with ARKit.
Swift
30
star
61

tesseract-OCR-iOS-demo

This prototype is to recognize text inside the image and for that it uses Tesseract OCR. The underlying Tesseract engine will process the picture and return anything that it believes is text.
Swift
30
star
62

SSStoryStatus

SSStoryStatus: Elevate your SwiftUI projects with seamless user list integration and captivating story displays. Empowering developers with effortless integration and complete UI customization, this versatile library makes showcasing stories a breeze.
Swift
30
star
63

SSSwiftUISideMenu

SSSwiftUISideMenu: Your ultimate iOS side menu companion. This customizable and intuitive library facilitates seamless navigation within your app, offering left and right panel support. Effortlessly integrate and personalize UI elements and animation styles to elevate your user experience.
Swift
27
star
64

SSInstaFeedParser

A Flutter package allows you to fetch basic data from a Instagram profile url which is public and verified.
Dart
25
star
65

react-native-graph-kit

Personalized graphs featuring customizable options for React Native app ๐Ÿ“ˆ
TypeScript
23
star
66

SSFacebookLogin

The Reusable Facebook Login Components for iOS is the easiest way to get data from Facebook.
Swift
22
star
67

SSSceneFormSdkSample

This is an Augmented Reality Android app that is made by using ARcore and Sceneform SDK. ๐Ÿ“ธ ๐ŸŽ‰
Kotlin
20
star
68

battleship_flutter_flame

Dart
20
star
69

react-native-infinite-wheel-picker

Customizable wheel picker component for React Native, enabling infinite scrolling and intuitive item selection โœจ
TypeScript
18
star
70

SSSwiftUILoader

A customisable, simple and elegant loader in SwiftUI.
Swift
15
star
71

SSCustomCameraControl

Custom camera control
Kotlin
15
star
72

Kotlin-Extensions

Library contains common extensions for Android
Kotlin
15
star
73

SSSwiftUIVideoLayerView

SSSwiftUIVideoPlayerLayer is a custom controller which helps to load video in SwiftUI.
Swift
14
star
74

SSProgressBar

Customizable progressbar
Swift
14
star
75

SSGoogleLogin

The GoogleSigninReusabelComponets for iOS is the easiest way to get data from Google .
Swift
14
star
76

CMPedometerDemo

Let's count steps using CMPedometer
Swift
14
star
77

SSAudioRecorderWithWaveForm

SSAudioRecorderWithWaveForm is recording audio with wave form. ๐ŸŽ‰๐ŸŽค
Kotlin
13
star
78

CreateFirebaseDynamicLinks

Swift
10
star
79

ios-commons

added few old helpers (need to updated) as initial version to work on
Swift
9
star
80

SSTwitterLogin

The reusable Twitter login components for iOS is the easiest way to get data from Twitter.
Swift
9
star
81

Workouts-TV-app

Swift
8
star
82

Game-With-AR

Swift
8
star
83

flutter_project_template

Dart
7
star
84

SSLinkedIn

Objective-C
7
star
85

MVVMListDemo

Swift
7
star
86

iOS-BarcodeScan

Objective-C
6
star
87

android-demos

Kotlin
5
star
88

SSSwiftUIVideoPlayerLayer

Swift
4
star
89

react-native-downloader

A audio video file downloader app with foreground and background download support
JavaScript
4
star
90

flutter_ss_placeholder_view

A Flutter package allows you to add placeholder content while loading or empty items.๐Ÿšง
Dart
4
star
91

NewsApp-RIBs

News app with Listview and Pageview using uber's RIBs Architecture
Swift
3
star
92

SwiftUI-Combine-MVVM

Swift
3
star
93

MVVMDemo

Architecture of iOS Application, Swift
Swift
2
star
94

BiometricReactNative

Biometric authentication with react-native app
JavaScript
2
star
95

DFPDemo

For showing Ad's , Swift
Swift
2
star
96

Kotlin-CoRoutines

Kotlin
2
star
97

QualityCodeSample

Swift
2
star
98

Android_Project_Setup

Kotlin
2
star
99

GoogleLogin

Swift
2
star
100

android_simform_sample_app

The sample app uses Github's GraphQL APIs to query the Simform's Github repositories and list them using compose views in the Android application.
Kotlin
2
star