org.robolectric.shadows.ShadowAnimationBridge Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of shadows-framework Show documentation
Show all versions of shadows-framework Show documentation
An alternative Android testing framework.
package org.robolectric.shadows;
import android.view.animation.Animation;
import android.view.animation.Transformation;
import org.robolectric.annotation.internal.DoNotInstrument;
import org.robolectric.util.ReflectionHelpers;
import org.robolectric.util.ReflectionHelpers.ClassParameter;
/**
* Bridge between shadows and {@link android.view.animation.Animation}.
*/
@DoNotInstrument
public class ShadowAnimationBridge {
private Animation realAnimation;
public ShadowAnimationBridge(Animation realAnimation) {
this.realAnimation = realAnimation;
}
public void applyTransformation(float interpolatedTime, Transformation transformation) {
ReflectionHelpers.callInstanceMethod(realAnimation, "applyTransformation",
ClassParameter.from(float.class, interpolatedTime),
ClassParameter.from(Transformation.class, transformation));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy