<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.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="0dp"
    android:layout_weight="1"
    tools:layout_height="match_parent">

    <include layout="@layout/dsl_settings_toolbar" />

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/recycler"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="20dp"
        android:orientation="vertical"
        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
        app:layout_constrainedHeight="true"
        app:layout_constraintBottom_toTopOf="@id/text_input"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/toolbar"
        app:layout_constraintVertical_bias="0"
        app:layout_constraintVertical_chainStyle="packed" />

    <TextView
        android:id="@+id/description"
        android:layout_width="0dp"
        android:layout_height="48sp"
        android:layout_marginStart="@dimen/dsl_settings_gutter"
        android:gravity="center_vertical"
        android:text="@string/GiftFlowConfirmationFragment__one_time_donation"
        android:textAppearance="@style/Signal.Text.Body"
        app:layout_constraintBottom_toTopOf="@id/google_pay_button"
        app:layout_constraintEnd_toStartOf="@id/amount"
        app:layout_constraintStart_toStartOf="parent" />

    <include
        android:id="@+id/text_input"
        layout="@layout/dsl_multiline_text_input"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        app:layout_constraintBottom_toTopOf="@id/description"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/recycler" />

    <TextView
        android:id="@+id/amount"
        android:layout_width="wrap_content"
        android:layout_height="48sp"
        android:layout_marginEnd="@dimen/dsl_settings_gutter"
        android:gravity="center_vertical"
        android:textAppearance="@style/Signal.Text.Title"
        app:layout_constraintBottom_toTopOf="@id/google_pay_button"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/description"
        tools:text="$10" />

    <org.thoughtcrime.securesms.badges.gifts.flow.GooglePayButton
        android:id="@+id/google_pay_button"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/dsl_settings_gutter"
        android:layout_marginEnd="@dimen/dsl_settings_gutter"
        android:layout_marginBottom="16dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>