/ Navigation

An Android library to make Shaped NavigationViews inside your Android applications

An Android library to make Shaped NavigationViews inside your Android applications

ShapedNavigationView

This is an Android library to make Shaped NavigationViews inside your Android applications.

Usage

<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:openDrawer="start">
    
    ...

    <softpro.naseemali.ShapedNavigationView
        android:id="@+id/nav_view"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:fitsSystemWindows="true"
        android:background="@android:color/white"
        app:itemBackground="@android:color/white"
        app:headerLayout="@layout/nav_header_main"
        app:drawerShape="waves_indefinite"
        android:layout_gravity="start"
        app:menu="@menu/activity_main_drawer" />

</android.support.v4.widget.DrawerLayout>

With Java Code

	navigationView = (ShapedNavigationView) findViewById(R.id.nav_view);
        navigationView.getSettings().setShapeType(ShapedViewSettings.WAVES);

Download

Step 1. Add the JitPack repository to your Project build.gradle file

	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

Step 2. Add the dependency to your App build.gradle file

	dependencies {
	        compile 'com.github.naseemali925:ShapedNavigationView:1.0.0'
	}

Values Table

AttributeValueShape Type
drawerShapearcConvex
drawerShapearcConcave
drawerShaperoundedRect
drawerShapewaves
drawerShapebottom_round
drawerShapefull_round
drawerShapewaves_indefinite

Sample App

You can check out the sample app

GitHub