@Override public void onMoving(boolean isDragging, float percent, int offset, int height, int maxDragHeight) { mProgress = (percent * .8f); final View thisView = this; thisView.invalidate(); }
@Override public void applyTransformation(float interpolatedTime, Transformation t) { final View thisView = PhoenixHeader.this; mRotate = (interpolatedTime); thisView.invalidate(); } };
@Override protected void applyTransformation(float interpolatedTime, Transformation t) { if (interpolatedTime == 1) { isRefreshing = false; } mFinishTransformation = interpolatedTime; thisView.invalidate(); } });
@Override public void run() { realView.invalidate(); } }, delayMilliseconds);
@Override public void onAnimationUpdate(ValueAnimator animation) { final View thisView = DropBoxHeader.this; mReboundPercent = (float) animation.getAnimatedValue(); thisView.invalidate(); } });
@Override public void applyTransformation(float interpolatedTime, @NonNull Transformation t) { /*SLOW DOWN ANIMATION IN {@link #SLOW_DOWN_ANIMATION_COEFFICIENT} time */ mLoadingAnimationTime = LOADING_ANIMATION_COEFFICIENT * (interpolatedTime / SLOW_DOWN_ANIMATION_COEFFICIENT); thisView.invalidate(); } };
@Override public void invalidateDrawable(@NonNull Drawable drawable) { final View thisView = this; thisView.invalidate(); // if (drawable == mProgressDrawable) { // super.invalidate(); // } else { // super.invalidateDrawable(drawable); // } }
@Override public void onAnimationUpdate(ValueAnimator animation) { final View thisView = BezierCircleHeader.this; mFinishRatio = (float) animation.getAnimatedValue(); thisView.invalidate(); } });
@Override public void onReleased(@NonNull RefreshLayout layout, int height, int maxDragHeight) { mIsInLoading = true; mAniController.start(); final View thisView = this; thisView.invalidate(); }
public void setAlpha(float alpha) { if (mAlpha != alpha) { mAlpha = alpha; View view = mView.get(); if (view != null) { view.invalidate(); } } } public float getPivotX() {
@Override public void onStartAnimator(@NonNull RefreshLayout layout, int height, int maxDragHeight) { mState = RefreshState.Refreshing; mBoxDrawable.setAlpha(255); final View thisView = this; thisView.invalidate(); }
/** * WaveView is colored by given color (including alpha) * * @param color ARGB color. WaveView will be colored by Black if rgb color is provided. * @see Paint#setColor(int) */ public void setWaveColor(@ColorInt int color) { mPaint.setColor(color); final View thisView = this; thisView.invalidate(); }
@Override public void onAnimationUpdate(ValueAnimator animation) { if (mDropOutPercent < 1 || mDropOutPercent >= 3) { mDropOutPercent = (float) animation.getAnimatedValue(); } else if (mDropOutPercent < 2) { mDropOutPercent = 1 + (float) animation.getAnimatedValue(); } else if (mDropOutPercent < 3) { mDropOutPercent = 2 + (float) animation.getAnimatedValue(); if (mDropOutPercent == 3) { mDropOutOverFlow = true; } } final View thisView = DropBoxHeader.this; thisView.invalidate(); } });
@Override public void onAnimationUpdate(ValueAnimator animation) { mCurrentCircleCenterY = (float) animation.getAnimatedValue(); final View thisView = WaveView.this; if (Build.VERSION.SDK_INT >= 16) { thisView.postInvalidateOnAnimation(); } else { thisView.invalidate(); } } });
@Override protected void applyTransformation(float interpolatedTime, Transformation t) { final View thisView = StoreHouseHeader.this; mProgress = (1 - interpolatedTime); thisView.invalidate(); if (interpolatedTime == 1) { for (int i = 0; i < mItemList.size(); i++) { mItemList.get(i).resetPosition(mHorizontalRandomness); } } } });
@Override public void onHorizontalDrag(float percentX, int offsetX, int offsetMax) { mWaveOffsetX = offsetX; final View thisView = this; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { thisView.postInvalidateOnAnimation(); } else { thisView.invalidate(); } } //</editor-fold>
/** * call this method to refresh the graph with a given matrix * * @param newMatrix * @return */ public Matrix refresh(Matrix newMatrix, View chart, boolean invalidate) { mMatrixTouch.set(newMatrix); // make sure scale and translation are within their bounds limitTransAndScale(mMatrixTouch, mContentRect); if (invalidate) chart.invalidate(); newMatrix.set(mMatrixTouch); return newMatrix; }
public void invalidate() { if (mShowView != null) mShowView.getRenderView().invalidate(); }
@Implementation protected void invalidate() { wasInvalidated = true; directly().invalidate(); }
@Test public void testViewInvalidate() { final MultiCallback viewInvalidateMultiCallback = new MultiCallback(true); viewInvalidateMultiCallback.addView(view); drawable.setCallback(viewInvalidateMultiCallback); drawable.invalidateSelf(); verify(view).invalidate(); } }