Android material L image transition interpolator
        Posted  
        
            by 
                Diolor
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Diolor
        
        
        
        Published on 2014-08-23T17:33:20Z
        Indexed on 
            2014/08/23
            22:20 UTC
        
        
        Read the original article
        Hit count: 369
        
android
|android-animation
This is more of a mathematics question rather than programming.
Well, I would like to ask id you know what is the interpolator described in Material design:

It looks to be an AccelerateDecelerateInterpolator but the deceleration effect decays slower.
My best hatch is :
public class MaterialInterpolator implements Interpolator {
    @Override
    public float getInterpolation(float input) {
        if(input<1./3f)
            return new AccelerateInterpolator().getInterpolation(input);
        else
            return new DecelerateInterpolator().getInterpolation(input);
    }
}
Which creates a gap between the values:
Time / Value
0.3,0.09
0.317,0.100489
0.333,0.110889  <-- gap
0.35,0.57750005
0.367,0.599311
0.383,0.61931103
0.4,0.64
Source: http://www.google.com/design/spec/patterns/imagery-treatment.html
© Stack Overflow or respective owner