Last active
May 4, 2018 13:15
-
-
Save mr-thierry/13c3ce8097e963a404d4a2e703336d0b to your computer and use it in GitHub Desktop.
Using layout_constraintDimensionRatio breaks the alignment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<android.support.constraint.ConstraintLayout | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="@color/green"> | |
<ImageView | |
android:layout_width="0dp" | |
android:layout_height="0dp" | |
android:src="@drawable/photofullscreen_sample" | |
app:layout_constrainedWidth="true" | |
app:layout_constraintBottom_toBottomOf="parent" | |
app:layout_constraintDimensionRatio="1200:900" | |
app:layout_constraintEnd_toEndOf="parent" | |
app:layout_constraintStart_toStartOf="parent" | |
app:layout_constraintTop_toTopOf="parent" | |
app:layout_constraintWidth_max="120dp" /> | |
</android.support.constraint.ConstraintLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See https://issuetracker.google.com/issues/79228893