本文整理了Java中com.nineoldandroids.animation.ObjectAnimator.setCurrentPlayTime()
方法的一些代码示例,展示了ObjectAnimator.setCurrentPlayTime()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectAnimator.setCurrentPlayTime()
方法的具体详情如下:
包路径:com.nineoldandroids.animation.ObjectAnimator
类名称:ObjectAnimator
方法名:setCurrentPlayTime
暂无
代码示例来源:origin: iballan/TimelyView
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
if(objectAnimator != null) objectAnimator.setCurrentPlayTime(progress);
}
@Override
代码示例来源:origin: xuehuayous/PullToRefresh-Demo
@Override
public void onPull(float scaleOfLayout) {
scaleOfLayout = scaleOfLayout > 1.0f ? 1.0f : scaleOfLayout;
if (mGoodsImage.getVisibility() != View.VISIBLE) {
mGoodsImage.setVisibility(View.VISIBLE);
}
//透明度动画
ObjectAnimator animAlphaP = ObjectAnimator.ofFloat(mPersonImage, "alpha", -1, 1).setDuration(300);
animAlphaP.setCurrentPlayTime((long) (scaleOfLayout * 300));
ObjectAnimator animAlphaG = ObjectAnimator.ofFloat(mGoodsImage, "alpha", -1, 1).setDuration(300);
animAlphaG.setCurrentPlayTime((long) (scaleOfLayout * 300));
//缩放动画
ViewHelper.setPivotX(mPersonImage, 0); // 设置中心点
ViewHelper.setPivotY(mPersonImage, 0);
ObjectAnimator animPX = ObjectAnimator.ofFloat(mPersonImage, "scaleX", 0, 1).setDuration(300);
animPX.setCurrentPlayTime((long) (scaleOfLayout * 300));
ObjectAnimator animPY = ObjectAnimator.ofFloat(mPersonImage, "scaleY", 0, 1).setDuration(300);
animPY.setCurrentPlayTime((long) (scaleOfLayout * 300));
ViewHelper.setPivotX(mGoodsImage, mGoodsImage.getMeasuredWidth());
ObjectAnimator animGX = ObjectAnimator.ofFloat(mGoodsImage, "scaleX", 0, 1).setDuration(300);
animGX.setCurrentPlayTime((long) (scaleOfLayout * 300));
ObjectAnimator animGY = ObjectAnimator.ofFloat(mGoodsImage, "scaleY", 0, 1).setDuration(300);
animGY.setCurrentPlayTime((long) (scaleOfLayout * 300));
}
代码示例来源:origin: AndroidHensen/YaNi
animeAlphaP.setCurrentPlayTime((long) (i * 300));
ObjectAnimator animeAlphaG = ObjectAnimator.ofFloat(mImgGoods, "alpha", -1, 1).setDuration(300);
animeAlphaG.setCurrentPlayTime((long) (i * 300));
animePX.setCurrentPlayTime((long) (i * 300));
ObjectAnimator animePY = ObjectAnimator.ofFloat(mImgPerson, "scaleY", 0, 1).setDuration(300);
animePY.setCurrentPlayTime((long) (i * 300));
animeGX.setCurrentPlayTime((long) (j * 300 * 1.25));
ObjectAnimator animeGY = ObjectAnimator.ofFloat(mImgGoods, "scaleY", 0, 1).setDuration(300);
animeGY.setCurrentPlayTime((long) (j * 300 * 1.25));
代码示例来源:origin: xuehuayous/PullToRefresh-Demo
@Override
public void onPull(float scaleOfLayout) {
if(scaleOfLayout < 0.7f) scaleOfLayout = 0.7f;
if(scaleOfLayout > 1.0f) scaleOfLayout = 1.0f;
//旋转动画
ViewHelper.setPivotX(mPointerImage, mPointerImage.getMeasuredWidth()/2); // 设置中心点
ViewHelper.setPivotY(mPointerImage, mPointerImage.getMeasuredHeight()/2);
ObjectAnimator animPY = ObjectAnimator.ofFloat(mPointerImage, "rotation", 0, 250).setDuration(300);
animPY.setCurrentPlayTime((long) (scaleOfLayout * 1000 - 700));
}
内容来源于网络,如有侵权,请联系作者删除!