android.view.View.invalidateDrawable()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(257)

本文整理了Java中android.view.View.invalidateDrawable()方法的一些代码示例,展示了View.invalidateDrawable()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。View.invalidateDrawable()方法的具体详情如下:
包路径:android.view.View
类名称:View
方法名:invalidateDrawable

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);
  }
}

相关文章

View类方法