本文整理汇总了Java中com.nineoldandroids.animation.AnimatorSet.setInterpolator方法的典型用法代码示例。如果您正苦于以下问题:Java AnimatorSet.setInterpolator方法的具体用法?Java AnimatorSet.setInterpolator怎么用?Java AnimatorSet.setInterpolator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.nineoldandroids.animation.AnimatorSet
的用法示例。
在下文中一共展示了AnimatorSet.setInterpolator方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildScaleDownAnimation
import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
/**
* A helper method to build scale down animation;
*
* @param target
* @param targetScaleX
* @param targetScaleY
* @return
*/
private AnimatorSet buildScaleDownAnimation(View target, float targetScaleX, float targetScaleY) {
AnimatorSet scaleDown = new AnimatorSet();
scaleDown.playTogether(
ObjectAnimator.ofFloat(target, "scaleX", targetScaleX),
ObjectAnimator.ofFloat(target, "scaleY", targetScaleY)
);
if (mUse3D) {
int angle = scaleDirection == DIRECTION_LEFT ? -ROTATE_Y_ANGLE : ROTATE_Y_ANGLE;
scaleDown.playTogether(ObjectAnimator.ofFloat(target, "rotationY", angle));
}
scaleDown.setInterpolator(AnimationUtils.loadInterpolator(activity,
android.R.anim.decelerate_interpolator));
scaleDown.setDuration(250);
return scaleDown;
}
示例2: getPullDownAnimIn
import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
public Animator getPullDownAnimIn(View view) {
ObjectAnimator in = ObjectAnimator.ofFloat(view, "translationY", -view.getMeasuredHeight(), 0);
ObjectAnimator scaleY = ObjectAnimator.ofFloat(view, "scaleY", 0.6f, 1);
ObjectAnimator scaleX = ObjectAnimator.ofFloat(view, "scaleX", 0.6f, 1);
AnimatorSet set = new AnimatorSet();
set.setInterpolator(new DecelerateInterpolator());
in.setDuration(ANIMATION_DURATION);
scaleY.setDuration(ANIMATION_DURATION);
scaleX.setDuration(ANIMATION_DURATION);
set.setDuration(ANIMATION_DURATION);
set.playTogether(scaleY, scaleX, in);
return set;
}
示例3: getPullUpAnimIn
import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
private Animator getPullUpAnimIn(View view) {
ObjectAnimator in = ObjectAnimator.ofFloat(view, "translationY", view.getMeasuredHeight(), 0);
// ObjectAnimator scaleY = ObjectAnimator.ofFloat(view, "rotationX", 20, 0);
ObjectAnimator scaleY = ObjectAnimator.ofFloat(view, "scaleY", 0.6f, 1);
ObjectAnimator scaleX = ObjectAnimator.ofFloat(view, "scaleX", 0.6f, 1f);
AnimatorSet set = new AnimatorSet();
set.setInterpolator(new DecelerateInterpolator());
in.setDuration(ANIMATION_DURATION);
scaleY.setDuration(ANIMATION_DURATION);
scaleX.setDuration(ANIMATION_DURATION);
set.setDuration(ANIMATION_DURATION);
set.playTogether(scaleY, scaleX, in);
return set;
}
示例4: start
import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
private void start() {
if (canAnimate()) {
clearAnimation();
}
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.play(ObjectAnimator.ofFloat(this, "scaleX", 1.0f));
animatorSet.play(ObjectAnimator.ofFloat(this, "scaleY", 1.0f));
animatorSet.setInterpolator(new OvershootInterpolator());
animatorSet.setDuration(getDuration());
animatorSet.start();
}
示例5: setOpenCloseAnimation
import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
/**
* Creates Open / Close AnimatorSet
*/
private AnimatorSet setOpenCloseAnimation(boolean isCloseAnimation) {
List<Animator> textAnimations = new ArrayList<>();
List<Animator> imageAnimations = new ArrayList<>();
if (isCloseAnimation) {
for (int i = getItemCount() - 1; i >= 0; i--) {
fillOpenClosingAnimations(true, textAnimations, imageAnimations, i);
}
} else {
for (int i = 0; i < getItemCount(); i++) {
fillOpenClosingAnimations(false, textAnimations, imageAnimations, i);
}
}
AnimatorSet textCloseAnimatorSet = new AnimatorSet();
textCloseAnimatorSet.playSequentially(textAnimations);
AnimatorSet imageCloseAnimatorSet = new AnimatorSet();
imageCloseAnimatorSet.playSequentially(imageAnimations);
AnimatorSet animatorFullSet = new AnimatorSet();
animatorFullSet.playTogether(imageCloseAnimatorSet, textCloseAnimatorSet);
animatorFullSet.setDuration(mAnimationDurationMilis);
animatorFullSet.addListener(mCloseOpenAnimatorListener);
animatorFullSet.setStartDelay(0);
animatorFullSet.setInterpolator(new HesitateInterpolator());
return animatorFullSet;
}
示例6: end
import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
private void end() {
if (canAnimate()) {
clearAnimation();
}
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.play(ObjectAnimator.ofFloat(this, "scaleX", 0.85f));
animatorSet.play(ObjectAnimator.ofFloat(this, "scaleY", 0.85f));
animatorSet.setInterpolator(new OvershootInterpolator());
animatorSet.setDuration(getDuration());
animatorSet.start();
}
示例7: init
import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
private void init(Context context, AttributeSet attrs) {
setOrientation(LinearLayout.HORIZONTAL);
setGravity(Gravity.CENTER);
handleTypedArray(context, attrs);
mAnimationOut = (AnimatorSet) AnimatorInflater.loadAnimator(context, mAnimatorResId);
mAnimationOut.setInterpolator(new LinearInterpolator());
mAnimationIn = (AnimatorSet) AnimatorInflater.loadAnimator(context, mAnimatorResId);
mAnimationIn.setInterpolator(new ReverseInterpolator());
}
示例8: init
import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
private void init(Context context, AttributeSet attrs) {
setOrientation(LinearLayout.HORIZONTAL);
setGravity(Gravity.CENTER);
handleTypedArray(context, attrs);
mAnimationOut = (AnimatorSet) AnimatorInflater.loadAnimator(context, mAnimatorResId);
mAnimationOut.setInterpolator(new LinearInterpolator());
mAnimationIn = (AnimatorSet) AnimatorInflater.loadAnimator(context, mAnimatorResId);
mAnimationIn.setInterpolator(new ReverseInterpolator());
}
示例9: getAnimator
import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
private Animator getAnimator(View target){
AnimatorSet set = getEnterAnimtor(target);
ValueAnimator bezierValueAnimator = getBezierValueAnimator(target);
AnimatorSet finalSet = new AnimatorSet();
finalSet.playSequentially(set);
finalSet.playSequentially(set, bezierValueAnimator);
finalSet.setInterpolator(mInterpolators[mRandom.nextInt(4)]);
finalSet.setTarget(target);
return finalSet;
}
示例10: getEnterAnimtor
import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
private AnimatorSet getEnterAnimtor(final View target) {
ObjectAnimator alpha = ObjectAnimator.ofFloat(target, "alpha", 0.2f, 1f);
ObjectAnimator scaleX = ObjectAnimator.ofFloat(target,"scaleX", 0.2f, 1f);
ObjectAnimator scaleY = ObjectAnimator.ofFloat(target,"scaleY", 0.2f, 1f);
AnimatorSet enter = new AnimatorSet();
enter.setDuration(500);
enter.setInterpolator(new LinearInterpolator());
enter.playTogether(alpha,scaleX, scaleY);
enter.setTarget(target);
return enter;
}
示例11: buildScaleDownAnimation
import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
/**
* a helper method to build scale down animation;
*
* @param target
* @param targetScaleX
* @param targetScaleY
* @return
*/
private AnimatorSet buildScaleDownAnimation(View target,float targetScaleX,float targetScaleY){
AnimatorSet scaleDown = new AnimatorSet();
scaleDown.playTogether(
ObjectAnimator.ofFloat(target, "scaleX", targetScaleX),
ObjectAnimator.ofFloat(target, "scaleY", targetScaleY)
);
scaleDown.setInterpolator(AnimationUtils.loadInterpolator(activity,
android.R.anim.decelerate_interpolator));
scaleDown.setDuration(250);
return scaleDown;
}
示例12: getPullDownAnim
import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
public Animator getPullDownAnim(View showView, View dismissView) {
Animator out = getPullDownAnimOut(dismissView);
Animator in = getPullDownAnimIn(showView);
AnimatorSet set = new AnimatorSet();
set.setInterpolator(new DecelerateInterpolator());
set.setDuration(ANIMATION_DURATION);
set.playTogether(out, in);
return set;
}
示例13: getPullUpAnim
import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
public Animator getPullUpAnim(View showView, View dismissView) {
Animator out = getPullUpAnimOut(dismissView);
Animator in =getPullUpAnimIn(showView);
AnimatorSet set = new AnimatorSet();
set.setDuration(ANIMATION_DURATION);
set.setInterpolator(new DecelerateInterpolator());
set.playTogether(out, in);
return set;
}
示例14: getDeleteItemShowAnimation
import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
public Animator getDeleteItemShowAnimation(View view) {
ObjectAnimator scaleY = ObjectAnimator.ofFloat(view, "scaleY", 0.7f, 1);
ObjectAnimator scaleX = ObjectAnimator.ofFloat(view, "scaleX", 0.7f, 1);
AnimatorSet set = new AnimatorSet();
set.setInterpolator(new DecelerateInterpolator());
scaleY.setDuration(ANIMATION_DURATION);
scaleX.setDuration(ANIMATION_DURATION);
set.setDuration(ANIMATION_DURATION);
set.playTogether(scaleY, scaleX);
return set;
}
示例15: getDeleteItemAnim
import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
@Override
public Animator getDeleteItemAnim(View showView, View dismissView) {
Animator out = getDeleteItemDisMissAnimation(dismissView);
Animator in =getDeleteItemShowAnimation(showView);
AnimatorSet set = new AnimatorSet();
set.setDuration(ANIMATION_DURATION);
set.setInterpolator(new DecelerateInterpolator());
set.playTogether(out, in);
return set;
}