Giter Site home page Giter Site logo

advancedmaterialdrawer's Introduction

AdvancedMaterialDrawer

Android Arsenal API

Donate

A Gmail-like Material Drawer implementation

Based on neokree's MaterialDrawer library. Big thanks to neokree, without him this library would not exist.

Main Features:

  • Unlimited Head-Items (Accounts), tested with 100 Head-Items
  • Every Head-Item can have its own Menu
  • Head-Item listeners for Avatar or Background taps
  • Adding and removing Head-Items and Menu-Items at runtime
  • Own theme
  • Labels
  • Normal Sections (with Fragment/Activty start or own onClick listener)
  • Bottom-Sections
  • Drawer below the toolbar
  • Tablet support
  • Toolbar overflow support
  • More: Setting your own Fragment on Start, etc

Example APK (Lib-Version [current git head])

https://github.com/madcyph3r/AdvancedMaterialDrawer/raw/master/example-release.apk

or on the play store (Lib-Version 1.1.1)

Android app on Google Play

Download

repositories {
    maven { url 'http://dl.bintray.com/madcyph3r/maven/' }
}

dependencies {
    compile 'de.madcyph3r:materialDrawer:1.1.1@aar'
}

Dependencies

compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.nineoldandroids:library:2.4.0'

Usage

There are a lot of examples with explanations, how to use the library, here is a small example with one Head-Item. It looks like screenshot three, only in black color.

public class OneHeadItem extends MaterialNavigationDrawer {

    MaterialNavigationDrawer drawer = null;

    @Override
    public int headerType() {
        // set type. you get the available constant from MaterialNavigationDrawer class
        return MaterialNavigationDrawer.DRAWERHEADER_HEADITEMS;
    }

    // called from onCreate(), make your view init here or in your fragment.
    @Override
    public void init(Bundle savedInstanceState) {

        drawer = this;

        MaterialMenu menu = new MaterialMenu();

        // first section is loaded
        MaterialSection section1 = this.newSection("Section 1", this.getResources().getDrawable(R.drawable.ic_favorite_black_36dp), new FragmentIndex(), false, menu);
        MaterialSection section2 = this.newSection("Section 2", this.getResources().getDrawable(R.drawable.ic_list_black_36dp), new FragmentIndex(), false, menu);

        // use bitmap and make a circle photo
        final Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.app_drawer_icon);
        final RoundedCornersDrawable drawableAppIcon = new RoundedCornersDrawable(getResources(), bitmap);

        // create Head Item
        MaterialHeadItem headItem = new MaterialHeadItem(this, "F HeadItem", "F Subtitle", drawableAppIcon, R.drawable.mat5, menu);
        
        // add head Item (menu will be loaded automatically)
        this.addHeadItem(headItem);
    }
}

Others

  • If you've found an issue, look up the open issues and submit a new one if it isn't yet reported.
  • If you like the library press the star ;)
  • A Wiki with some Introduction will come soon.

Screenshots

Info: The statusbar is now semi-transparent on lollipop with the latest snapshot. New screenshot will come, with the new release.

5 head-items. Every one has his own menu. (Dark-Style):

screenshot

Section kinds (section with and without icon, bottom Section, label, devisor, icon color):

screenshot

drawer below the toolbar:

screenshot

Light-Style:

screenshot

Toolbar (Actionbar) Overflow:

screenshot

Own Theme:

screenshot

Custom-Header:

screenshot

No-Header:

screenshot

No-Header Below Toolbar:

screenshot

Selected section sets the toolbar color:

screenshot

Tablet, drawer is always present (multipaneSupport = true), below toolbar:

screenshot

Tablet, drawer with hiding, not always open:

screenshot

Tablet, drawer is always present (multipaneSupport = true):

screenshot

advancedmaterialdrawer's People

Contributors

madcyph3r avatar

Watchers

James Cloos 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.