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.my 問題をクリアしたいのは、bigimages String で画像を取得していることです。文字列 bigimages.in の w/s.in から imageurl を追加しています。一度画像を設定してから古い画像にした後、次の btn をクリックすると明確ではないので、状態を入力するのを手伝ってください。しかし、機能していません。
私は画像をデコードするためにdecodeimageを使用しているので、文字列にURLがない場合にクリアする方法はありますか..まだ解決しないでください