Coder Social home page Coder Social logo

wang9090980 / filtermenu Goto Github PK

View Code? Open in Web Editor NEW

This project forked from linroid/filtermenu

0.0 2.0 0.0 3.42 MB

An implemention of Filter Menu concept for android

Home Page: https://dribbble.com/shots/1956586-Filter-Menu

License: Apache License 2.0

Java 100.00%

filtermenu's Introduction

FilterMenu

Maven Central

This is a library project with a custom view that implements concept of Filter Menu(https://dribbble.com/shots/1956586-Filter-Menu) made by Anton Aheichanka for android

Quick Overview

  • Download sample Apk

  • Screenshots

    screenshot
  • Youtube Video

    Youtube Video

Futures

  • Detect edge automatically
  • Support for android menu resource

Getting Started

  • Download the source to use it as library project, or grab via Maven
<dependency>
  <groupId>com.linroid.filtermenu</groupId>
  <artifactId>library</artifactId>
  <version>{last-version}</version>
  <type>aar</type>
</dependency>

or Gradle

compile 'com.linroid.filtermenu:library:0.2.+@aar'
  • Declare FilterMenuLayout inside your layout

    <com.linroid.filtermenu.library.FilterMenuLayout
        android:id="@+id/filter_menu"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:elevation="8dp"
        custom:expandedRadius="96dp"
        custom:collapsedRadius="24dp"
        custom:centerBottom="50dp"
        custom:centerRight="50dp"
        custom:primaryColor="#ff37aa4a"
        custom:primaryDarkColor="#ff20622b">
    </com.linroid.filtermenu.library.FilterMenuLayout>
    
    
    <!--circle radius size when menu expanded-->
    custom:expandedRadius 
    <!--circle radius size when menu collapsed-->
    custom:collapsedRadius
    <!--set the position of circle, the menu will auto align.
        You should only set two directions at most.-->
    custom:center[Left|Top|Right|Bottom]
    <!-- If true, centers the circle horizontally.-->
    custom:centerHorizontal
    <!-- If true, centers the circlevertically.-->
    custom:centerVertical
    <!--primary color-->
    custom:primaryColor
    <!--color of inner circle when menu expanded-->
    custom:primaryDarkColor
  • Initial menu items via java code

    FilterMenuLayout layout = (FilterMenuLayout) findViewById(R.id.filter_menu);
    FilterMenu menu = new FilterMenu.Builder(this)
        .addItem(R.drawable....)
        //.inflate(R.menu....)//inflate  menu resource
        .attach(layout)
        .withListener(new FilterMenu.OnMenuChangeListener() {
            @Override
            public void onMenuItemClick(View view, int position) {
            }
            @Override
            public void onMenuCollapse() {
            }
            @Override
            public void onMenuExpand() {
            }
        })
        .build();

ChangeLog

  • 0.2.0
    • support for android menu resource
    • support for centerHorizontal and centerVertical attribute

License

Copyright 2015 linroid

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.

filtermenu's People

Contributors

linroid avatar alorma avatar

Watchers

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