首先,也许“风景”不是更好的形容词,但我现在想不出另一个。
我正在使用以下代码在 ImageView 中显示图像,但我使用设备在“纵向”(抬头)中拍摄的图像显示为侧向显示。
我的代码:
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"/>
是的,“content://media/external/images/media/7”是一个有效的路径。
有任何想法吗?