GithubHelp home page GithubHelp logo

irmobydick / materialdrawer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mikepenz/materialdrawer

0.0 1.0 0.0 6.62 MB

A simple take on creating a easy to use and fast material drawer implementation

Home Page: http://mikepenz.github.io/MaterialDrawer

License: Apache License 2.0

Java 100.00%

materialdrawer's Introduction

#MaterialDrawer Maven Central Android Arsenal

The MaterialDrawer library aims to provide a quick and easy Activity to create and implement a drawer layout in your application.

Here's a quick overview of functions it include:

  • easy integration
  • quick and simple api
  • follows the Google Material Design Guidelines
  • modify the colors on the go
  • uses the AppCompat support library
  • comes with a basetheme which helps if you want an activity with a colored statusbar
  • the navigationdrawer is also under the statusbar
  • compatible down to API Level 14
  • supports multiple drawers
  • comes with multiple default drawer items
  • badge support

#Preview ##Demo You can try it out here Google Play (wall:splash an open source application which uses this drawer implementation)

##Screenshots Image Image

#Include in your project ##Using Maven The MaterialDrawer Library is pushed to Maven Central, so you just need to add the following dependency to your build.gradle.

compile('com.mikepenz.materialdrawer:library:0.9.4@aar') {
	transitive = true
}

##How to use Here's a quick overview what you have to do within your application.

####Activity #####Code: It's (theoretically) a one-liner :D

new Drawer()
.withActivity(this)
.withToolbar(toolbar)
.withActionBarDrawerToggle(true)
.addDrawerItems(
	new PrimaryDrawerItem().withName(R.string.drawer_item_home),
	new PrimaryDrawerItem().withName(R.string.drawer_item_free_play),
	new PrimaryDrawerItem().withName(R.string.drawer_item_custom),
	new SpacerDrawerItem(),
	new SecondaryDrawerItem().withName(R.string.drawer_item_settings).withIcon(FontAwesome.Icon.faw_cog),
	new SecondaryDrawerItem().withName(R.string.drawer_item_help).withIcon(FontAwesome.Icon.faw_question).setEnabled(false),
	new SecondaryDrawerItem().withName(R.string.drawer_item_open_source).withIcon(FontAwesome.Icon.faw_github),
	new SecondaryDrawerItem().withName(R.string.drawer_item_contact).withIcon(FontAwesome.Icon.faw_bullhorn)
)
.withOnDrawerItemClickListener(new Drawer.OnDrawerItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id, IDrawerItem drawerItem) {
	// do something with the clicked item :D
}
})
.build();

###AndroidManifest.xml (OPTIONAL) You can use the provided theme, this will allow the drawer to display under the statusbar

  android:theme="@style/AppTheme"

###styles.xml (OPTIONAL) Overwrite following colors to create a quick custom style for your application

    <!-- Material SAMPLE DARK colors -->
    <color name="material_drawer_primary">#9C27B0</color>
    <color name="material_drawer_primary_dark">#7B1FA2</color>
    <color name="material_drawer_primary_light">#E1BEE7</color>
    <color name="material_drawer_accent">#00BCD4</color>
    <color name="material_drawer_background">#303030</color>
    <!-- Material SAMPLE DARK text / items colors -->
    <color name="material_drawer_icons">#000</color>
    <color name="material_drawer_primary_text">#FFF</color>
    <color name="material_drawer_secondary_text">#DEDEDE</color>
    <color name="material_drawer_hint_text">#ABABAB</color>
    <color name="material_drawer_divider">#555555</color>
    <!-- Material SAMPLE DARK drawer colors -->
    <color name="material_drawer_selected">#E8E8E8</color>
    <color name="material_drawer_selected_text">#2196F3</color>

#Credits

#Developed By

#License

Copyright 2015 Mike Penz

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

materialdrawer's People

Contributors

mikepenz avatar

Watchers

 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.