ConstraintLayout 下 layout_marginLeft 属性无效问题
需要添加 app:layout_constraintLeft_toLeftOf="parent" 属性
?xml version="1.0" encoding="utf-8"? androidx.constraintlayout.widget.ConstraintLayout xmlns:andro xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity" com.hrm.baidusdk.customize.DragFloatActionButton android: android:layout_width="50dp" android:layout_height="50dp" android:background="@color/colorAccent" android:clickable="true" tools:ignore="MissingConstraints,RtlSymmetry" android:focusable="true" android:layout_marginLeft="50dp" app:layout_constraintLeft_toLeftOf="parent"/ /androidx.constraintlayout.widget.ConstraintLayout