本文整理了Java中android.view.View.postInvalidateDelayed()
方法的一些代码示例,展示了View.postInvalidateDelayed()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。View.postInvalidateDelayed()
方法的具体详情如下:
包路径:android.view.View
类名称:View
方法名:postInvalidateDelayed
暂无
代码示例来源:origin: PhilJay/MPAndroidChart
/**
* Original method view.postInvalidateOnAnimation() only supportd in API >=
* 16, This is a replica of the code from ViewCompat.
*
* @param view
*/
@SuppressLint("NewApi")
public static void postInvalidateOnAnimation(View view) {
if (Build.VERSION.SDK_INT >= 16)
view.postInvalidateOnAnimation();
else
view.postInvalidateDelayed(10);
}
代码示例来源:origin: ZieIony/Carbon
@Override
public void postInvalidateDelayed(long delayMilliseconds, int left, int top, int right, int bottom) {
super.postInvalidateDelayed(delayMilliseconds, left, top, right, bottom);
postInvalidateParentIfNeededDelayed(delayMilliseconds);
}
代码示例来源:origin: ZieIony/Carbon
@Override
public void postInvalidateDelayed(long delayMilliseconds) {
super.postInvalidateDelayed(delayMilliseconds);
postInvalidateParentIfNeededDelayed(delayMilliseconds);
}
代码示例来源:origin: ZieIony/Carbon
private void postInvalidateParentIfNeededDelayed(long delayMilliseconds) {
if (getParent() == null || !(getParent() instanceof View))
return;
if (rippleDrawable != null && rippleDrawable.getStyle() == RippleDrawable.Style.Borderless)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
if (elevation > 0 || corners != null)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
}
代码示例来源:origin: ZieIony/Carbon
private void postInvalidateParentIfNeededDelayed(long delayMilliseconds) {
if (getParent() == null || !(getParent() instanceof View))
return;
if (rippleDrawable != null && rippleDrawable.getStyle() == RippleDrawable.Style.Borderless)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
if (elevation > 0 || corners != null)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
}
代码示例来源:origin: ZieIony/Carbon
private void postInvalidateParentIfNeededDelayed(long delayMilliseconds) {
if (getParent() == null || !(getParent() instanceof View))
return;
if (rippleDrawable != null && rippleDrawable.getStyle() == RippleDrawable.Style.Borderless)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
if (elevation > 0 || corners != null)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
}
代码示例来源:origin: ZieIony/Carbon
private void postInvalidateParentIfNeededDelayed(long delayMilliseconds) {
if (getParent() == null || !(getParent() instanceof View))
return;
if (rippleDrawable != null && rippleDrawable.getStyle() == RippleDrawable.Style.Borderless)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
if (elevation > 0 || corners != null)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
}
代码示例来源:origin: ZieIony/Carbon
private void postInvalidateParentIfNeededDelayed(long delayMilliseconds) {
if (getParent() == null || !(getParent() instanceof View))
return;
if (rippleDrawable != null && rippleDrawable.getStyle() == RippleDrawable.Style.Borderless)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
if (elevation > 0 || corners != null)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
}
代码示例来源:origin: ZieIony/Carbon
private void postInvalidateParentIfNeededDelayed(long delayMilliseconds) {
if (getParent() == null || !(getParent() instanceof View))
return;
if (rippleDrawable != null && rippleDrawable.getStyle() == RippleDrawable.Style.Borderless)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
if (elevation > 0 || corners != null)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
}
代码示例来源:origin: ZieIony/Carbon
private void postInvalidateParentIfNeededDelayed(long delayMilliseconds) {
if (getParent() == null || !(getParent() instanceof View))
return;
if (rippleDrawable != null && rippleDrawable.getStyle() == RippleDrawable.Style.Borderless)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
if (elevation > 0 || corners != null)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
}
代码示例来源:origin: ZieIony/Carbon
private void postInvalidateParentIfNeededDelayed(long delayMilliseconds) {
if (getParent() == null || !(getParent() instanceof View))
return;
if (rippleDrawable != null && rippleDrawable.getStyle() == RippleDrawable.Style.Borderless)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
if (elevation > 0 || corners != null)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
}
代码示例来源:origin: ZieIony/Carbon
private void postInvalidateParentIfNeededDelayed(long delayMilliseconds) {
if (getParent() == null || !(getParent() instanceof View))
return;
if (rippleDrawable != null && rippleDrawable.getStyle() == RippleDrawable.Style.Borderless)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
if (elevation > 0 || corners != null)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
}
代码示例来源:origin: ZieIony/Carbon
private void postInvalidateParentIfNeededDelayed(long delayMilliseconds) {
if (getParent() == null || !(getParent() instanceof View))
return;
if (rippleDrawable != null && rippleDrawable.getStyle() == RippleDrawable.Style.Borderless)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
if (elevation > 0 || corners != null)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
}
代码示例来源:origin: ZieIony/Carbon
private void postInvalidateParentIfNeededDelayed(long delayMilliseconds) {
if (getParent() == null || !(getParent() instanceof View))
return;
if (rippleDrawable != null && rippleDrawable.getStyle() == RippleDrawable.Style.Borderless)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
if (elevation > 0 || corners != null)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
}
代码示例来源:origin: ZieIony/Carbon
private void postInvalidateParentIfNeededDelayed(long delayMilliseconds) {
if (getParent() == null || !(getParent() instanceof View))
return;
if (rippleDrawable != null && rippleDrawable.getStyle() == RippleDrawable.Style.Borderless)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
if (elevation > 0 || corners != null)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
}
代码示例来源:origin: ZieIony/Carbon
private void postInvalidateParentIfNeededDelayed(long delayMilliseconds) {
if (getParent() == null || !(getParent() instanceof View))
return;
if (rippleDrawable != null && rippleDrawable.getStyle() == RippleDrawable.Style.Borderless)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
if (elevation > 0 || corners != null)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
}
代码示例来源:origin: ZieIony/Carbon
private void postInvalidateParentIfNeededDelayed(long delayMilliseconds) {
if (getParent() == null || !(getParent() instanceof android.view.View))
return;
if (rippleDrawable != null && rippleDrawable.getStyle() == RippleDrawable.Style.Borderless)
((android.view.View) getParent()).postInvalidateDelayed(delayMilliseconds);
if (elevation > 0 || corners != null)
((android.view.View) getParent()).postInvalidateDelayed(delayMilliseconds);
}
代码示例来源:origin: ZieIony/Carbon
private void postInvalidateParentIfNeededDelayed(long delayMilliseconds) {
if (getParent() == null || !(getParent() instanceof View))
return;
if (rippleDrawable != null && rippleDrawable.getStyle() == RippleDrawable.Style.Borderless)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
if (elevation > 0 || corners != null)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
}
代码示例来源:origin: ZieIony/Carbon
private void postInvalidateParentIfNeededDelayed(long delayMilliseconds) {
if (getParent() == null || !(getParent() instanceof View))
return;
if (rippleDrawable != null && rippleDrawable.getStyle() == RippleDrawable.Style.Borderless)
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
if (elevation > 0 || !Carbon.isShapeRect(shapeModel))
((View) getParent()).postInvalidateDelayed(delayMilliseconds);
}
代码示例来源:origin: robolectric/robolectric
@Test
public void shouldPostInvalidateDelayed() throws Exception {
ShadowLooper.pauseMainLooper();
view.postInvalidateDelayed(100);
ShadowView shadowView = shadowOf(view);
assertFalse(shadowView.wasInvalidated());
ShadowLooper.runUiThreadTasksIncludingDelayedTasks();
assertTrue(shadowView.wasInvalidated());
}
内容来源于网络,如有侵权,请联系作者删除!