
从上图中,如何去除图像周围的空白
imageview 布局是
<ImageView android:id="@+id/list_image"
android:layout_width="@android:dimen/app_icon_size"
android:layout_height="@android:dimen/app_icon_size"
android:layout_gravity="center_vertical"
android:scaleType="fitCenter"/>
添加到您的图像android:adjustViewBounds=true
如果仍然无法正常工作,请将布局大小更改为wrap_content
从您的问题下面的评论中,我了解到您想摆脱图像周围的空白,实际上这与Android.
您需要使用Gimp修改图像。
从上面的链接下载软件后,请按照以下步骤操作。
1) 用 Gimp 打开你的图像。
2)添加Alfa canal到您的图像。右键单击>图层>透明度>添加阿尔法通道
3) 选择图像上的空白区域,方法是使用fuzzy select tool工具箱中的单击该空白区域

4) 使用删除按钮删除空白。
5) 将图像另存为 .png