Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/oneHamidreza/MeowBottomNavigation

Android Meow Bottm Navigation
https://github.com/oneHamidreza/MeowBottomNavigation

android bottomnavigationview curved library material navigaion

Last synced: about 1 month ago
JSON representation

Android Meow Bottm Navigation

Awesome Lists containing this project

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 & Support

We 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)
```