public static PropertyValuesHolder ofKeyframe(String propertyName, Keyframe... values) {
        KeyframeSet keyframeSet = KeyframeSet.ofKeyframe(values);
        if (keyframeSet instanceof IntKeyframeSet) {
            return new IntPropertyValuesHolder(propertyName, (IntKeyframeSet) keyframeSet);
        } else if (keyframeSet instanceof FloatKeyframeSet) {
            return new FloatPropertyValuesHolder(propertyName, (FloatKeyframeSet) keyframeSet);
        }
        else {
            PropertyValuesHolder pvh = new PropertyValuesHolder(propertyName);
            pvh.mKeyframeSet = keyframeSet;
            pvh.mValueType = ((Keyframe)values[0]).getType();
            return pvh;
        }
    }
public static PropertyValuesHolder ofKeyframe ( String propertyName , Keyframe ... values ) { KeyframeSet keyframeSet = KeyframeSet . ofKeyframe ( values ) ; if ( keyframeSet instanceof IntKeyframeSet ) { return new IntPropertyValuesHolder ( propertyName , ( IntKeyframeSet ) keyframeSet ) ; } else if ( keyframeSet instanceof FloatKeyframeSet ) { return new FloatPropertyValuesHolder ( propertyName , ( FloatKeyframeSet ) keyframeSet ) ; } else { PropertyValuesHolder pvh = new PropertyValuesHolder ( propertyName ) ; pvh . mKeyframeSet = keyframeSet ; pvh . mValueType = ( ( Keyframe ) values [ 0 ] ) . getType ( ) ; return pvh ; } }
Constructs and returns a PropertyValuesHolder object with the specified property name and set
of values. These values can be of any type, but the type should be consistent so that
an appropriate {@link android.animation.TypeEvaluator} can be found that matches
the common type.
<p>If there is only one value, it is assumed to be the end value of an animation,
and an initial value will be derived, if possible, by calling a getter function
on the object. Also, if any value is null, the value will be filled in when the animation
starts in the same way. This mechanism of automatically getting null values only works
if the PropertyValuesHolder object is used in conjunction
{@link ObjectAnimator}, and with a getter function
derived automatically from <code>propertyName</code>, since otherwise PropertyValuesHolder has
no way of determining what the value should be.
@param propertyName The name of the property associated with this set of values. This
can be the actual property name to be used when using a ObjectAnimator object, or
just a name used to get animated values, such as if this object is used with an
ValueAnimator object.
@param values The set of values to animate between.