I get the missing constraints warning on the Barrier
, which has been added to the (now stable) version 1.1.0
of the ConstraintLayout
.
This view is not constrained, it only has designtime positions, so it will jump to (0,0) unless you add constraints
However, a Barrier
to my knowledge doesn't use any constraints and I don't think it's even possible to add them
Is this a bug or am I missing something?
To automatically apply any missing constraints you can press the 'Infer Constraints' button at the top of the editor. The red warning sign should now have turned yellow because we have resolved the missing constraints error. Also, the TextView object should have blue arrows coming out of it when selected in the editor.
A ConstraintLayout is a ViewGroup which allows you to position and size widgets in a flexible way. Note: ConstraintLayout is available as a support library that you can use on Android systems starting with API level 9 (Gingerbread). As such, we are planning on enriching its API and capabilities over time.
If you have something like tools:layout_editor_absoluteX="123dp"
or tools:layout_editor_absoluteY="384dp"
defined on the barrier just remove it and the warning will go away.
Are you Getting this type of error
Try adding barrier in this way
<android.support.constraint.Barrier
android:id="@+id/barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:constraint_referenced_ids="view1,view2" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With