本文整理了Java中android.animation.AnimatorSet.start()
方法的一些代码示例,展示了AnimatorSet.start()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AnimatorSet.start()
方法的具体详情如下:
包路径:android.animation.AnimatorSet
类名称:AnimatorSet
方法名:start
暂无
代码示例来源:origin: florent37/ExpectAnim
@Override
public void run() {
calculate();
animatorSet.start();
}
});
代码示例来源:origin: smuyyh/BookReader
@Override
public void onAnimationEnd(Animator animation) {
if (mIsAnimatorCancel) return;
if (animation instanceof ValueAnimator) {
mRing.sweeping = mRing.sweep;
} else if (animation instanceof AnimatorSet) {
mRing.restore();
animatorSet.start();
}
}
代码示例来源:origin: willowtreeapps/spruce-android
private Spruce(SpruceBuilder builder) throws IllegalArgumentException {
this.viewGroup = builder.viewGroup;
Animator[] animators = builder.animators;
SortFunction sortFunction = builder.sortFunction;
if (animators == null) {
throw new IllegalArgumentException("Animator array must not be null");
} else if (sortFunction == null) {
throw new IllegalArgumentException("SortFunction must not be null");
}
getAnimatorSetForSort(animators, sortFunction).start();
}
代码示例来源:origin: jaydenxiao2016/AndroidFire
@Override
public void onRefresh() {
if(!btnSexAnimatorSet.isStarted()){
btnSexAnimatorSet.start();
}
}
代码示例来源:origin: scwang90/SmartRefreshLayout
@Override
protected void animateAddImpl(final RecyclerView.ViewHolder holder) {
View target = holder.itemView;
View icon = target.findViewById(R.id.icon);
Animator swing = ObjectAnimator.ofFloat(icon, "rotationX", 45, 0);
swing.setInterpolator(new OvershootInterpolator(5));
View right = holder.itemView.findViewById(R.id.right);
Animator rotateIn = ObjectAnimator.ofFloat(right, "rotationY", 90, 0);
rotateIn.setInterpolator(new DecelerateInterpolator());
AnimatorSet animator = new AnimatorSet();
animator.setDuration(getAddDuration());
animator.playTogether(swing, rotateIn);
animator.start();
}
代码示例来源:origin: florent37/ViewAnimator
@Override
public boolean onPreDraw() {
animatorSet.start();
waitForThisViewHeight.getViewTreeObserver().removeOnPreDrawListener(this);
return false;
}
});
代码示例来源:origin: ImmortalZ/TransitionHelper
@Override
public void translate(InfoBean bean, ExposeView parent, View child) {
set.playTogether(
ObjectAnimator.ofFloat(child, "translationX", 0, -bean.translationX),
ObjectAnimator.ofFloat(child, "translationY", 0, -bean.translationY),
ObjectAnimator.ofFloat(child, "scaleX", 1,1/bean.scale),
ObjectAnimator.ofFloat(child, "scaleY", 1,1/bean.scale)
);
set.setInterpolator(new AccelerateInterpolator());
set.setDuration(showDuration).start();
}
代码示例来源:origin: ImmortalZ/TransitionHelper
@Override
public void loadPlaceholder(InfoBean bean, ImageView placeholder) {
AnimatorSet set = new AnimatorSet();
set.playTogether(
ObjectAnimator.ofFloat(placeholder, "scaleX", 1, 0),
ObjectAnimator.ofFloat(placeholder, "scaleY", 1, 0)
);
set.setInterpolator(new AccelerateInterpolator());
set.setDuration(showDuration / 4 * 5).start();
}
代码示例来源:origin: ImmortalZ/TransitionHelper
@Override
public void loadPlaceholder(InfoBean bean, ImageView placeholder) {
AnimatorSet set = new AnimatorSet();
set.playTogether(
ObjectAnimator.ofFloat(placeholder,"rotation",0,180),
ObjectAnimator.ofFloat(placeholder, "scaleX", 1, 0),
ObjectAnimator.ofFloat(placeholder, "scaleY", 1, 0)
);
set.setInterpolator(new AccelerateInterpolator());
set.setDuration(showDuration / 4 * 5).start();
}
代码示例来源:origin: ImmortalZ/TransitionHelper
@Override
public void translate(InfoBean bean, ExposeView parent, View child) {
set.playTogether(
ObjectAnimator.ofFloat(child, "scaleY", 1)
);
set.setInterpolator(new AccelerateInterpolator());
set.setDuration(showDuration).start();
}
代码示例来源:origin: gzu-liyujiang/AndroidPicker
@Override
protected void showAfter() {
View rootView = getRootView();
AnimatorSet animatorSet = new AnimatorSet();
ObjectAnimator alpha = ObjectAnimator.ofFloat(rootView, "alpha", 0, 1);
ObjectAnimator translation = ObjectAnimator.ofFloat(rootView, "translationY", 300, 0);
animatorSet.playTogether(alpha, translation);
animatorSet.setDuration(1000);
animatorSet.setInterpolator(new AccelerateInterpolator());
animatorSet.start();
}
代码示例来源:origin: ImmortalZ/TransitionHelper
@Override
public void loadPlaceholder(InfoBean bean, ImageView placeholder) {
AnimatorSet set = new AnimatorSet();
set.playTogether(
ObjectAnimator.ofFloat(placeholder, "rotation", 0, 180),
ObjectAnimator.ofFloat(placeholder, "scaleX", 1, 0),
ObjectAnimator.ofFloat(placeholder, "scaleY", 1, 0)
);
set.setInterpolator(new AccelerateInterpolator());
set.setDuration(showDuration / 4 * 5).start();
//placeholder.setVisibility(View.GONE);
}
代码示例来源:origin: ImmortalZ/TransitionHelper
@Override
public void loadPlaceholder(InfoBean bean, ImageView placeholder) {
AnimatorSet set = new AnimatorSet();
set.playTogether(
ObjectAnimator.ofFloat(placeholder, "rotation", 0, 180),
ObjectAnimator.ofFloat(placeholder, "scaleX", 1, 0),
ObjectAnimator.ofFloat(placeholder, "scaleY", 1, 0)
);
set.setInterpolator(new AccelerateInterpolator());
set.setDuration(showDuration / 4 * 5).start();
}
})
代码示例来源:origin: ImmortalZ/TransitionHelper
@Override
public void loadPlaceholder(InfoBean bean, ImageView placeholder) {
AnimatorSet set = new AnimatorSet();
set.playTogether(
ObjectAnimator.ofFloat(placeholder, "rotation", 0, 180),
ObjectAnimator.ofFloat(placeholder, "scaleX", 1, 0),
ObjectAnimator.ofFloat(placeholder, "scaleY", 1, 0)
);
set.setInterpolator(new AccelerateInterpolator());
set.setDuration(showDuration / 4 * 5).start();
}
代码示例来源:origin: jeasonlzy/ImagePicker
private void enterAnimator() {
ObjectAnimator alpha = ObjectAnimator.ofFloat(masker, "alpha", 0, 1);
ObjectAnimator translationY = ObjectAnimator.ofFloat(listView, "translationY", listView.getHeight(), 0);
AnimatorSet set = new AnimatorSet();
set.setDuration(400);
set.playTogether(alpha, translationY);
set.setInterpolator(new AccelerateDecelerateInterpolator());
set.start();
}
代码示例来源:origin: smuyyh/BookReader
public void start() {
if (mAnimationStarted) {
return;
}
if (animator == null || animatorSet == null) {
mRing.reset();
buildAnimator();
}
animator.start();
animatorSet.start();
mAnimationStarted = true;
mIsAnimatorCancel = false;
}
代码示例来源:origin: lyft/scissors
private void animate(Interpolator interpolator, long duration, ValueAnimator first, ValueAnimator... animators) {
animator = new AnimatorSet();
animator.setDuration(duration);
animator.setInterpolator(interpolator);
animator.addListener(animatorListener);
AnimatorSet.Builder builder = animator.play(first);
for(ValueAnimator valueAnimator : animators) {
builder.with(valueAnimator);
}
animator.start();
}
}
代码示例来源:origin: sd6352051/NiftyDialogEffects
public void start(View view) {
reset(view);
setupAnimation(view);
mAnimatorSet.start();
}
代码示例来源:origin: tarek360/RichPath
RichPathAnimator start() {
if (prev != null) {
prev.start();
} else {
animatorSet = createAnimatorSet();
animatorSet.start();
}
return this;
}
代码示例来源:origin: scwang90/SmartRefreshLayout
@Override
public void onStartAnimator(@NonNull RefreshLayout layout, int height, int maxDragHeight) {
super.onStartAnimator(layout, height, maxDragHeight);
final View topView = mMaskViewTop;
final View shadowView = mShadowView;
final View bottomView = mMaskViewBottom;
final AnimatorSet animatorSet = new AnimatorSet();
animatorSet.play(ObjectAnimator.ofFloat(topView, "translationY", topView.getTranslationY(), -mHalfHeaderHeight))
.with(ObjectAnimator.ofFloat(bottomView, "translationY", bottomView.getTranslationY(), mHalfHeaderHeight))
.with(ObjectAnimator.ofFloat(shadowView, "alpha", shadowView.getAlpha(), 0));
animatorSet.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
topView.setVisibility(View.GONE);
bottomView.setVisibility(View.GONE);
shadowView.setVisibility(View.GONE);
postStatus(FunGameView.STATUS_GAME_PLAY);
}
});
animatorSet.setDuration(800);
animatorSet.setStartDelay(200);
animatorSet.start();
}
内容来源于网络,如有侵权,请联系作者删除!