zoukankan      html  css  js  c++  java
  • ConstraintLayout 下 layout_marginLeft 属性无效问题

    ConstraintLayout 下 layout_marginLeft 属性无效问题

    需要添加 app:layout_constraintLeft_toLeftOf="parent" 属性

    <?xml version="1.0" encoding="utf-8"?>
    <androidx.constraintlayout.widget.ConstraintLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        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:id="@+id/floatButton"
            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>
    
  • 相关阅读:
    Xtreme9.0
    Xtreme8.0
    Xtreme8.0
    Xtreme8.0
    Xtreme9.0
    Xtreme8.0
    IEEEXtreme Practice Community Xtreme9.0
    MySQL添加用户、删除用户与授权
    程序员进阶之路—如何独当一面
    PowerDesigner版本控制器设置权限
  • 原文地址:https://www.cnblogs.com/huaranmeng/p/14025125.html
Copyright © 2011-2022 走看看