Skip to content

Commit

Permalink
Update README file
Browse files Browse the repository at this point in the history
  • Loading branch information
andremion committed Aug 11, 2016
1 parent aeedbf4 commit a996aac
Showing 1 changed file with 37 additions and 37 deletions.
74 changes: 37 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,55 @@
# Floating Navigation View

A simple Floating Action Button that shows an anchored Navigation View
A simple Floating Action Button that shows an anchored Navigation View and was inspired by [Menu Material Fixed](http://www.uplabs.com/posts/menu-material-fixed) created by [Tommaso Poletti](http://www.uplabs.com/tomma5o)

![Sample](https://raw.githubusercontent.com/andremion/Floating-Navigation-View/master/art/sample.gif)

## Inspiration

This library was inspired by [Menu Material Fixed](http://www.uplabs.com/posts/menu-material-fixed) created by [Tommaso Poletti](http://www.uplabs.com/tomma5o)

## Installation

Include the library in your `build.gradle`

dependencies{
compile 'com.github.andremion:floatingnavigationview:1.0.0'
}
```groovy
dependencies{
compile 'com.github.andremion:floatingnavigationview:1.0.0'
}
```

or in your `pom.xml` if you are using Maven

<dependency>
<groupId>com.github.andremion</groupId>
<artifactId>floatingnavigationview</artifactId>
<version>1.0.0</version>
</dependency>
```xml
<dependency>
<groupId>com.github.andremion</groupId>
<artifactId>floatingnavigationview</artifactId>
<version>1.0.0</version>
</dependency>
```

## Usage

<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">

...

<com.andremion.floatingnavigationview.FloatingNavigationView
android:id="@+id/floating_navigation_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/fab_margin"
app:layout_anchor="@id/toolbar"
app:layout_anchorGravity="bottom|end"
app:drawMenuBelowFab="true"
app:headerLayout="@layout/navigation_view_header"
app:menu="@menu/menu_navigation_view" />

</android.support.design.widget.CoordinatorLayout>
```xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">

...

<com.andremion.floatingnavigationview.FloatingNavigationView
android:id="@+id/floating_navigation_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/fab_margin"
app:layout_anchor="@id/toolbar"
app:layout_anchorGravity="bottom|end"
app:drawMenuBelowFab="true"
app:headerLayout="@layout/navigation_view_header"
app:menu="@menu/menu_navigation_view" />

</android.support.design.widget.CoordinatorLayout>
```

###Custom attributes

Expand All @@ -60,8 +62,6 @@ or in your `pom.xml` if you are using Maven
3. If menu must be drawn below the FAB
`<attr name="drawMenuBelowFab" format="boolean" />`

You can explore more in [the sample](https://github.com/andremion/Floating-Navigation-View/tree/master/sample/src/main/java/com/andremion/floatingnavigationview/sample)

## Libraries used in the project

* [Design Support Library](http://developer.android.com/intl/pt-br/tools/support-library/features.html#design)
Expand Down

0 comments on commit a996aac

Please sign in to comment.