ImageView嵌套进ScrollView,发现图片总是存在间隔

解决方案,将imageView的下面属性设置为true即可

android:adjustViewBounds="true"


    ScrollView
        android:layout_width="match_parent"
        android:padding="0dp"
        android:layout_margin="0dp"
        android:layout_height="match_parent"
        LinearLayout
            android:orientation="vertical"
            android:background="@color/black"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            ImageView
                android:adjustViewBounds="true"
                android:id="@+id/iv_help_1"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                /
            ImageView
                android:adjustViewBounds="true"
                android:id="@+id/iv_help_2"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                /
        /LinearLayout

    /ScrollView


最新回复(0)
/jishunrikXNa1VDb6Mjf_2FumRdFiqzOD_2F9DH_2BV2siFjA_3D_3D4834076
8 简首页