Giter VIP home page Giter VIP logo

android-dropdownmenu's Introduction

Android-DropdownMenu

This is an android dropdown menu with easy to customize.

中文文档

Download

Maven:

<dependency>
  <groupId>com.exblr</groupId>
  <artifactId>dropdown-menu</artifactId>
  <version>1.0.2</version>
  <type>pom</type>
</dependency>

Gradle:

compile 'com.exblr:dropdown-menu:1.0.2'

How

Add the DropdownMenu to your layout and give it an id.

<com.exblr.dropdownmenu.DropdownMenu
    android:id="@+id/dropdown_menu"
    android:layout_width="match_parent"
    android:layout_height="50dp"/>

Then, Call DropdownMenu object's Add methed in Corresponding Activity or Fragment files, to add the menu tab item.

public void add(String title, List<DropdownListItem> list)

The first parameter for the menu title, the second parameter for the menu drop-down list data.

And there two overloaded public method of add :

public void add(String title, OnMenuOpenListener onMenuOpenListener)

and

public void add(String title, View contentView)

These two methods make customization more flexible, such as customizing menu content or the way of opening the menu such as PopupWindow, PopupMenu, or another Activity.

You can also custom DropdownMenu's style by setting the the attributes with ddm prefix like below :

    <com.exblr.dropdownmenu.DropdownMenu
        android:id="@+id/dropdown_menu"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        app:ddmBorderColor="#EEEEEE"
        app:ddmDividerColor="#DDDDDD"
        app:ddmDividerPadding="13dp"
        app:ddmTabIconNormal="@drawable/ic_arrow_down"
        app:ddmTabIconSelected="@drawable/ic_arrow_up"
        app:ddmTabTextColorNormal="#666666"
        app:ddmTabTextColorSelected="#FF008DF2"
        app:ddmTabTextSize="13sp"/>

android-dropdownmenu's People

Contributors

liamwang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

android-dropdownmenu's Issues

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.