Skip to content
(UNMAINTAINED) An implemention of Filter Menu concept for android
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle/wrapper Initial commit Mar 12, 2015
library fix crash when restore state Apr 13, 2017
sample change name of attributes Jul 3, 2015
screenshots
.gitignore config gradle Mar 12, 2015
FilterMenu.iml change name of attributes Jul 3, 2015
LICENSE.txt
README.md change name of attributes Jul 3, 2015
build.gradle Initial commit Mar 12, 2015
gradle.properties change name of attributes Jul 3, 2015
gradlew Initial commit Mar 12, 2015
gradlew.bat Initial commit Mar 12, 2015
settings.gradle Initial commit Mar 12, 2015

README.md

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:fm_expandedRadius="96dp"
        custom:fm_collapsedRadius="24dp"
        custom:fm_centerBottom="50dp"
        custom:fm_centerRight="50dp"
        custom:fm_primaryColor="#ff37aa4a"
        custom:fm_primaryDarkColor="#ff20622b">
    </com.linroid.filtermenu.library.FilterMenuLayout>
    
    
    <!--circle radius size when menu expanded-->
    custom:fm_expandedRadius
    <!--circle radius size when menu collapsed-->
    custom:fm_collapsedRadius
    <!--set the position of circle, the menu will auto align.
        You should only set two directions at most.-->
    custom:fm_center[Left|Top|Right|Bottom]
    <!-- If true, centers the circle horizontally.-->
    custom:fm_centerHorizontal
    <!-- If true, centers the circle vertically.-->
    custom:fm_centerVertical
    <!--primary color-->
    custom:fm_primaryColor
    <!--color of inner circle when menu expanded-->
    custom:fm_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.

You can’t perform that action at this time.