Created
May 29, 2024 17:29
-
-
Save amodkanthe/8e15baeadbdd373cbfee194174c21f34 to your computer and use it in GitHub Desktop.
ConstraintLayout XML example
This file contains 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 | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<Button | |
android:id="@+id/button" | |
android:layout_width="200dp" | |
android:layout_height="56dp" | |
android:text="CLick" | |
app:layout_constraintBottom_toBottomOf="parent" | |
app:layout_constraintEnd_toEndOf="parent" | |
app:layout_constraintStart_toStartOf="parent" | |
app:layout_constraintTop_toTopOf="parent" /> | |
<TextView | |
android:id="@+id/text" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
app:layout_constraintEnd_toEndOf="@+id/button" | |
app:layout_constraintStart_toStartOf="@+id/button" | |
app:layout_constraintTop_toBottomOf="@+id/button" /> | |
</androidx.constraintlayout.widget.ConstraintLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment