void setupSetterAndGetter(Object target) {
        //if (mProperty != null) {
        //    // check to make sure that mProperty is on the class of target
        //    try {
        //        Object testValue = mProperty.get(target);
        //        for (Keyframe kf : mKeyframeSet.mKeyframes) {
        //            if (!kf.hasValue()) {
        //                kf.setValue(mProperty.get(target));
        //            }
        //        }
        //        return;
        //    } catch (ClassCastException e) {
        //        Log.e("PropertyValuesHolder","No such property (" + mProperty.getName() +
        //                ") on target object " + target + ". Trying reflection instead");
        //        mProperty = null;
        //    }
        //}
        Class targetClass = target.getClass();
        if (mSetter == null) {
            setupSetter(targetClass);
        }
        for (Keyframe kf : mKeyframeSet.mKeyframes) {
            if (!kf.hasValue()) {
                if (mGetter == null) {
                    setupGetter(targetClass);
                }
                try {
                    kf.setValue(mGetter.invoke(target));
                } catch (InvocationTargetException e) {
                    Log.e("PropertyValuesHolder", e.toString());
                } catch (IllegalAccessException e) {
                    Log.e("PropertyValuesHolder", e.toString());
                }
            }
        }
    }
void setupSetterAndGetter ( Object target ) { Class targetClass = target . getClass ( ) ; if ( mSetter == null ) { setupSetter ( targetClass ) ; } for ( Keyframe kf : mKeyframeSet . mKeyframes ) { if ( ! kf . hasValue ( ) ) { if ( mGetter == null ) { setupGetter ( targetClass ) ; } try { kf . setValue ( mGetter . invoke ( target ) ) ; } catch ( InvocationTargetException e ) { Log . e ( "PropertyValuesHolder" , e . toString ( ) ) ; } catch ( IllegalAccessException e ) { Log . e ( "PropertyValuesHolder" , e . toString ( ) ) ; } } } }
Internal function (called from ObjectAnimator) to set up the setter and getter
prior to running the animation. If the setter has not been manually set for this
object, it will be derived automatically given the property name, target object, and
types of values supplied. If no getter has been set, it will be supplied iff any of the
supplied values was null. If there is a null value, then the getter (supplied or derived)
will be called to set those null values to the current value of the property
on the target object.
@param target The object on which the setter (and possibly getter) exist.