首先,也许"风景"并不是更好的词语,但我现在想不到另一个.
我正在使用以下代码在ImageView中显示图像,但我在"肖像"(抬头)中使用设备拍摄的图像显示为侧面.
我的代码:
mImageView = (ImageView) findViewById(R.id.iv_photo);
Uri u = Uri.parse("content://media/external/images/media/7");
mImageView.setImageURI(u);
Run Code Online (Sandbox Code Playgroud)
XML:
<ImageView
android:id="@+id/iv_photo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
Run Code Online (Sandbox Code Playgroud)
是的,"content:// media/external/images/media/7"是一条有效路径.
有任何想法吗?