當前位置: 首頁>>代碼示例>>Java>>正文


Java ValueAnimator.getAnimatedValue方法代碼示例

本文整理匯總了Java中android.animation.ValueAnimator.getAnimatedValue方法的典型用法代碼示例。如果您正苦於以下問題:Java ValueAnimator.getAnimatedValue方法的具體用法?Java ValueAnimator.getAnimatedValue怎麽用?Java ValueAnimator.getAnimatedValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.animation.ValueAnimator的用法示例。


在下文中一共展示了ValueAnimator.getAnimatedValue方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onAnimationUpdate

import android.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();
}
 
開發者ID:sunyabin,項目名稱:FlycoTablayout,代碼行數:18,代碼來源:CommonTabLayout.java

示例2: onAnimationUpdate

import android.animation.ValueAnimator; //導入方法依賴的package包/類
@Override
public void onAnimationUpdate(ValueAnimator animation) {
    //獲取動畫進度
    float value = (Float) animation.getAnimatedValue();
    //根據動畫進度計算矩陣中間插值
    for (int i = 0; i < 9; i++) {
        mResult[i] = mStart[i] + (mEnd[i] - mStart[i]) * value;
    }
    //設置矩陣並重繪
    mOuterMatrix.setValues(mResult);
    dispatchOuterMatrixChanged();
    invalidate();
}
 
開發者ID:JJS-CN,項目名稱:JBase,代碼行數:14,代碼來源:PinchImageView.java

示例3: onAnimationUpdate

import android.animation.ValueAnimator; //導入方法依賴的package包/類
@Override
public void onAnimationUpdate(ValueAnimator valueAnimator) {
    final float value = (float) valueAnimator.getAnimatedValue();
    SpannableStringBuilder builder = new SpannableStringBuilder(text);
    for (int i = 0; i < text.length(); i++) {
        builder.setSpan(new ForegroundColorSpan(Color.argb(clamp(value + alphas[i]), red, green, blue)), i, i + 1, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
    }
    setText(builder);
}
 
開發者ID:angcyo,項目名稱:RLibrary,代碼行數:10,代碼來源:RevealTextView.java

示例4: onAnimationUpdate

import android.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();
}
 
開發者ID:Blankeer,項目名稱:MDWechat,代碼行數:8,代碼來源:SegmentTabLayout.java

示例5: onAnimationUpdate

import android.animation.ValueAnimator; //導入方法依賴的package包/類
@Override
public void onAnimationUpdate(final ValueAnimator valueAnimator) {
    // If the user is changing the slider, cancel the animation.
    if (mIsTracking) {
        valueAnimator.cancel();
        return;
    }

    final int animatedIntValue = (int) valueAnimator.getAnimatedValue();
    setProgress(animatedIntValue);
}
 
開發者ID:nazmulidris,項目名稱:mediasession-mediaplayer,代碼行數:12,代碼來源:MediaSeekBar.java

示例6: onAnimationUpdate

import android.animation.ValueAnimator; //導入方法依賴的package包/類
@Override
public void onAnimationUpdate(ValueAnimator animation) {
    if (mSmileyNotSelectedPreviously) {
        mMainSmileyTransformaFraction = animation.getAnimatedFraction();
        if (NONE == mSelectedSmile) {
            mMainSmileyTransformaFraction = 1f - mMainSmileyTransformaFraction;
        }
        invalidate();
    } else {
        float anim = (float) animation.getAnimatedValue();
        moveSmile(anim);
    }
}
 
開發者ID:sujithkanna,項目名稱:SmileyRating,代碼行數:14,代碼來源:SmileRating.java

示例7: onAnimationUpdate

import android.animation.ValueAnimator; //導入方法依賴的package包/類
@Override
public void onAnimationUpdate(ValueAnimator animation) {
    float update = (float) (animation.getAnimatedValue());
    float incr = 360 / maxProgress;
    float value = (update / incr);
    progressUpdate = update;
    progressText = ((int) value) + "";
    invalidate();
}
 
