本文整理了Java中android.view.View.invalidate()
方法的一些代码示例,展示了View.invalidate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。View.invalidate()
方法的具体详情如下:
包路径:android.view.View
类名称:View
方法名:invalidate
暂无
代码示例来源:origin: scwang90/SmartRefreshLayout
@Override
public void onMoving(boolean isDragging, float percent, int offset, int height, int maxDragHeight) {
mProgress = (percent * .8f);
final View thisView = this;
thisView.invalidate();
}
代码示例来源:origin: scwang90/SmartRefreshLayout
@Override
public void applyTransformation(float interpolatedTime, Transformation t) {
final View thisView = PhoenixHeader.this;
mRotate = (interpolatedTime);
thisView.invalidate();
}
};
代码示例来源:origin: scwang90/SmartRefreshLayout
@Override
protected void applyTransformation(float interpolatedTime, Transformation t) {
if (interpolatedTime == 1) {
isRefreshing = false;
}
mFinishTransformation = interpolatedTime;
thisView.invalidate();
}
});
代码示例来源:origin: robolectric/robolectric
@Override
public void run() {
realView.invalidate();
}
}, delayMilliseconds);
代码示例来源:origin: scwang90/SmartRefreshLayout
@Override
public void onAnimationUpdate(ValueAnimator animation) {
final View thisView = DropBoxHeader.this;
mReboundPercent = (float) animation.getAnimatedValue();
thisView.invalidate();
}
});
代码示例来源:origin: scwang90/SmartRefreshLayout
@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();
}
};
代码示例来源:origin: scwang90/SmartRefreshLayout
@Override
public void invalidateDrawable(@NonNull Drawable drawable) {
final View thisView = this;
thisView.invalidate();
// if (drawable == mProgressDrawable) {
// super.invalidate();
// } else {
// super.invalidateDrawable(drawable);
// }
}
代码示例来源:origin: scwang90/SmartRefreshLayout
@Override
public void onAnimationUpdate(ValueAnimator animation) {
final View thisView = BezierCircleHeader.this;
mFinishRatio = (float) animation.getAnimatedValue();
thisView.invalidate();
}
});
代码示例来源:origin: scwang90/SmartRefreshLayout
@Override
public void onReleased(@NonNull RefreshLayout layout, int height, int maxDragHeight) {
mIsInLoading = true;
mAniController.start();
final View thisView = this;
thisView.invalidate();
}
代码示例来源:origin: commonsguy/cw-omnibus
public void setAlpha(float alpha) {
if (mAlpha != alpha) {
mAlpha = alpha;
View view = mView.get();
if (view != null) {
view.invalidate();
}
}
}
public float getPivotX() {
代码示例来源:origin: scwang90/SmartRefreshLayout
@Override
public void onStartAnimator(@NonNull RefreshLayout layout, int height, int maxDragHeight) {
mState = RefreshState.Refreshing;
mBoxDrawable.setAlpha(255);
final View thisView = this;
thisView.invalidate();
}
代码示例来源:origin: scwang90/SmartRefreshLayout
/**
* 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();
}
代码示例来源:origin: scwang90/SmartRefreshLayout
@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();
}
});
代码示例来源:origin: scwang90/SmartRefreshLayout
@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();
}
}
});
代码示例来源:origin: scwang90/SmartRefreshLayout
@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);
}
}
}
});
代码示例来源:origin: scwang90/SmartRefreshLayout
@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>
代码示例来源:origin: PhilJay/MPAndroidChart
/**
* 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;
}
代码示例来源:origin: CarGuo/GSYVideoPlayer
public void invalidate() {
if (mShowView != null)
mShowView.getRenderView().invalidate();
}
代码示例来源:origin: robolectric/robolectric
@Implementation
protected void invalidate() {
wasInvalidated = true;
directly().invalidate();
}
代码示例来源:origin: koral--/android-gif-drawable
@Test
public void testViewInvalidate() {
final MultiCallback viewInvalidateMultiCallback = new MultiCallback(true);
viewInvalidateMultiCallback.addView(view);
drawable.setCallback(viewInvalidateMultiCallback);
drawable.invalidateSelf();
verify(view).invalidate();
}
}
内容来源于网络,如有侵权,请联系作者删除!