本文整理了Java中android.view.View.invalidateDrawable()
方法的一些代码示例,展示了View.invalidateDrawable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。View.invalidateDrawable()
方法的具体详情如下:
包路径:android.view.View
类名称:View
方法名:invalidateDrawable
暂无
代码示例来源:origin: ZieIony/Carbon
@Override
public void invalidateDrawable(@NonNull Drawable drawable) {
super.invalidateDrawable(drawable);
invalidateParentIfNeeded();
}
代码示例来源:origin: koral--/android-gif-drawable
@Test
public void testInvalidateDrawable() {
simpleMultiCallback.addView(view);
drawable.setCallback(simpleMultiCallback);
drawable.invalidateSelf();
verify(view).invalidateDrawable(drawable);
}
代码示例来源:origin: jdsjlzx/LRecyclerView
@Override
public void invalidateDrawable(Drawable dr) {
if (verifyDrawable(dr)) {
final Rect dirty = dr.getBounds();
final int scrollX = getScrollX() + getPaddingLeft();
final int scrollY = getScrollY() + getPaddingTop();
invalidate(dirty.left + scrollX, dirty.top + scrollY,
dirty.right + scrollX, dirty.bottom + scrollY);
} else {
super.invalidateDrawable(dr);
}
}
代码示例来源:origin: koral--/android-gif-drawable
@Test
public void testViewRemoval() {
simpleMultiCallback.addView(view);
drawable.setCallback(simpleMultiCallback);
drawable.invalidateSelf();
simpleMultiCallback.removeView(view);
drawable.invalidateSelf();
verify(view).invalidateDrawable(drawable);
}
代码示例来源:origin: huxq17/XRefreshView
@Override
public void invalidateDrawable(Drawable dr) {
if (dr == mDrawable) {
invalidate();
} else {
super.invalidateDrawable(dr);
}
}
代码示例来源:origin: iielse/ImageWatcher
@Override
public void invalidateDrawable(Drawable dr) {
if (dr == mDrawable) {
invalidate();
} else {
super.invalidateDrawable(dr);
}
}
代码示例来源:origin: dongjunkun/GanK
@Override
public void invalidateDrawable(@NonNull Drawable dr) {
if (verifyDrawable(dr)) {
final Rect dirty = dr.getBounds();
final int scrollX = getScrollX() + getPaddingLeft();
final int scrollY = getScrollY() + getPaddingTop();
invalidate(dirty.left + scrollX, dirty.top + scrollY,
dirty.right + scrollX, dirty.bottom + scrollY);
} else {
super.invalidateDrawable(dr);
}
}
代码示例来源:origin: captain-miao/RecyclerViewUtils
@Override
public void invalidateDrawable(Drawable dr) {
if (dr == mDrawable) {
invalidate();
} else {
super.invalidateDrawable(dr);
}
}
代码示例来源:origin: tengyukun/pulltorefreshRecylerView
@Override
public void invalidateDrawable(Drawable dr) {
if (dr == mDrawable) {
invalidate();
} else {
super.invalidateDrawable(dr);
}
}
代码示例来源:origin: byc4426/ImageWatcher
@Override
public void invalidateDrawable(Drawable dr) {
if (dr == mDrawable) {
invalidate();
} else {
super.invalidateDrawable(dr);
}
}
代码示例来源:origin: baiiu/ZhihuDaily
@Override
public void invalidateDrawable(Drawable dr) {
if (dr == mDrawable) {
invalidate();
} else {
super.invalidateDrawable(dr);
}
}
代码示例来源:origin: tony-Shx/Swface
@Override
public void invalidateDrawable(Drawable dr) {
if (dr == mDrawable) {
invalidate();
} else {
super.invalidateDrawable(dr);
}
}
代码示例来源:origin: yanzhenjie/LiveSourceCode
@Override
public void invalidateDrawable(Drawable dr) {
if (dr == mDrawable) {
invalidate();
} else {
super.invalidateDrawable(dr);
}
}
代码示例来源:origin: madreain/AndroidDream
@Override
public void invalidateDrawable(Drawable dr) {
if (dr == mDrawable) {
invalidate();
} else {
super.invalidateDrawable(dr);
}
}
代码示例来源:origin: zzkong/BaseProject
@Override
public void invalidateDrawable(Drawable dr) {
if (dr == mDrawable) {
invalidate();
} else {
super.invalidateDrawable(dr);
}
}
代码示例来源:origin: xu649526275/MyMVPDemo
@Override
public void invalidateDrawable(Drawable dr) {
if (dr == mDrawable) {
invalidate();
} else {
super.invalidateDrawable(dr);
}
}
代码示例来源:origin: YiiGuxing/CompositionAvatar
@Override
public void invalidateDrawable(@NonNull Drawable drawable) {
if (hasSameDrawable(drawable)) {
invalidate();
} else {
super.invalidateDrawable(drawable);
}
}
代码示例来源:origin: stackoverflow.com
Handler h = new Handler();
private void offsetView(View view, int distanceY) {
h.post(new Runnable() {
@Override
public void run() {
view.offsetTopAndBottom(distanceY);
view.invalidate();
view.invalidateDrawable(view.getBackground());
}
});
}
代码示例来源:origin: darkskygit/VirtualApp
@Override
public void invalidateDrawable(Drawable dr) {
if (verifyDrawable(dr)) {
final Rect dirty = dr.getBounds();
final int scrollX = getScrollX() + getPaddingLeft();
final int scrollY = getScrollY() + getPaddingTop();
invalidate(dirty.left + scrollX, dirty.top + scrollY,
dirty.right + scrollX, dirty.bottom + scrollY);
} else {
super.invalidateDrawable(dr);
}
}
代码示例来源:origin: bzsome/VirtualApp-x326
@Override
public void invalidateDrawable(Drawable dr) {
if (verifyDrawable(dr)) {
final Rect dirty = dr.getBounds();
final int scrollX = getScrollX() + getPaddingLeft();
final int scrollY = getScrollY() + getPaddingTop();
invalidate(dirty.left + scrollX, dirty.top + scrollY,
dirty.right + scrollX, dirty.bottom + scrollY);
} else {
super.invalidateDrawable(dr);
}
}
内容来源于网络,如有侵权,请联系作者删除!