Giter Site home page Giter Site logo

salmanzach / springy_facebook_rebound Goto Github PK

View Code? Open in Web Editor NEW
192.0 11.0 48.0 436 KB

Springy makes Android Property animation easy to use.

Java 100.00%
android animation facebook rebound ui-components ui recyclerview-item-animation physics scale slide

springy_facebook_rebound's Introduction

Springy_Facebook_Rebound

ic_launcher

Springy is About Motion and Animation on Android platform, you can make smooth and clean property animations

Scale, Translate, Alpha, Rotate.

media player

How to use

First Need to add dependency in your Gradle.

     Compile 'com.facebook.rebound:rebound:0.3.8'    

 Then Create Springy Animator instance and you can initialize by one of it's two constructors.

 with Spring Config.
 
 1.SpringyAnimator(SpringAnimationType.SCALEXY,TENSION, FRACTION, ANIMATION_START_VALUE, ANIMATION_END_VALUE); 
 
 Without Spring Config.
 
 2.SpringyAnimator(SpringAnimationType.SCALEXY, ANIMATION_START_VALUE, ANIMATION_END_VALUE);
 
        {
        
        SpringyAnimator iconSpring = new SpringyAnimator(SpringAnimationType.SCALEXY, 4, 2.5, 0, 1);
        
        // start spring with you view.            
        iconSpring.startSpring(myView);      
        }

you can set Delay.

                iconSpring.setDelay(200);

SpringyAnimationTypes you can use.

TRANSLATEX,
TRANSLATEY,
ROTATEX,
ROTATEY,
SCALEXY,
SCALEX,
SCALEY,
ALPHA,
ROTATION

Springy For RecyclerView.

creat initialize SpringyAdapterAnimator in you Adapter Constructor.

       // pass recyclerView in it.
      springyAdapterAnimator = new SpringyAdapterAnimator(recyclerView);
       // set SpringyAdapterAnimationType
      springyAdapterAnimator.setSpringAnimationType(SpringyAdapterAnimationType.SLIDE_FROM_BOTTOM);
       // (optional) add Spring Config
      springyAdapterAnimator.addConfig(85,15);    
      
      // call this method in  onCreateViewHolder 
              springyAdapterAnimator.onSpringItemCreate(itemView);
              
              
       // call this method in  onBindViewHolder 
             springyAdapterAnimator.onSpringItemBind(holder.itemView, position);

SpringyAdapterAnimation Types you can use.

SLIDE_FROM_BOTTOM.

recylcer view!

SLIDE_FROM_RIGHT.

from right

SLIDE_FROM_LEFT.

from left

SCALE.

scale

About Facebook Rebound

Rebound is a java library that models spring dynamics. Rebound spring models can be used to create animations that feel natural by introducing real world physics to your application.

Rebound is not a general purpose physics library; however, spring dynamics can be used to drive a wide variety of animations. The simplicity of Rebound makes it easy to integrate and use as a building block for creating more complex components like pagers, toggles, and scrollers.

For examples and usage instructions head over to:

facebook.github.io/rebound

springy_facebook_rebound's People

Contributors

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

springy_facebook_rebound'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.