com.nineoldandroids.animation.PreHoneycombCompat Maven / Gradle / Ivy
The newest version!
package com.nineoldandroids.animation;
import android.view.View;
import com.nineoldandroids.util.FloatProperty;
import com.nineoldandroids.util.IntProperty;
import com.nineoldandroids.util.Property;
import com.nineoldandroids.view.animation.AnimatorProxy;
final class PreHoneycombCompat {
static Property ALPHA = new FloatProperty("alpha") {
@Override
public void setValue(View object, float value) {
AnimatorProxy.wrap(object).setAlpha(value);
}
@Override
public Float get(View object) {
return AnimatorProxy.wrap(object).getAlpha();
}
};
static Property PIVOT_X = new FloatProperty("pivotX") {
@Override
public void setValue(View object, float value) {
AnimatorProxy.wrap(object).setPivotX(value);
}
@Override
public Float get(View object) {
return AnimatorProxy.wrap(object).getPivotX();
}
};
static Property PIVOT_Y = new FloatProperty("pivotY") {
@Override
public void setValue(View object, float value) {
AnimatorProxy.wrap(object).setPivotY(value);
}
@Override
public Float get(View object) {
return AnimatorProxy.wrap(object).getPivotY();
}
};
static Property TRANSLATION_X = new FloatProperty("translationX") {
@Override
public void setValue(View object, float value) {
AnimatorProxy.wrap(object).setTranslationX(value);
}
@Override
public Float get(View object) {
return AnimatorProxy.wrap(object).getTranslationX();
}
};
static Property TRANSLATION_Y = new FloatProperty("translationY") {
@Override
public void setValue(View object, float value) {
AnimatorProxy.wrap(object).setTranslationY(value);
}
@Override
public Float get(View object) {
return AnimatorProxy.wrap(object).getTranslationY();
}
};
static Property ROTATION = new FloatProperty("rotation") {
@Override
public void setValue(View object, float value) {
AnimatorProxy.wrap(object).setRotation(value);
}
@Override
public Float get(View object) {
return AnimatorProxy.wrap(object).getRotation();
}
};
static Property ROTATION_X = new FloatProperty("rotationX") {
@Override
public void setValue(View object, float value) {
AnimatorProxy.wrap(object).setRotationX(value);
}
@Override
public Float get(View object) {
return AnimatorProxy.wrap(object).getRotationX();
}
};
static Property ROTATION_Y = new FloatProperty("rotationY") {
@Override
public void setValue(View object, float value) {
AnimatorProxy.wrap(object).setRotationY(value);
}
@Override
public Float get(View object) {
return AnimatorProxy.wrap(object).getRotationY();
}
};
static Property SCALE_X = new FloatProperty("scaleX") {
@Override
public void setValue(View object, float value) {
AnimatorProxy.wrap(object).setScaleX(value);
}
@Override
public Float get(View object) {
return AnimatorProxy.wrap(object).getScaleX();
}
};
static Property SCALE_Y = new FloatProperty("scaleY") {
@Override
public void setValue(View object, float value) {
AnimatorProxy.wrap(object).setScaleY(value);
}
@Override
public Float get(View object) {
return AnimatorProxy.wrap(object).getScaleY();
}
};
static Property SCROLL_X = new IntProperty("scrollX") {
@Override
public void setValue(View object, int value) {
AnimatorProxy.wrap(object).setScrollX(value);
}
@Override
public Integer get(View object) {
return AnimatorProxy.wrap(object).getScrollX();
}
};
static Property SCROLL_Y = new IntProperty("scrollY") {
@Override
public void setValue(View object, int value) {
AnimatorProxy.wrap(object).setScrollY(value);
}
@Override
public Integer get(View object) {
return AnimatorProxy.wrap(object).getScrollY();
}
};
static Property X = new FloatProperty("x") {
@Override
public void setValue(View object, float value) {
AnimatorProxy.wrap(object).setX(value);
}
@Override
public Float get(View object) {
return AnimatorProxy.wrap(object).getX();
}
};
static Property Y = new FloatProperty("y") {
@Override
public void setValue(View object, float value) {
AnimatorProxy.wrap(object).setY(value);
}
@Override
public Float get(View object) {
return AnimatorProxy.wrap(object).getY();
}
};
//No instances
private PreHoneycombCompat() {}
}