当前位置: 首页>>代码示例>>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;未经允许,请勿转载。