private void set(@Nullable Drawable bitmapDrawable, @Nullable Bitmap bitmap, @Nullable Shape shape, int state, int color) {
if (bitmapDrawable != null || bitmap != null || shape != null) {
mMode = Mode.MULTI_ICON;
}
mColors[state] = color;
// mShapes[state] = shape;
mShapeDrawables[state] = shape != null ? new ShapeDrawable(shape) : null;
if (bitmapDrawable == null && bitmap != null) {
mBitmapDrawables[state] = null;
mBitmaps[state] = bitmap;
mFinal[state] = null;
} else if (bitmapDrawable instanceof BitmapDrawable) {
mBitmapDrawables[state] = (BitmapDrawable) bitmapDrawable;
mBitmaps[state] = bitmap;
mFinal[state] = null;
} else {
mBitmapDrawables[state] = null;
mBitmaps[state] = null;
mFinal[state] = bitmapDrawable;
}
}
MSDrawable.java 文件源码
java
阅读 47
收藏 0
点赞 0
评论 0
项目:CEFCommon
作者:
评论列表
文章目录