本文整理匯總了Java中com.nineoldandroids.animation.ValueAnimator.getAnimatedValue方法的典型用法代碼示例。如果您正苦於以下問題:Java ValueAnimator.getAnimatedValue方法的具體用法?Java ValueAnimator.getAnimatedValue怎麽用?Java ValueAnimator.getAnimatedValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.nineoldandroids.animation.ValueAnimator
的用法示例。
在下文中一共展示了ValueAnimator.getAnimatedValue方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onAnimationUpdate
import com.nineoldandroids.animation.ValueAnimator; //導入方法依賴的package包/類
@Override
public void onAnimationUpdate(ValueAnimator animation) {
View currentTabView = mTabsContainer.getChildAt(this.mCurrentTab);
IndicatorPoint p = (IndicatorPoint) animation.getAnimatedValue();
mIndicatorRect.left = (int) p.left;
mIndicatorRect.right = (int) p.right;
if (mIndicatorWidth < 0) { //indicatorWidth小於0時,原jpardogo's PagerSlidingTabStrip
} else {//indicatorWidth大於0時,圓角矩形以及三角形
float indicatorLeft = p.left + (currentTabView.getWidth() - mIndicatorWidth) / 2;
mIndicatorRect.left = (int) indicatorLeft;
mIndicatorRect.right = (int) (mIndicatorRect.left + mIndicatorWidth);
}
invalidate();
}
示例2: onAnimationUpdate
import com.nineoldandroids.animation.ValueAnimator; //導入方法依賴的package包/類
@Override
public void onAnimationUpdate(ValueAnimator animation) {
int value = (int) animation.getAnimatedValue();
mArcHeight = value;
if (value == mMaxArcHeight) {
duang();
}
invalidate();
}
示例3: onAnimationUpdate
import com.nineoldandroids.animation.ValueAnimator; //導入方法依賴的package包/類
@Override
public void onAnimationUpdate(final ValueAnimator valueAnimator) {
ContextualUndoView dismissView = mParentAdapter.getViewBeingAnimated();
if (dismissView != null) {
mLayoutParams.height = (Integer) valueAnimator.getAnimatedValue();
dismissView.setLayoutParams(mLayoutParams);
}
}
示例4: onAnimationUpdate
import com.nineoldandroids.animation.ValueAnimator; //導入方法依賴的package包/類
@Override
public void onAnimationUpdate(ValueAnimator animation) {
IndicatorPoint p = (IndicatorPoint) animation.getAnimatedValue();
mIndicatorRect.left = (int) p.left;
mIndicatorRect.right = (int) p.right;
invalidate();
}
示例5: onAnimationUpdate
import com.nineoldandroids.animation.ValueAnimator; //導入方法依賴的package包/類
@Override
public void onAnimationUpdate(ValueAnimator valueAnimator) {
// get scale from value animator
float scale = (Float)valueAnimator.getAnimatedValue ();
// record the scale, compare next time
// set correct zoom state
// the first time
if (mOldScaleValue == mTargetMaxScaleValue) {
mScaleState = ScaleState.SCALE_MAX;
} else if (mOldScaleValue > scale) {
if (mScaleState == ScaleState.SCALE_ZOOM_OUT) {
mScaleState = ScaleState.SCALE_MAX;
} else {
mScaleState = ScaleState.SCALE_ZOOM_IN;
}
} else if (mOldScaleValue < scale) {
mScaleState = ScaleState.SCALE_ZOOM_OUT;
}
mOldScaleValue = scale;
// applay the scale matrix
Matrix matrix = new Matrix(mDrawableMatrix);
matrix.postScale(scale, scale, mCenterX, mCenterY);
setImageMatrix(matrix);
}
示例6: onAnimationUpdate
import com.nineoldandroids.animation.ValueAnimator; //導入方法依賴的package包/類
@Override
public void onAnimationUpdate(ValueAnimator animation) {
Float value = (Float) animation.getAnimatedValue();
moveStepperContent(value);
}
示例7: onAnimationUpdate
import com.nineoldandroids.animation.ValueAnimator; //導入方法依賴的package包/類
@Override
public void onAnimationUpdate(ValueAnimator animation) {
mScrollerAlpha = (float) animation.getAnimatedValue();
invalidate();
}
示例8: onAnimationUpdate
import com.nineoldandroids.animation.ValueAnimator; //導入方法依賴的package包/類
@Override
public void onAnimationUpdate(@NonNull final ValueAnimator animation) {
ViewGroup.LayoutParams layoutParams = mView.getLayoutParams();
layoutParams.height = (Integer) animation.getAnimatedValue();
mView.setLayoutParams(layoutParams);
}
示例9: onAnimationUpdate
import com.nineoldandroids.animation.ValueAnimator; //導入方法依賴的package包/類
@Override
public void onAnimationUpdate(final ValueAnimator animation) {
ViewGroup.LayoutParams layoutParams = mView.getLayoutParams();
layoutParams.height = (Integer) animation.getAnimatedValue();
mView.setLayoutParams(layoutParams);
}
示例10: onAnimationUpdate
import com.nineoldandroids.animation.ValueAnimator; //導入方法依賴的package包/類
@Override
public void onAnimationUpdate(ValueAnimator animation) {
currentRadius = (int) animation.getAnimatedValue();
invalidate();
}
示例11: onAnimationUpdate
import com.nineoldandroids.animation.ValueAnimator; //導入方法依賴的package包/類
@Override
public void onAnimationUpdate(ValueAnimator animation) {
PointF pointF = (PointF) animation.getAnimatedValue();
ViewHelper.setX(target,pointF.x);
ViewHelper.setY(target,pointF.y);
ViewHelper.setAlpha(target,1-animation.getAnimatedFraction());
}