Giter Site home page Giter Site logo

mindinventory / liquidnavbar Goto Github PK

View Code? Open in Web Editor NEW
22.0 7.0 3.0 5.36 MB

LiquidNavBar library provides a bottom navigation view with smooth liquid animation.

Home Page: https://www.mindinventory.com/android-application-development.php

License: MIT License

Kotlin 96.85% Java 3.15%
android android-library kotlin bottomnavigationview bottomtabs tabs navbar navbar-animation kotlin-android tabbar

liquidnavbar's Introduction

Liquid NavBar

  • Liquid NavBar Provides a bottom navigation view with liquid animation.

    ezgif.com-gif-maker__3_

Usage

Dependencies

  • Step 1. Add the JitPack repository to your build file

    Add it in your root build.gradle at the end of repositories:

        allprojects {
    	    repositories {
                	...
    		maven { url 'https://jitpack.io' }
                	...
    	    }
        }
  • Step 2. Add the dependency

    Add it in your app module build.gradle:

        dependencies {
            ...
            implementation 'com.github.Mindinventory:LiquidNavBar:0.0.1'
            ...
        }

Implementation

  • Step 1. Create menu file("menu_bottom_navigation") with menu items.
<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <group android:checkableBehavior="single">
        <item
            android:id="@+id/nav_camera"
            android:icon="@drawable/home"
            android:title="@string/feed" />
        <item
            android:id="@+id/nav_gallery"
            android:icon="@drawable/ic_gallery"
            android:title="@string/gallery" />
        <item
            android:id="@+id/nav_slideshow"
            android:icon="@drawable/ic_favorite"
            android:title="@string/favorite" />
        <item
            android:id="@+id/nav_manage"
            android:icon="@drawable/ic_setting"
            android:title="@string/settings" />
    </group>

</menu>
  • Step 2. Add LiquidNavBar view in to your activity_main.xml:
<com.mindinventory.liquidnavbar.ui.LiquidNavBar 
	android:id="@+id/bottomNavigationView"
        android:layout_width="match_parent" 
	android:layout_height="match_parent"
        app:backgroundTintNavigation="@color/colorPrimary"
        app:layout_constraintBottom_toBottomOf="parent" 
	app:menu="@menu/menu_bottom_navigation" />
  • Step 3. Provide fragment's parent view and implement animation listener
  bottomNavigationView.setAnimationListener(container, object : ViewAnimationListener {
  override fun onAnimationStart(animation: Animation?) {

            }

            override fun onAnimationEnd(animation: Animation?, fragment: Fragment?) {
                fragment?.let { changeFragment(it) }
            }


            override fun onAnimationRepeat(animation: Animation?) {

            }
        })
  • Step 4. Implement navigation listener
  bottomNavigationView.setNavigationListener(object :
            LiquidNavBar.OnNavigationItemSelectListener {
            override fun onNavigationItemSelected(indexOfItemSelected: Int): Boolean {
                return true
            }

        })
Attributes Usage
app:backgroundTintNavigation Liquid Navbar background color

Requirements

  • minSdkVersion >= 21
  • Androidx

LICENSE!

LiquidNavBar is MIT-licensed

Let us know!

We’d be really happy if you send us links to your projects where you use our component. Just send an email to [email protected] And do let us know if you have any questions or suggestion regarding our work.

Please feel free to use this component and Let us know if you are interested to building Apps or Designing Products.

app development

liquidnavbar's People

Contributors

akashmi avatar nkgohil007 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.