下面列出了怎么用android.util.IntProperty的API类实例代码及写法,或者点击链接到github查看源代码。
public IntPropertyValuesHolder(Property property, Keyframes.IntKeyframes keyframes) {
super(property);
mValueType = int.class;
mKeyframes = keyframes;
mIntKeyframes = keyframes;
if (property instanceof IntProperty) {
mIntProperty = (IntProperty) mProperty;
}
}
public IntPropertyValuesHolder(Property property, int... values) {
super(property);
setIntValues(values);
if (property instanceof IntProperty) {
mIntProperty = (IntProperty) mProperty;
}
}
@Override
public void setProperty(Property property) {
if (property instanceof IntProperty) {
mIntProperty = (IntProperty) property;
} else {
super.setProperty(property);
}
}
public RampAnimator(T object, IntProperty<T> property) {
mObject = object;
mProperty = property;
mChoreographer = Choreographer.getInstance();
}