Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oneHamidreza/MeowBottomNavigation
Android Meow Bottm Navigation
https://github.com/oneHamidreza/MeowBottomNavigation
android bottomnavigationview curved library material navigaion
Last synced: about 2 months ago
JSON representation
Android Meow Bottm Navigation
- Host: GitHub
- URL: https://github.com/oneHamidreza/MeowBottomNavigation
- Owner: oneHamidreza
- Created: 2019-02-10T09:11:55.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-06T05:46:36.000Z (about 1 year ago)
- Last Synced: 2024-08-01T01:28:53.825Z (4 months ago)
- Topics: android, bottomnavigationview, curved, library, material, navigaion
- Language: Kotlin
- Homepage: http://etebarian.com
- Size: 3.93 MB
- Stars: 1,312
- Watchers: 14
- Forks: 198
- Open Issues: 43
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-kotlin - MeowBottomNavigation - Android Meow Bottm Navigation (Libraries)
README
# Meow Bottom Navigation
A simple & curved & material bottom navigation for Android written in **Kotlin** with β₯ .![](https://github.com/shetmobile/MeowBottomNavigation/raw/master/resources/Preview.gif)
## Download
Update your `build.gradle` (project path) like below :
```groovy
buildscript {
repositories {
jcenter()
}
}
```Update your `build.gradle` (module path) like below :
```groovy
dependencies {
implementation 'com.etebarian:meow-bottom-navigation:1.3.1'
}
```Use androidx by adding this lines to `gradle.properties`. If you want more info, just google **AndroidX**.
```properties
android.useAndroidX=true
android.enableJetifier=true
```If you want to add this library to a JAVA Project, you must add kotlin library to `build.gradle`.
```groovy
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61"
}
```
## π Donate & SupportWe are developing this framework in open source community without financial planning but the maintenance & preparing updates at periodic times is Time-consuming.
If you like this project and you want to give us peace of mind, you can support us by clicking this button :## Usage
Add Meow Bottom Navigation in you layout xml file.
```xml
```
Add menu items in code.
```kotlin
val bottomNavigation = findView(R.id.bottomNavigation)
bottomNavigation.add(MeowBottomNavigation.Model(1, R.drawable.ic_home))
bottomNavigation.add(MeowBottomNavigation.Model(2, R.drawable.ic_explore))
bottomNavigation.add(MeowBottomNavigation.Model(3, R.drawable.ic_message))
```Add vectorDrawables.useSupportLibrary = true to your build.gradle inside `defaultConfig{ ... }` to use vector drawable icons.
## Customization
```xml
```
- You can change this properties in **Kotlin/Java** Realtimeβ.
## Listeners
Use `setOnShowListener()` function to access when a cell has been shown.
```kotlin
bottomNavigation.setOnShowListener {
// YOUR CODES
}
```Use `setOnClickMenuListener()` function to access when a cell has been clicked.
```kotlin
bottomNavigation.setOnClickMenuListener {
// YOUR CODES
}
```If you are Java Developer, use this examples :
```java
bottomNavigation.setOnClickMenuListener(new Function1() {
@Override
public Unit invoke(MeowBottomNavigation.Model model) {
// YOUR CODES
return null;
}
});bottomNavigation.setOnShowListener(new Function1() {
@Override
public Unit invoke(MeowBottomNavigation.Model model) {
// YOUR CODES
return null;
}
});
```## Counter Badge
Set counter badge on a specific cell by `setCount(Int,String)`.
```kotlin
bottomNavigation.setCount(CELL_ID, YOUR_STRING)
```Clear counter badge on a specific cell by `clearCount(Int)`.
```kotlin
bottomNavigation.clearCount(CELL_ID)
```Clear all counter badges on a specific cell by `clearCount(Int)`.
```kotlin
bottomNavigation.clearAllCounts(TAB_ID)
```## Set Default CELL
Use this function :
```kotlin
bottomNavigation.show(CELL_ID)
```