Example usage for android.animation ObjectAnimator ofFloat

List of usage examples for android.animation ObjectAnimator ofFloat

Introduction

In this page you can find the example usage for android.animation ObjectAnimator ofFloat.

Prototype

public static <T> ObjectAnimator ofFloat(T target, Property<T, Float> xProperty, Property<T, Float> yProperty,
        Path path) 

Source Link

Document

Constructs and returns an ObjectAnimator that animates coordinates along a Path using two properties.

Usage

From source file:Main.java

public static ObjectAnimator alfaAppear(View v) {
    return ObjectAnimator.ofFloat(v, "alpha", 0, 1);
}

From source file:Main.java

public static ObjectAnimator rotationCloseToRight(View v) {
    return ObjectAnimator.ofFloat(v, "rotationY", 0, -90);
}

From source file:Main.java

public static ObjectAnimator rotationOpenVertical(View v) {
    return ObjectAnimator.ofFloat(v, "rotationX", -90, 0);
}

From source file:Main.java

public static ObjectAnimator rotationCloseVertical(View v) {
    return ObjectAnimator.ofFloat(v, "rotationX", 0, -90);
}

From source file:Main.java

public static ObjectAnimator rotationOpenFromRight(View v) {
    return ObjectAnimator.ofFloat(v, "rotationY", -90, 0);
}

From source file:Main.java

public static ObjectAnimator translationLeft(View v, float x) {
    return ObjectAnimator.ofFloat(v, "translationX", x, 0);
}

From source file:Main.java

public static ObjectAnimator translationRight(View v, float x) {
    return ObjectAnimator.ofFloat(v, "translationX", 0, x);
}

From source file:Main.java

public static void scaleX(View view, float start, float end, int duration) {
    ObjectAnimator.ofFloat(view, "scaleX", start, end).setDuration(duration).start();
}

From source file:Main.java

public static void scaleY(View view, float start, float end, int duration) {
    ObjectAnimator.ofFloat(view, "scaleY", start, end).setDuration(duration).start();
}

From source file:Main.java

public static void startAlphaAnim(Object target, float startAlpha, float endAlpha, long duration) {
    ObjectAnimator.ofFloat(target, "alpha", startAlpha, endAlpha).setDuration(duration).start();
}