Created
July 24, 2020 14:57
-
-
Save christianb/fea96b4774009cf94158e55f4f334378 to your computer and use it in GitHub Desktop.
Contraint a View Min Max within ConstraintLayout
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
<androidx.constraintlayout.widget.ConstraintLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content"> | |
<ImageView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
app:layout_constraintWidth_min="10dp" | |
app:layout_constraintWidth_max="30dp" | |
app:layout_constraintHeight_min="10dp" | |
app:layout_constraintHeight_max="30dp" | |
app:layout_constrainedWidth="true" | |
app:layout_constrainedHeight="true" /> | |
</androidx.constraintlayout.widget.ConstraintLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment