想不到在我使用第一个UI控件ImageView时候就遇上了问题,简单使用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"/>
参考:【https://blog.csdn.net/qq_34475058/article/details/53423026】
文章截图: