当前位置: 首页>>代码示例>>Java>>正文


Java ValueAnimator.getAnimatedValue方法代码示例

本文整理汇总了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();
}
 
开发者ID:woniukeji,项目名称:jianguo,代码行数:18,代码来源:CommonTabLayout.java

示例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();
}
 
开发者ID:xiangyunwan,项目名称:AndroidSweetSheet-master,代码行数:11,代码来源:SweetView.java

示例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);
    }
}
 
开发者ID:xulailing,项目名称:android-open-project-demo-master,代码行数:9,代码来源:ContextualUndoAdapter.java

示例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();
}
 
开发者ID:foreverxiongtao,项目名称:CustomerLib,代码行数:8,代码来源:SegmentTabLayout.java

示例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);
}
 
开发者ID:dxjia,项目名称:LullingImageView,代码行数:28,代码来源:LullingImageView.java

示例6: onAnimationUpdate

import com.nineoldandroids.animation.ValueAnimator; //导入方法依赖的package包/类
@Override
public void onAnimationUpdate(ValueAnimator animation) {
    Float value = (Float) animation.getAnimatedValue();
    moveStepperContent(value);
}
 
开发者ID:hkq325800,项目名称:YellowNote,代码行数:6,代码来源:SnappingStepper.java

示例7: onAnimationUpdate

import com.nineoldandroids.animation.ValueAnimator; //导入方法依赖的package包/类
@Override
public void onAnimationUpdate(ValueAnimator animation) {
    mScrollerAlpha = (float) animation.getAnimatedValue();
    invalidate();
}
 
开发者ID:andryr,项目名称:Harmony-Music-Player,代码行数:6,代码来源:FastScroller.java

示例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);
}
 
开发者ID:sathishmscict,项目名称:ListViewAnimations,代码行数:7,代码来源:SwipeDismissTouchListener.java

示例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);
}
 
开发者ID:sathishmscict,项目名称:ListViewAnimations,代码行数:7,代码来源:AnimateAdditionAdapter.java

示例10: onAnimationUpdate

import com.nineoldandroids.animation.ValueAnimator; //导入方法依赖的package包/类
@Override
public void onAnimationUpdate(ValueAnimator animation) {
    currentRadius = (int) animation.getAnimatedValue();
    invalidate();
}
 
开发者ID:wangjiegulu,项目名称:RapidFloatingActionButton,代码行数:6,代码来源:AnimationView.java

示例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());
}
 
开发者ID:HomHomLin,项目名称:AndroidEmanteAnimtor,代码行数:11,代码来源:EmanateView.java


注:本文中的com.nineoldandroids.animation.ValueAnimator.getAnimatedValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。