android.animation.ObjectAnimator.setValues()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(160)

本文整理了Java中android.animation.ObjectAnimator.setValues()方法的一些代码示例,展示了ObjectAnimator.setValues()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectAnimator.setValues()方法的具体详情如下:
包路径:android.animation.ObjectAnimator
类名称:ObjectAnimator
方法名:setValues

ObjectAnimator.setValues介绍

暂无

代码示例

代码示例来源:origin: zzz40500/AnimatorCompat

private ObjectAnimator build() {
  PropertyValuesHolder[] propertyValuesHolders = new PropertyValuesHolder[mPropertyValuesHolderList.size()];
  for (int i = 0; i < mPropertyValuesHolderList.size(); i++) {
    propertyValuesHolders[i] = mPropertyValuesHolderList.get(i);
  }
  mAnimator.setValues(propertyValuesHolders);
  ObjectAnimator anim = mAnimator;
  return anim;
}

代码示例来源:origin: fookwood/Launcher3

public static ObjectAnimator ofPropertyValuesHolder(Object target,
    View view, PropertyValuesHolder... values) {
  ObjectAnimator anim = new ObjectAnimator();
  anim.setTarget(target);
  anim.setValues(values);
  cancelOnDestroyActivity(anim);
  new FirstFrameAnimatorHelper(anim, view);
  return anim;
}

代码示例来源:origin: WeAreFairphone/FP2-Launcher

public static ObjectAnimator ofPropertyValuesHolder(View target,
    PropertyValuesHolder... values) {
  ObjectAnimator anim = new ObjectAnimator();
  anim.setTarget(target);
  anim.setValues(values);
  cancelOnDestroyActivity(anim);
  new FirstFrameAnimatorHelper(anim, target);
  return anim;
}

代码示例来源:origin: fookwood/Launcher3

public static ObjectAnimator ofPropertyValuesHolder(View target,
    PropertyValuesHolder... values) {
  ObjectAnimator anim = new ObjectAnimator();
  anim.setTarget(target);
  anim.setValues(values);
  cancelOnDestroyActivity(anim);
  new FirstFrameAnimatorHelper(anim, target);
  return anim;
}

代码示例来源:origin: WeAreFairphone/FP2-Launcher

public static ObjectAnimator ofPropertyValuesHolder(Object target,
    View view, PropertyValuesHolder... values) {
  ObjectAnimator anim = new ObjectAnimator();
  anim.setTarget(target);
  anim.setValues(values);
  cancelOnDestroyActivity(anim);
  new FirstFrameAnimatorHelper(anim, view);
  return anim;
}

代码示例来源:origin: enricocid/LaunchEnr

private void open(boolean animate) {
  if (mIsOpen || mOpenCloseAnimator.isRunning()) {
    return;
  }
  mIsOpen = true;
  setLightNavBar(true);
  if (animate) {
    mOpenCloseAnimator.setValues(new PropertyListBuilder()
        .translationY(mTranslationYOpen).build());
    mOpenCloseAnimator.addListener(new AnimatorListenerAdapter() {
      @Override
      public void onAnimationEnd(Animator animation) {
        mVerticalPullDetector.finishedScrolling();
      }
    });
    mOpenCloseAnimator.setInterpolator(mFastOutSlowInInterpolator);
    mOpenCloseAnimator.start();
  } else {
    setTranslationY(mTranslationYOpen);
  }
}

代码示例来源:origin: enricocid/LaunchEnr

@Override
protected void handleClose(boolean animate) {
  if (!mIsOpen || mOpenCloseAnimator.isRunning()) {
    return;
  }
  if (animate) {
    mOpenCloseAnimator.setValues(new PropertyListBuilder()
        .translationY(mTranslationYClosed).build());
    mOpenCloseAnimator.addListener(new AnimatorListenerAdapter() {
      @Override
      public void onAnimationEnd(Animator animation) {
        mIsOpen = false;
        mVerticalPullDetector.finishedScrolling();
        ((ViewGroup) getParent()).removeView(WidgetsBottomSheet.this);
        setLightNavBar(mWasNavBarLight);
      }
    });
    mOpenCloseAnimator.setInterpolator(mVerticalPullDetector.isIdleState()
        ? mFastOutSlowInInterpolator : mScrollInterpolator);
    mOpenCloseAnimator.start();
  } else {
    setTranslationY(mTranslationYClosed);
    setLightNavBar(mWasNavBarLight);
    mIsOpen = false;
  }
}

相关文章