我在RelativeLayout中有一个非常简单的图像,由于某种原因,我在顶部和底部获得了额外的间距,无法删除。如何清除?

看起来是这样的:

这是代码:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >
    <ImageView
            android:id="@+id/imageView1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentTop="true"
            android:src="@drawable/slice11pp" />
</RelativeLayout>

最佳答案

试试这个
android:adjustViewBounds="true"

07-24 09:49
查看更多