边距结束/右边不适用于约束布局中的项目

Abd*_*jaz 4 android margins android-constraintlayout

首先看看我的观点的布局

在此输入图像描述

这是 XML

 <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/mainCL"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toBottomOf="@id/appBarLayout"
        >

        <TextView
            android:id="@+id/bankInfoHeadingTV"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="36dp"
            android:layout_marginTop="40dp"
            android:layout_marginEnd="8dp"
            android:fontFamily="@font/montserrat_semibold"
            android:text="Bank Information"
            android:textColor="@color/black"
            android:textSize="16sp"
            android:textStyle="bold"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <ImageView
            android:id="@+id/bankInfoIconIV"
            android:layout_width="42dp"
            android:layout_height="32dp"
            android:src="@drawable/card"
            app:layout_constraintBottom_toBottomOf="@id/bankInfoHeadingTV"
            app:layout_constraintStart_toEndOf="@id/bankInfoHeadingTV"
            app:layout_constraintTop_toTopOf="@id/bankInfoHeadingTV" />

    </androidx.constraintlayout.widget.ConstraintLayout>
Run Code Online (Sandbox Code Playgroud)

我想在bankInfoHeadingTVbankInfoIconIV之间放置一些空格。因此它在bankInfoHeadingTV
的末尾放置了30dp的边距,但它不起作用。以bankInfoIconIV 开始的保证金工作正常,但为什么以bankInfoHeadingTV结束的保证金不工作?