安卓开发:用ImageView放上图片后上下有间隙
<ImageView android:layout_width="match_parent" android:layout_height="wrap_content" android:src="@drawable/homePage" />
图片显示在屏幕上,上下总是有间隙,后面一顿搜索,发现只需要加上一行代码就能搞定,如下:
<ImageView android:layout_width="match_parent" android:layout_height="wrap_content" android:src="@drawable/jianzhi" android:adjustViewBounds="true"/>