本文整理了Java中android.animation.ObjectAnimator.setIntValues()
方法的一些代码示例,展示了ObjectAnimator.setIntValues()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectAnimator.setIntValues()
方法的具体详情如下:
包路径:android.animation.ObjectAnimator
类名称:ObjectAnimator
方法名:setIntValues
暂无
代码示例来源:origin: cemrich/zapp
private void setShowProgressBar(int value) {
showProgressAnimator.setIntValues(value);
showProgressAnimator.start();
}
代码示例来源:origin: com.albedinsky.android/ui
/**
*/
@Override
void settleIndicator(float pullPosition) {
INDICATOR_TOP_ANIMATOR.setIntValues(
(int) (pullPosition * controller.mPullDistance),
(int) (controller.mRefreshSettlePosition * controller.mPullDistance)
);
INDICATOR_TOP_ANIMATOR.setDuration(refreshSettleDuration);
INDICATOR_TOP_ANIMATOR.start();
controller.updatePrivateFlags(PFLAG_RUNNING_SCHEDULED_ANIMATION, true);
}
代码示例来源:origin: com.albedinsky.android/ui-controller-pull
/**
*/
@Override
void mimicOverScroll(float overScroll) {
final int duration = Math.round(overScroll);
PULL_ANIMATOR.setIntValues(0, (int) overScroll);
PULL_ANIMATOR.setDuration(duration);
PULL_ANIMATOR.setInterpolator(interpolator);
mimicOverScroll.overScroll = overScroll;
controller.postDelayed(mimicOverScroll, duration);
PULL_ANIMATOR.start();
}
代码示例来源:origin: com.albedinsky.android/ui-controller
/**
*/
@Override
void settleIndicator(float pullPosition) {
INDICATOR_TOP_ANIMATOR.setIntValues(
(int) (pullPosition * controller.mPullDistance),
(int) (controller.mRefreshSettlePosition * controller.mPullDistance)
);
INDICATOR_TOP_ANIMATOR.setDuration(refreshSettleDuration);
INDICATOR_TOP_ANIMATOR.start();
controller.updatePrivateFlags(PFLAG_RUNNING_SCHEDULED_ANIMATION, true);
}
代码示例来源:origin: com.albedinsky.android/ui-controller
/**
*/
@Override
void mimicOverScroll(float overScroll) {
final int duration = Math.round(overScroll);
PULL_ANIMATOR.setIntValues(0, (int) overScroll);
PULL_ANIMATOR.setDuration(duration);
PULL_ANIMATOR.setInterpolator(interpolator);
mimicOverScroll.overScroll = overScroll;
controller.postDelayed(mimicOverScroll, duration);
PULL_ANIMATOR.start();
}
代码示例来源:origin: com.albedinsky.android/ui
/**
*/
@Override
void mimicOverScroll(float overScroll) {
final int duration = Math.round(overScroll);
PULL_ANIMATOR.setIntValues(0, (int) overScroll);
PULL_ANIMATOR.setDuration(duration);
PULL_ANIMATOR.setInterpolator(interpolator);
mimicOverScroll.overScroll = overScroll;
controller.postDelayed(mimicOverScroll, duration);
PULL_ANIMATOR.start();
}
代码示例来源:origin: com.albedinsky.android/ui
/**
*/
@Override
void collapsePull(float pull) {
PULL_ANIMATOR.setIntValues((int) pull, 0);
PULL_ANIMATOR.setDuration(controller.hasPrivateFlag(PFLAG_PULL_COLLAPSE_FIXED_TIME_ENABLED) ?
pullCollapseDuration :
Math.round(pullCollapseDuration * (Math.abs(pull) / controller.mPullDistance))
);
PULL_ANIMATOR.setStartDelay(pullCollapseDelay);
PULL_ANIMATOR.setInterpolator(interpolator);
PULL_ANIMATOR.start();
}
代码示例来源:origin: com.albedinsky.android/ui-controller-pull
/**
*/
@Override
void collapsePull(float pull) {
PULL_ANIMATOR.setIntValues((int) pull, 0);
PULL_ANIMATOR.setDuration(controller.hasPrivateFlag(PFLAG_PULL_COLLAPSE_FIXED_TIME_ENABLED) ?
pullCollapseDuration :
Math.round(pullCollapseDuration * (Math.abs(pull) / controller.mPullDistance))
);
PULL_ANIMATOR.setStartDelay(pullCollapseDelay);
PULL_ANIMATOR.setInterpolator(interpolator);
PULL_ANIMATOR.start();
}
代码示例来源:origin: li2/learning-android-open-source
/**
* Kicks off an animation that will result in the pointer being centered in the
* pie slice of the currently selected item.
*/
private void centerOnCurrentItem() {
Item current = mData.get(getCurrentItem());
int targetAngle = current.mStartAngle + (current.mEndAngle - current.mStartAngle) / 2;
targetAngle -= mCurrentItemAngle;
if (targetAngle < 90 && mPieRotation > 180) targetAngle += 360;
if (Build.VERSION.SDK_INT >= 11) {
// Fancy animated version
mAutoCenterAnimator.setIntValues(targetAngle);
mAutoCenterAnimator.setDuration(AUTOCENTER_ANIM_DURATION).start();
} else {
// Dull non-animated version
//mPieView.rotateTo(targetAngle);
}
}
代码示例来源:origin: com.albedinsky.android/ui-controller
/**
*/
@Override
void collapsePull(float pull) {
PULL_ANIMATOR.setIntValues((int) pull, 0);
PULL_ANIMATOR.setDuration(controller.hasPrivateFlag(PFLAG_PULL_COLLAPSE_FIXED_TIME_ENABLED) ?
pullCollapseDuration :
Math.round(pullCollapseDuration * (Math.abs(pull) / controller.mPullDistance))
);
PULL_ANIMATOR.setStartDelay(pullCollapseDelay);
PULL_ANIMATOR.setInterpolator(interpolator);
PULL_ANIMATOR.start();
}
代码示例来源:origin: DoAndKeep/DevJourney
/**
* Kicks off an animation that will result in the pointer being centered in the
* pie slice of the currently selected item.
*/
private void centerOnCurrentItem() {
Item current = mData.get(getCurrentItem());
int targetAngle = current.mStartAngle + (current.mEndAngle - current.mStartAngle) / 2;
targetAngle -= mCurrentItemAngle;
if (targetAngle < 90 && mPieRotation > 180) targetAngle += 360;
if (Build.VERSION.SDK_INT >= 11) {
// Fancy animated version
mAutoCenterAnimator.setIntValues(targetAngle);
mAutoCenterAnimator.setDuration(AUTOCENTER_ANIM_DURATION).start();
} else {
// Dull non-animated version
//mPieView.rotateTo(targetAngle);
}
}
代码示例来源:origin: Dreamxiaoxuan/AndroidTvDemo
private ObjectAnimator getWidthAnimator(int width)
{
if (null == mWidthAnimator)
{
mWidthAnimator = ObjectAnimator.ofInt(this, "width", getMeasuredWidth(), width).setDuration(mAnimDuration);
}
else
{
mWidthAnimator.setIntValues(getMeasuredWidth(), width);
}
return mWidthAnimator;
}
代码示例来源:origin: Dreamxiaoxuan/AndroidTvDemo
private ObjectAnimator getHeightAnimator(int height)
{
if (null == mHeightAnimator)
{
mHeightAnimator =
ObjectAnimator.ofInt(this, "height", getMeasuredHeight(), height).setDuration(mAnimDuration);
}
else
{
mHeightAnimator.setIntValues(getMeasuredHeight(), height);
}
return mHeightAnimator;
}
代码示例来源:origin: woxingxiao/DashboardView
colorAnimator.setIntValues(mBgColors[0], mBgColors[1], mBgColors[2], mBgColors[3], mBgColors[4]);
delay = 3000;
} else if (mSolidCreditValue > 650) {
colorAnimator.setIntValues(mBgColors[0], mBgColors[1], mBgColors[2], mBgColors[3]);
delay = 2500;
} else if (mSolidCreditValue > 600) {
colorAnimator.setIntValues(mBgColors[0], mBgColors[1], mBgColors[2]);
delay = 2000;
} else if (mSolidCreditValue > 550) {
colorAnimator.setIntValues(mBgColors[0], mBgColors[1]);
delay = 1500;
代码示例来源:origin: aliab/RTLMaterialSpinner
private void startErrorScrollingAnimator()
{
int textWidth = Math.round(textPaint.measureText(error.toString()));
if (errorLabelAnimator == null)
{
errorLabelAnimator = ObjectAnimator.ofInt(this, "errorLabelPosX", 0, (textWidth + getWidth() / 2));
errorLabelAnimator.setStartDelay(1000);
errorLabelAnimator.setInterpolator(new LinearInterpolator());
errorLabelAnimator.setDuration(150 * error.length());
errorLabelAnimator.addUpdateListener(this);
errorLabelAnimator.setRepeatCount(ValueAnimator.INFINITE);
}
else
{
errorLabelAnimator.setIntValues(0, textWidth + getWidth() / 2);
}
errorLabelAnimator.start();
}
代码示例来源:origin: stackoverflow.com
anim.setIntValues(color1, color2);
代码示例来源:origin: stackoverflow.com
animator = new MarginAnimatorHelper((Button) findViewById(R.id.btn1));
mRemovedButtonDeque.add(R.id.btn1);
mMarginAnimator.setIntValues(0, -mMovingDistance);
break;
animator = new MarginAnimatorHelper((Button) findViewById(R.id.btn2));
mRemovedButtonDeque.add(R.id.btn2);
mMarginAnimator.setIntValues(0, -mMovingDistance);
mMarginAnimator.setIntValues(-mMovingDistance, 0);
内容来源于网络,如有侵权,请联系作者删除!