我试图在ImageView中显示this transparent image。
我下载并使用此类设置图像:
public class DownloadImageTask extends AsyncTask<String, Void, Bitmap> {
private String TAG = "DownloadImageTask";
ImageView bmImage;
public DownloadImageTask(ImageView bmImage) {
this.bmImage = bmImage;
}
protected Bitmap doInBackground(String... urls) {
String urldisplay = urls[0];
Bitmap mIcon11 = null;
try {
InputStream in = new java.net.URL(urldisplay).openStream();
mIcon11 = BitmapFactory.decodeStream(in);
} catch (Exception e) {
Log.d(TAG, e.getMessage());
e.printStackTrace();
}
return mIcon11;
}
protected void onPostExecute(Bitmap result) {
bmImage.setImageBitmap(result);
}
}
不幸的是背景变紫了。为什么它会变紫?我该如何解决?