public static Drawable[] createDrawablesByImages(Resources res, Bitmap[] bitmaps) {
Drawable[] drawables = new Drawable[bitmaps.length];
for (int i = 0; i < bitmaps.length; i++) {
byte[] chunk = bitmaps[i].getNinePatchChunk();
boolean result = NinePatch.isNinePatchChunk(chunk);
if (result) {
drawables[i] = new NinePatchDrawable(res, bitmaps[i], chunk, new Rect(), null);
} else {
drawables[i] = new BitmapDrawable(res, bitmaps[i]);
}
}
return drawables;
}
MaterialUtils.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:pure
作者:
评论列表
文章目录