Back to project page ExampleApp.
The source code is released under:
Copyright (c) 2014, Altinn All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redis...
If you think the Android project ExampleApp listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package net.simonvt.menudrawer; /*from w ww . j a v a 2 s. co 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; } }