Last active
November 15, 2023 07:46
-
-
Save mirokolodii/3974948a717ebbfae3cf4e9a7ab597ec to your computer and use it in GitHub Desktop.
Custom view layout
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
<?xml version="1.0" encoding="utf-8"?> | |
<merge 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="wrap_content" | |
android:background="@drawable/background_info_view" | |
android:padding="16dp" | |
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout" | |
> | |
<TextView | |
android:id="@+id/label" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_marginTop="16dp" | |
android:layout_marginEnd="16dp" | |
android:background="@drawable/background_label" | |
android:backgroundTint="#e8c08e" | |
android:drawablePadding="8dp" | |
android:paddingHorizontal="8dp" | |
android:text="@string/draft" | |
android:textColor="@android:color/white" | |
app:drawableTint="@color/white" | |
app:layout_constraintEnd_toEndOf="parent" | |
app:layout_constraintTop_toTopOf="parent" | |
tools:drawableLeft="@drawable/ic_arrow_circle_right" | |
/> | |
<TextView | |
android:id="@+id/title" | |
android:layout_width="0dp" | |
android:layout_height="wrap_content" | |
android:paddingTop="8dp" | |
android:text="@string/specification" | |
android:textAppearance="@style/TextBig.Bold" | |
android:textColor="@color/primary" | |
app:layout_constraintEnd_toEndOf="parent" | |
app:layout_constraintStart_toStartOf="parent" | |
app:layout_constraintTop_toTopOf="parent" | |
/> | |
<Button | |
android:id="@+id/button" | |
style="?attr/materialButtonOutlinedStyle" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
app:layout_constraintEnd_toEndOf="parent" | |
app:layout_constraintTop_toBottomOf="@+id/label" | |
app:layout_constraintBottom_toBottomOf="parent" | |
android:layout_marginTop="8dp" | |
tools:text="@string/create" | |
/> | |
</merge> |
Author
mirokolodii
commented
Nov 15, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment