docs: private static ValueAnimator loadAnimator(Context context, AttributeSet attrs, ValueAnimator anim)
              throws NotFoundException {
  
          TypedArray a =
                  context.obtainStyledAttributes(attrs, /*com.android.internal.R.styleable.*/Animator);
  
          long duration = a.getInt(/*com.android.internal.R.styleable.*/Animator_duration, 0);
  
          long startDelay = a.getInt(/*com.android.internal.R.styleable.*/Animator_startOffset, 0);
  
          int valueType = a.getInt(/*com.android.internal.R.styleable.*/Animator_valueType,
                  VALUE_TYPE_FLOAT);
  
          if (anim == null) {
              anim = new ValueAnimator();
          }
          //TypeEvaluator evaluator = null;
  
          int valueFromIndex = /*com.android.internal.R.styleable.*/Animator_valueFrom;
          int valueToIndex = /*com.android.internal.R.styleable.*/Animator_valueTo;
  
          boolean getFloats = (valueType == VALUE_TYPE_FLOAT);
  
          TypedValue tvFrom = a.peekValue(valueFromIndex);
          boolean hasFrom = (tvFrom != null);
          int fromType = hasFrom ? tvFrom.type : 0;
          TypedValue tvTo = a.peekValue(valueToIndex);
          boolean hasTo = (tvTo != null);
          int toType = hasTo ? tvTo.type : 0;
  
          if ((hasFrom && (fromType >= TypedValue.TYPE_FIRST_COLOR_INT) &&
                  (fromType <= TypedValue.TYPE_LAST_COLOR_INT)) ||
              (hasTo && (toType >= TypedValue.TYPE_FIRST_COLOR_INT) &&
                  (toType <= TypedValue.TYPE_LAST_COLOR_INT))) {
              // special case for colors: ignore valueType and get ints
              getFloats = false;
              anim.setEvaluator(new ArgbEvaluator());
          }
  
          if (getFloats) {
              float valueFrom;
              float valueTo;
              if (hasFrom) {
                  if (fromType == TypedValue.TYPE_DIMENSION) {
                      valueFrom = a.getDimension(valueFromIndex, 0f);
                  } else {
                      valueFrom = a.getFloat(valueFromIndex, 0f);
                  }
                  if (hasTo) {
                      if (toType == TypedValue.TYPE_DIMENSION) {
                          valueTo = a.getDimension(valueToIndex, 0f);
                      } else {
                          valueTo = a.getFloat(valueToIndex, 0f);
                      }
                      anim.setFloatValues(valueFrom, valueTo);
                  } else {
                      anim.setFloatValues(valueFrom);
                  }
              } else {
                  if (toType == TypedValue.TYPE_DIMENSION) {
                      valueTo = a.getDimension(valueToIndex, 0f);
                  } else {
                      valueTo = a.getFloat(valueToIndex, 0f);
                  }
                  anim.setFloatValues(valueTo);
              }
          } else {
              int valueFrom;
              int valueTo;
              if (hasFrom) {
                  if (fromType == TypedValue.TYPE_DIMENSION) {
                      valueFrom = (int) a.getDimension(valueFromIndex, 0f);
                  } else if ((fromType >= TypedValue.TYPE_FIRST_COLOR_INT) &&
                          (fromType <= TypedValue.TYPE_LAST_COLOR_INT)) {
                      valueFrom = a.getColor(valueFromIndex, 0);
                  } else {
                      valueFrom = a.getInt(valueFromIndex, 0);
                  }
                  if (hasTo) {
                      if (toType == TypedValue.TYPE_DIMENSION) {
                          valueTo = (int) a.getDimension(valueToIndex, 0f);
                      } else if ((toType >= TypedValue.TYPE_FIRST_COLOR_INT) &&
                              (toType <= TypedValue.TYPE_LAST_COLOR_INT)) {
                          valueTo = a.getColor(valueToIndex, 0);
                      } else {
                          valueTo = a.getInt(valueToIndex, 0);
                      }
                      anim.setIntValues(valueFrom, valueTo);
                  } else {
                      anim.setIntValues(valueFrom);
                  }
              } else {
                  if (hasTo) {
                      if (toType == TypedValue.TYPE_DIMENSION) {
                          valueTo = (int) a.getDimension(valueToIndex, 0f);
                      } else if ((toType >= TypedValue.TYPE_FIRST_COLOR_INT) &&
                          (toType <= TypedValue.TYPE_LAST_COLOR_INT)) {
                          valueTo = a.getColor(valueToIndex, 0);
                      } else {
                          valueTo = a.getInt(valueToIndex, 0);
                      }
                      anim.setIntValues(valueTo);
                  }
              }
          }
  
          anim.setDuration(duration);
          anim.setStartDelay(startDelay);
  
          if (a.hasValue(/*com.android.internal.R.styleable.*/Animator_repeatCount)) {
              anim.setRepeatCount(
                      a.getInt(/*com.android.internal.R.styleable.*/Animator_repeatCount, 0));
          }
          if (a.hasValue(/*com.android.internal.R.styleable.*/Animator_repeatMode)) {
              anim.setRepeatMode(
                      a.getInt(/*com.android.internal.R.styleable.*/Animator_repeatMode,
                              ValueAnimator.RESTART));
          }
          //if (evaluator != null) {
          //    anim.setEvaluator(evaluator);
          //}
  
          final int resID =
                  a.getResourceId(/*com.android.internal.R.styleable.*/Animator_interpolator, 0);
          if (resID > 0) {
              anim.setInterpolator(AnimationUtils.loadInterpolator(context, resID));
          }
          a.recycle();
  
          return anim;
      }