GithubHelp home page GithubHelp logo

shangjia / menuanimation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from onivas/menuanimation

0.0 1.0 0.0 1.22 MB

An easy generator of Floating Action Button (FAB) for Android based on Material Design

Home Page: http://www.google.com/design/spec/patterns/promoted-actions.html#promoted-actions-floating-action-button

Java 100.00%

menuanimation's Introduction

Menu Animation

##Floating Action Button (FAB) based on Material Design

By Savino Ordine - io.github.onivas.promotedactions.PromotedActionsLibrary;

This is a Lib allow you to create a Promoted Action menu placed on right|bottom corner of the screen.

Promoted Action zoom animation Promoted Action animation

##How it works

#Import library

import io.github.onivas.promotedactions.PromotedActionsLibrary;

#Steps

FrameLayout frameLayout = (FrameLayout) findViewById(R.id.container);

PromotedActionsLibrary promotedActionsLibrary = new PromotedActionsLibrary();

// setup library
promotedActionsLibrary.setup(getApplicationContext(), frameLayout);

// create onClickListener for each promoted action
View.OnClickListener onClickListener = new View.OnClickListener() {
    @Override
        public void onClick(View view) {
            // Do something
    }
};

// customize promoted actions with a drawable
promotedActionsLibrary.addItem(getResources().getDrawable(android.R.drawable.ic_menu_edit), onClickListener);
promotedActionsLibrary.addItem(getResources().getDrawable(android.R.drawable.ic_menu_send), onClickListener);
promotedActionsLibrary.addItem(getResources().getDrawable(android.R.drawable.ic_input_get), onClickListener);

// create main floating button and customize it with a drawable
promotedActionsLibrary.addMainItem(getResources().getDrawable(android.R.drawable.ic_input_add));

menuanimation's People

Contributors

onivas avatar

Watchers

H-ShangJia 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.