ImageView 宽高按相同的比例展示
2020-04-20 本文已影响0人
菜鸟何时起飞
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" />