Nis*_*dya 3 android android-image
我有两个位图让我们说bitmapA和bitmapB.我想将bitmapA设置为bitmapB的背景,我必须在运行时执行此操作.请给我一些想法,我该怎么做.
使用setImageDrawable(Drawable d)
将设置图像
setBackgroundDrawable(Drawable d)
将在ImageView类型中设置背景
要将Bitmap转换为Drawable,请使用此功能
Drawable d = new BitmapDrawable(getResources(),bitmap);
Run Code Online (Sandbox Code Playgroud)