
如何将位图图像转换为Drawable?
谢谢, 法哈
听起来像你想使用BitmapDrawable
从文档:
A
Drawablethat wraps a bitmap and can be tiled, stretched, or aligned.
You can create aBitmapDrawablefrom a file path, an input stream, through
XML inflation, or from aBitmapobject.
试试这个将Bitmap类型的图像转换为Drawable
Drawable d = new BitmapDrawable(getResources(), bitmap);
未经作者同意,本文严禁转载,违者必究!




近期评论