2023-08-22 14:41:01 +02:00
|
|
|
package android.animation;
|
|
|
|
|
|
2025-01-11 17:43:15 +01:00
|
|
|
import java.lang.reflect.Method;
|
|
|
|
|
|
2024-04-12 18:32:30 +02:00
|
|
|
import android.graphics.Path;
|
2023-09-19 23:22:21 +02:00
|
|
|
import android.util.Property;
|
|
|
|
|
|
2023-08-22 14:41:01 +02:00
|
|
|
public class ObjectAnimator extends ValueAnimator {
|
|
|
|
|
|
|
|
|
|
public String getPropertyName() {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-12 18:32:30 +02:00
|
|
|
public static ObjectAnimator ofFloat(Object target, String xPropertyName, String yPropertyName, Path path) {
|
|
|
|
|
return new ObjectAnimator();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static <T> ObjectAnimator ofFloat(T target, Property<T, Float> xProperty, Property<T, Float> yProperty, Path path) {
|
2023-09-12 23:18:47 +02:00
|
|
|
return new ObjectAnimator();
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-19 23:22:21 +02:00
|
|
|
public static <T> ObjectAnimator ofFloat(T target, Property<T, Float> property, float... values) {
|
|
|
|
|
return new ObjectAnimator();
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-12 18:32:30 +02:00
|
|
|
public static ObjectAnimator ofFloat(Object target, String propertyName, float... values) {
|
|
|
|
|
return new ObjectAnimator();
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-11 17:43:15 +01:00
|
|
|
public static <T> ObjectAnimator ofInt(T target, String propertyName, int... values) throws ReflectiveOperationException {
|
|
|
|
|
Method setter = target.getClass().getMethod("set" + Character.toUpperCase(propertyName.charAt(0)) + propertyName.substring(1), int.class);
|
|
|
|
|
setter.invoke(target, values[values.length - 1]);
|
2024-03-29 23:56:28 +01:00
|
|
|
return new ObjectAnimator();
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-12 23:18:47 +02:00
|
|
|
public ObjectAnimator setDuration(long duration) {return this;}
|
|
|
|
|
|
2023-09-19 23:22:21 +02:00
|
|
|
public void setAutoCancel(boolean autoCancel) {}
|
|
|
|
|
|
2024-05-19 15:27:43 +02:00
|
|
|
public void setPropertyName(String propertyName) {}
|
|
|
|
|
|
2025-01-11 18:01:43 +01:00
|
|
|
public static ObjectAnimator ofPropertyValuesHolder(Object target, PropertyValuesHolder... values) {
|
|
|
|
|
return new ObjectAnimator();
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-22 14:41:01 +02:00
|
|
|
}
|