1 父view高度设置wrap_content
2 ImageView设置match_parent
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/ivPic"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitCenter" />
网友评论