if(bigimageS.length()==0){
show_image.setImageBitmap(null);
}else{
show_image.setImageBitmap(decodeImage(bigimageS));
}
****************
public static Bitmap decodeImage(String arrayList_image) {
BufferedInputStream bis;
URL aURL;
try{
aURL = new URL(arrayList_image);
URLConnection conn = aURL.openConnection();
conn.connect();
InputStream is = conn.getInputStream();
bis = new BufferedInputStream(is);
Bitmap bm = BitmapFactory.decodeStream(bis);
bis.close();
is.close();
return bm;
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
这是我的代码,我想清除 imageview。我的问题是我在 bigimages 字符串中获取图像。我正在从 w/s.in 字符串 bigimages 添加 imageurl。当我在一次图像设置然后是旧图像之后单击下一个 btn不清楚。所以请帮助我设置条件但不工作。请帮助。
我正在使用 decodeimage 来解码图像所以如果字符串中没有 url 有什么方法可以清除..帮助我请不要解决