string url1 = "my url";
URL url = new URL(url1);
URLConnection conn = url.openConnection();
InputStream is = conn.getInputStream();
BufferedInputStream bis = new BufferedInputStream(is);
BitmapFactory.Options bf = new BitmapFactory.Options();
bm = BitmapFactory.decodeStream(bis);
I am using this code to get the image from web and set it on imageview . But the issue is the width that i get is the same as original image. I want to increase the width of the image so that it automatically fits as per the screen size. Any idea on how to increase the width of the bitmap image.
When I use drawable it automatically fits the same image as the screen size. I use drawable.setBackground(drawableimage);
But this is not the case with bitmap image. Any idea on how to increase the width of the bitmap image.