I am using viewpager to view every single photo inside imageview using this :-
ZoomableImageView imageView = new ZoomableImageView(context);
Bitmap bimage= getBitmapFromURL(test);
imageView.setBitmap(bimage);
public static Bitmap getBitmapFromURL(String src) {
try {
URL url = new URL(src);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setDoInput(true);
connection.connect();
InputStream input = connection.getInputStream();
Bitmap myBitmap = BitmapFactory.decodeStream(input);
return myBitmap;
} catch (IOException e) {
e.printStackTrace();
return null;
}
}
the problem I am facing right now is that when i take photo in landscape mode and view the photo in landscape, the photo in imageview is not shown in full width of the devices. But when i capture it in portrait mode, it comes in full size and in landscape, it is not full size but centralized correctly. i wants to show full width for landscape photo just like the android native gallery.
Any idea?
Thanks in advance.