I use the following method to extract a bitmap from url and transfer it to the image, but the image is not updated.
public static Bitmap LoadImageFromWebOperations(String url) { Bitmap bitmap; try { InputStream is = new URL(url).openStream(); bitmap = BitmapFactory.decodeStream(is); return bitmap; } catch (Exception e) { return null; }
call -
mov1_poster.setImageBitmap(VPmovies.LoadImageFromWebOperations(mov_details[0][7])); //doesn't work Toast.makeText(this,"url is \n"+mov_details[0][7],Toast.LENGTH_LONG).show(); // shows the url of the image successfully (just to check the url is not null)
Is there something I'm doing wrong? Please, help.
source share