Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/184.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 约束布局v1.1.0:布局约束水平权重=0不再工作_Android_Android Constraintlayout - Fatal编程技术网

Android 约束布局v1.1.0:布局约束水平权重=0不再工作

Android 约束布局v1.1.0:布局约束水平权重=0不再工作,android,android-constraintlayout,Android,Android Constraintlayout,如果视图剩余进度的权重(布局权重或水平权重)为0,而进度的权重为1,则它将无法像以前(和预期)那样工作 权重为1的视图进度的宽度为0,剩余权重为0的进度将占据所有空间 0.0001和1表示一切正常 约束布局v1.1.0出现此问题(以前在v1.0.2中使用过) 我错过什么了吗?臭虫 Thx 例如: <View android:id="@+id/progress" android:layout_width="0dp" android:layout_height="3dp

如果视图剩余进度的权重(布局权重或水平权重)为0,而进度的权重为1,则它将无法像以前(和预期)那样工作

权重为1的视图进度的宽度为0,剩余权重为0的进度将占据所有空间

0.0001和1表示一切正常

约束布局v1.1.0出现此问题(以前在v1.0.2中使用过)

我错过什么了吗?臭虫

Thx

例如:

<View
    android:id="@+id/progress"
    android:layout_width="0dp"
    android:layout_height="3dp"
    android:background="@color/blue"
    app:layout_constraintBottom_toBottomOf="@+id/header_image"
    app:layout_constraintHorizontal_weight="1"
    app:layout_constraintLeft_toLeftOf="parent"
    app:layout_constraintRight_toLeftOf="@+id/progress_remaining"/>

<View
    android:id="@+id/progress_remaining"
    android:layout_width="0dp"
    android:layout_height="3dp"
    android:background="@color/red"
    app:layout_constraintBottom_toBottomOf="@+id/header_image"
    app:layout_constraintHorizontal_weight="0"
    app:layout_constraintLeft_toRightOf="@+id/progress"
    app:layout_constraintRight_toRightOf="parent"/>

2018年6月4日11:19 标记为固定的 固定在1.1.1中