public void buildCircularRevealCache() {
if (STRATEGY == BITMAP_SHADER) {
buildingCircularRevealCache = true;
hasCircularRevealCache = false;
view.buildDrawingCache();
Bitmap bitmap = view.getDrawingCache();
if (bitmap == null && view.getWidth() != 0 && view.getHeight() != 0) {
bitmap = Bitmap.createBitmap(view.getWidth(), view.getHeight(), Config.ARGB_8888);
Canvas canvas = new Canvas(bitmap);
view.draw(canvas);
}
if (bitmap != null) {
revealPaint.setShader(new BitmapShader(bitmap, TileMode.CLAMP, TileMode.CLAMP));
}
buildingCircularRevealCache = false;
hasCircularRevealCache = true;
}
}
CircularRevealHelper.java 文件源码
java
阅读 28
收藏 0
点赞 0
评论 0
项目:material-components-android
作者:
评论列表
文章目录