ConstraintLayout 1.1.0 beta2 guideline barrier bug
| <!-- This works in 1.1.0-beta1 but breaks in 1.1.0-beta2. | |
| textView3 is always constrained to textView1, even when the barrier should clearly be at the guideline --> | |
| <?xml version="1.0" encoding="utf-8"?> | |
| <android.support.constraint.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"> | |
| <TextView | |
| android:id="@+id/textView1" | |
| android:layout_width="wrap_content" | |
| android:layout_height="wrap_content" | |
| android:layout_marginStart="16dp" | |
| android:layout_marginTop="16dp" | |
| android:text="Warehouse" | |
| app:layout_constraintStart_toStartOf="parent" | |
| app:layout_constraintTop_toTopOf="parent" /> | |
| <android.support.constraint.Guideline | |
| android:id="@+id/guideline" | |
| android:layout_width="wrap_content" | |
| android:layout_height="wrap_content" | |
| android:orientation="vertical" | |
| app:layout_constraintGuide_percent="0.3" /> | |
| <android.support.constraint.Barrier | |
| android:id="@+id/barrier1" | |
| android:layout_width="wrap_content" | |
| android:layout_height="wrap_content" | |
| app:barrierDirection="end" | |
| app:constraint_referenced_ids="textView1,guideline" /> | |
| <TextView | |
| android:id="@+id/textView3" | |
| android:layout_width="0dp" | |
| android:layout_height="wrap_content" | |
| android:layout_marginStart="8dp" | |
| android:text="Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum." | |
| app:layout_constraintEnd_toEndOf="parent" | |
| app:layout_constraintStart_toEndOf="@+id/barrier1" | |
| app:layout_constraintTop_toTopOf="parent" /> | |
| </android.support.constraint.ConstraintLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment