本文整理了Java中android.animation.ObjectAnimator.start()
方法的一些代码示例,展示了ObjectAnimator.start()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectAnimator.start()
方法的具体详情如下:
包路径:android.animation.ObjectAnimator
类名称:ObjectAnimator
方法名:start
暂无
代码示例来源:origin: stackoverflow.com
ProgressBar progressBar = (ProgressBar) view.findViewById(R.id.progressBar);
ObjectAnimator animation = ObjectAnimator.ofInt (progressBar, "progress", 0, 500); // see this max value coming back here, we animale towards that value
animation.setDuration (5000); //in milliseconds
animation.setInterpolator (new DecelerateInterpolator ());
animation.start ();
代码示例来源:origin: stackoverflow.com
ObjectAnimator animation = ObjectAnimator.ofInt(
tvText,
"maxLines",
25);
animation.setDuration(4000);
animation.start();
代码示例来源:origin: stackoverflow.com
ImageView imageview = (ImageView)findViewById(R.id.image);
ObjectAnimator imageViewObjectAnimator = ObjectAnimator.ofFloat(imageview ,
"rotation", 0f, 360f);
imageViewObjectAnimator.setDuration(1000); // miliseconds
imageViewObjectAnimator.start();
代码示例来源:origin: stackoverflow.com
if(android.os.Build.VERSION.SDK_INT >= 11){
// will update the "progress" propriety of seekbar until it reaches progress
ObjectAnimator animation = ObjectAnimator.ofInt(seekbar, "progress", progress);
animation.setDuration(500); // 0.5 second
animation.setInterpolator(new DecelerateInterpolator());
animation.start();
}
else
seekbar.setProgress(progress); // no animation on Gingerbread or lower
代码示例来源:origin: stackoverflow.com
ObjectAnimator animator=ObjectAnimator.ofInt(yourHorizontalScrollView, "scrollX",targetXScroll );
animator.setDuration(800);
animator.start();
代码示例来源:origin: stackoverflow.com
PropertyValuesHolder pvhX = PropertyValuesHolder.ofFloat(TRANSLATION_X, value);
PropertyValuesHolder pvhY = PropertyValuesHolder.ofFloat(TRANSLATION_Y, value);
ObjectAnimator animator = ObjectAnimator.ofPropertyValuesHolder(view, pvhX, pvhY);
animator.setDuration(BASE_DURATION * 2);
animator.start();
代码示例来源:origin: stackoverflow.com
ObjectAnimator scaleDown = ObjectAnimator.ofPropertyValuesHolder(view,
PropertyValuesHolder.ofFloat("scaleX", 0.5f),
PropertyValuesHolder.ofFloat("scaleY", 0.5f));
scaleDown.setDuration(1000);
scaleDown.start();
代码示例来源:origin: stackoverflow.com
ObjectAnimator objectAnimator= ObjectAnimator.ofFloat(mContent_container, "translationX", startX, endX);
objectAnimator.setDuration(1000);
objectAnimator.start();
代码示例来源:origin: Rukey7/MvpApp
/**
* 垂直偏移动画
* @param view
* @param startY
* @param endY
* @param duration
* @return
*/
public static Animator doMoveVertical(View view, int startY, int endY, int duration) {
ObjectAnimator animator = ObjectAnimator.ofFloat(view, "translationY", startY, endY).setDuration(duration);
animator.start();
return animator;
}
代码示例来源:origin: florent37/ExpectAnim
public void reset() {
final ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(this, "percent", 1f, 0f);
objectAnimator.setDuration(duration);
if (interpolator != null) {
objectAnimator.setInterpolator(interpolator);
}
objectAnimator.start();
}
代码示例来源:origin: xfumihiro/ViewInspector
private void showSubMenu() {
mSubmenuLayout.setVisibility(VISIBLE);
ObjectAnimator animator = ObjectAnimator.ofFloat(mSubmenuLayout, "alpha", 0f, 1f);
animator.setDuration(200).start();
}
}
代码示例来源:origin: xfumihiro/ViewInspector
private void showSubMenu() {
mSubmenuLayout.setVisibility(VISIBLE);
ObjectAnimator animator = ObjectAnimator.ofFloat(mSubmenuLayout, "alpha", 0f, 1f);
animator.setDuration(500).start();
}
}
代码示例来源:origin: stackoverflow.com
final ObjectAnimator backgroundColorAnimator = ObjectAnimator.ofObject(view,
"backgroundColor",
new ArgbEvaluator(),
0xFFFFFFFF,
0xff78c5f9);
backgroundColorAnimator.setDuration(300);
backgroundColorAnimator.start();
代码示例来源:origin: TakuSemba/Spotlight
void finishSpotlight(long duration, TimeInterpolator animation,
AbstractAnimatorListener listener) {
ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(this, "alpha", 1f, 0f);
objectAnimator.setDuration(duration);
objectAnimator.setInterpolator(animation);
objectAnimator.addListener(listener);
objectAnimator.start();
}
代码示例来源:origin: TakuSemba/Spotlight
void startSpotlight(long duration, TimeInterpolator animation,
AbstractAnimatorListener listener) {
ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(this, "alpha", 0f, 1f);
objectAnimator.setDuration(duration);
objectAnimator.setInterpolator(animation);
objectAnimator.addListener(listener);
objectAnimator.start();
}
代码示例来源:origin: naman14/Timber
public void changeDigit(TimelyView tv, int end) {
ObjectAnimator obja = tv.animate(end);
obja.setDuration(400);
obja.start();
}
代码示例来源:origin: naman14/Timber
private void showBubble() {
AnimatorSet animatorSet = new AnimatorSet();
bubble.setVisibility(VISIBLE);
if (currentAnimator != null)
currentAnimator.cancel();
currentAnimator = ObjectAnimator.ofFloat(bubble, "alpha", 0f, 1f).setDuration(BUBBLE_ANIMATION_DURATION);
currentAnimator.start();
}
代码示例来源:origin: stackoverflow.com
ObjectAnimator colorFade = ObjectAnimator.ofObject(screen, "backgroundColor", new ArgbEvaluator(), Color.argb(255,255,255,255), 0xff000000);
colorFade.setDuration(7000);
colorFade.start();
代码示例来源:origin: stackoverflow.com
ObjectAnimator anim = (ObjectAnimator) AnimatorInflater.loadAnimator(mContext, R.animator.flipping);
anim.setTarget(A View Object reference goes here i.e. ImageView);
anim.setDuration(3000);
anim.start();
代码示例来源:origin: wangdan/AisenWeiBo
public void doEndAnim() {
mAnimator = ObjectAnimator.ofInt(this, "InnViewPositionX", mInnViewPositionX, mInnCenterPositionX);
mAnimator.setDuration(250);
mAnimator.start();
}
}
内容来源于网络,如有侵权,请联系作者删除!