Ejemplo n.º 1
0
 /**
  * Sets the property that will be animated. Property objects will take precedence over properties
  * specified by the {@link #setPropertyName(String)} method. Animations should be set up to use
  * one or the other, not both.
  *
  * @param property The property being animated. Should not be null.
  */
 public void setProperty(Property property) {
   // mValues could be null if this is being constructed piecemeal. Just record the
   // propertyName to be used later when setValues() is called if so.
   if (mValues != null) {
     PropertyValuesHolder valuesHolder = mValues[0];
     String oldName = valuesHolder.getPropertyName();
     valuesHolder.setProperty(property);
     mValuesMap.remove(oldName);
     mValuesMap.put(mPropertyName, valuesHolder);
   }
   if (mProperty != null) {
     mPropertyName = property.getName();
   }
   mProperty = property;
   // New property/values/target should cause re-initialization prior to starting
   mInitialized = false;
 }