Android Open Source - Android-Pulley-Menu Peek Interpolator






From Project

Back to project page Android-Pulley-Menu.

License

The source code is released under:

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCT...

If you think the Android project Android-Pulley-Menu listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package anshul.pulleymenu;
/*from  w ww.  ja  v  a 2 s .  c  o  m*/
import android.view.animation.Interpolator;

class PeekInterpolator implements Interpolator {

    private static final String TAG = "PeekInterpolator";

    private static final SinusoidalInterpolator SINUSOIDAL_INTERPOLATOR = new SinusoidalInterpolator();

    @Override
    public float getInterpolation(float input) {
        float result;

        if (input < 1.f / 3.f) {
            result = SINUSOIDAL_INTERPOLATOR.getInterpolation(input * 3);

        } else if (input > 2.f / 3.f) {
            final float val = ((input + 1.f / 3.f) - 1.f) * 3.f;
            result = 1.f - SINUSOIDAL_INTERPOLATOR.getInterpolation(val);

        } else {
            result = 1.f;
        }

        return result;
    }
}




Java Source Code List

anshul.pulleymenu.BuildLayerFrameLayout.java
anshul.pulleymenu.ColorDrawable.java
anshul.pulleymenu.CustomListViewAdapter.java
anshul.pulleymenu.DraggableDrawer.java
anshul.pulleymenu.FloatScroller.java
anshul.pulleymenu.MenuDrawer.java
anshul.pulleymenu.NoClickThroughFrameLayout.java
anshul.pulleymenu.OverlayDrawer.java
anshul.pulleymenu.PeekInterpolator.java
anshul.pulleymenu.Position.java
anshul.pulleymenu.PulleyMenu.java
anshul.pulleymenu.Scroller.java
anshul.pulleymenu.SinusoidalInterpolator.java
anshul.pulleymenu.SlideDrawable.java
anshul.pulleymenu.SlidingDrawer.java
anshul.pulleymenu.SmoothInterpolator.java
anshul.pulleymenu.StaticDrawer.java
anshul.pulleymenu.ViewHelper.java
anshul.pulleymenu.compat.ActionBarHelperNative.java
anshul.pulleymenu.compat.ActionBarHelperSherlock.java
anshul.pulleymenu.compat.ActionBarHelper.java
anshul.pulleymenu.samples.PulleyMenuSample.java
anshul.pulleymenu.test.java