First, perhaps "landscape" is not the best word to describe, but I canβt think of anything else at the moment.
I use the following code to show the image in ImageView, but my image, which was taken with the device in the "portrait" (up), is shown to the side.
My code is:
mImageView = (ImageView) findViewById(R.id.iv_photo); Uri u = Uri.parse("content://media/external/images/media/7"); mImageView.setImageURI(u);
XML:
<ImageView android:id="@+id/iv_photo" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
And yes, "content: // media / external / images / media / 7" is a valid path.
Any ideas?
Raist source share