當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。