Android 从servlet显示图像
我需要将servlet中的图像显示到我的android应用程序中我如何才能做到这一点请有人帮助我提前感谢我建议以下步骤:Android 从servlet显示图像,android,servlets,Android,Servlets,我需要将servlet中的图像显示到我的android应用程序中我如何才能做到这一点请有人帮助我提前感谢我建议以下步骤: 使用AsyncTask从servlet异步下载图像,并将其保存到文件(在内存中或存储卡上) 在“活动”中,将ImageView放置在要显示图像的位置 将加载的图像转换为位图: 四,。将位图设置为ImageView FileInputStream fis; Bitmap image; try { fis = new FileInputStream("path to downl
四,。将位图设置为ImageView
FileInputStream fis;
Bitmap image;
try {
fis = new FileInputStream("path to downloaded image");
Bitmap image = BitmapFactory.decodeStream(fis);
} catch (FileNotFoundException e) {
// handle exception
}