開發者ID:serkansekman,項目名稱:EtiyaProgressView,代碼行數:10,代碼來源:EtiyaProgressView.java

示例8: startValueAnimator

import android.animation.ValueAnimator; //導入方法依賴的package包/類
protected ValueAnimator startValueAnimator(ValueAnimator valueAnimator, float targetValue) {
    float originValue = targetValue;
    if (valueAnimator != null) {
        valueAnimator.cancel();
        originValue = (float) valueAnimator.getAnimatedValue();
    }

    valueAnimator = ValueAnimator.ofFloat(originValue, targetValue);
    valueAnimator.setDuration(200);
    valueAnimator.start();
    return valueAnimator;
}
 
開發者ID:neXenio,項目名稱:BLE-Indoor-Positioning,代碼行數:13,代碼來源:BeaconLineChart.java

示例9: onAnimationUpdate

import android.animation.ValueAnimator; //導入方法依賴的package包/類
@Override
public void onAnimationUpdate(ValueAnimator animation) {
    iconYPosition = (int) animation.getAnimatedValue();
}
 
開發者ID:tranleduy2000,項目名稱:screenfilter,代碼行數:5,代碼來源:IconPressPainter.java

示例10: onAnimatorUpdate

import android.animation.ValueAnimator; //導入方法依賴的package包/類
@Override
protected void onAnimatorUpdate(ValueAnimator animator) {
    degree = (float) animator.getAnimatedValue();
    postInvalidate();
}
 
開發者ID:zyyoona7,項目名稱:MyLoadingViews,代碼行數:6,代碼來源:ITHomeLoadingView.java

示例11: onAnimationUpdate

import android.animation.ValueAnimator; //導入方法依賴的package包/類
@Override
public void onAnimationUpdate(ValueAnimator animation) {
    mAnimateValue = (int) animation.getAnimatedValue();
    invalidate();
}
 
開發者ID:QMUI,項目名稱:QMUI_Android,代碼行數:6,代碼來源:QMUILoadingView.java

示例12: onAnimationUpdate

import android.animation.ValueAnimator; //導入方法依賴的package包/類
@Override
public void onAnimationUpdate(ValueAnimator animation) {
    iconXPosition = ((int) animation.getAnimatedValue()) - iconMargin + margin;
}
 
開發者ID:tranleduy2000,項目名稱:screenfilter,代碼行數:5,代碼來源:IconReleasePainter.java

示例13: onAnimationUpdate

import android.animation.ValueAnimator; //導入方法依賴的package包/類
@Override
public void onAnimationUpdate(ValueAnimator animation) {
    mIndeterminateSweepAngle = (float) animation.getAnimatedValue();
}
 
開發者ID:yuriy-budiyev,項目名稱:circular-progress-bar,代碼行數:5,代碼來源:CircularProgressBar.java

示例14: onAnimationUpdate

import android.animation.ValueAnimator; //導入方法依賴的package包/類
@Override
public void onAnimationUpdate(ValueAnimator animation) {
    float zoom = (Float) animation.getAnimatedValue();
    pdfView.zoomCenteredTo(zoom, new PointF(pdfView.getWidth() / 2, pdfView.getHeight() / 2));
}
 
開發者ID:lidong1665,項目名稱:AndroidPDF,代碼行數:6,代碼來源:AnimationManager.java

示例15: updateAnimationFor

import android.animation.ValueAnimator; //導入方法依賴的package包/類
private void updateAnimationFor(ValueAnimator animation, TextView v) {
    if (isAttachedToHierarchy(v)) {
        shift = (int) animation.getAnimatedValue();
        v.invalidate();
    }
}
 
開發者ID:stytooldex,項目名稱:stynico,代碼行數:7,代碼來源:JumpingBeansSpan.java


注:本文中的android.animation.ValueAnimator.getAnimatedValue方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。