From 435e3ac416af37f9dc86815475e9e1c3baef69e0 Mon Sep 17 00:00:00 2001 From: oneHamidreza Date: Fri, 26 Jun 2020 19:23:13 +0430 Subject: [PATCH] Released new version : v1.3.0 --- .../src/main/AndroidManifest.xml | 3 +- README.md | 84 +++++++++++++------ 2 files changed, 60 insertions(+), 27 deletions(-) diff --git a/MeowBottomNavigation/src/main/AndroidManifest.xml b/MeowBottomNavigation/src/main/AndroidManifest.xml index 493e5f9..5776f28 100644 --- a/MeowBottomNavigation/src/main/AndroidManifest.xml +++ b/MeowBottomNavigation/src/main/AndroidManifest.xml @@ -1,2 +1 @@ - + diff --git a/README.md b/README.md index 0d4207f..48bd8f4 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,10 @@ A simple & curved & material bottom navigation for Android written in **Kotlin** ![](https://github.com/shetmobile/MeowBottomNavigation/raw/master/resources/Preview.gif) - -> CAUTION : if you are **Java** developer and have problems with Kotlin, so check this link: https://github.com/oneHamidreza/MeowBottomNavigationJava - ## Download -build.gradle (project path) + +Update your `build.gradle` (project path) like below : + ```groovy buildscript { repositories { @@ -15,43 +14,63 @@ buildscript { } } ``` -build.gradle (module path) + +Update your `build.gradle` (module path) like below : + ```groovy dependencies { - implementation 'com.etebarian:meow-bottom-navigation:1.2.0' + implementation 'com.etebarian:meow-bottom-navigation:1.3.0' } ``` -Use androidx by adding this lines to gradle.properties. if you want more info, just google **AndroidX**. + +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. + +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 xml + +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)) ``` -Remember that icons must be vector drawable. -Add vectorDrawables.useSupportLibrary = true to your build.gradle inside defaultConfig{ ... } + +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 -kotlin + +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 } ``` -java + +If you are Java Developer, use this examples : + ```java bottomNavigation.setOnClickMenuListener(new Function1() { @Override @@ -99,23 +127,29 @@ bottomNavigation.setOnShowListener(new Function1