<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:focusable="true"
    android:focusableInTouchMode="true"
    android:clickable="true"
    tools:context=".fragments.ReceiveTransactionFragment">

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/centeredVerticalGuideline"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:layout_constraintGuide_percent="0.5"/>

    <com.google.android.material.textfield.TextInputLayout
        android:id="@+id/tilAmount"
        style="@style/Widget.Bitsy.TextInputLayout"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/activity_vertical_margin"
        android:layout_marginStart="@dimen/activity_horizontal_margin"
        android:layout_marginEnd="12dp"
        android:hint="@string/text__amount"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toStartOf="@id/centeredVerticalGuideline">

        <cy.agorise.bitsybitshareswallet.views.MyTextInputEditText
            android:id="@+id/tietAmount"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:maxLines="1"
            android:inputType="numberDecimal"/>

    </com.google.android.material.textfield.TextInputLayout>

    <com.google.android.material.textfield.TextInputLayout
            android:id="@+id/tilAssetSpinner"
            style="@style/Widget.Bitsy.TextInputLayout"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:hint="@string/text__asset"
            android:layout_marginStart="12dp"
            android:layout_marginEnd="@dimen/activity_horizontal_margin"
            app:layout_constraintTop_toTopOf="@id/tilAmount"
            app:layout_constraintStart_toEndOf="@id/centeredVerticalGuideline"
            app:layout_constraintEnd_toEndOf="parent">

        <cy.agorise.bitsybitshareswallet.views.MyTextInputEditText
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text=" "
                android:textAlignment="textEnd"
                android:enabled="false"
                android:maxLines="1"
                android:inputType="numberDecimal"/>

    </com.google.android.material.textfield.TextInputLayout>

    <Spinner
        android:id="@+id/spAsset"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="6dp"
        android:layout_marginStart="4dp"
        app:layout_constraintTop_toTopOf="@+id/tilAssetSpinner"
        app:layout_constraintBottom_toBottomOf="@id/tilAssetSpinner"
        app:layout_constraintStart_toStartOf="@id/tilAssetSpinner"
        app:layout_constraintEnd_toEndOf="@id/tilAssetSpinner"/>

    <com.google.android.material.textfield.TextInputLayout
        android:id="@+id/tilAsset"
        style="@style/Widget.Bitsy.TextInputLayout"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/activity_horizontal_margin"
        android:layout_marginEnd="@dimen/activity_horizontal_margin"
        android:layout_marginTop="@dimen/spacing_same_topic"
        android:visibility="visible"
        android:hint="@string/text__asset"
        app:layout_constraintTop_toBottomOf="@id/tilAmount"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent">

        <cy.agorise.bitsybitshareswallet.views.MyTextInputAutoCompleteTextView
            android:id="@+id/actvAsset"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingTop="12dp"
            android:paddingBottom="12dp"
            android:paddingStart="12dp"
            android:paddingEnd="8dp"
            android:maxLines="1"
            android:lines="1"
            android:imeOptions="actionDone"/>

    </com.google.android.material.textfield.TextInputLayout>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/container"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:paddingStart="@dimen/activity_horizontal_margin"
        android:paddingEnd="@dimen/activity_horizontal_margin"
        android:background="?android:windowBackground"
        app:layout_constraintTop_toBottomOf="@+id/tilAsset"
        app:layout_constraintBottom_toBottomOf="parent">

        <ImageView
            android:id="@+id/ivQR"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_marginTop="@dimen/spacing_different_topic"
            android:layout_marginBottom="@dimen/spacing_same_topic"
            app:layout_constraintDimensionRatio="1:1"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toTopOf="@+id/llText"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.5"/>

        <LinearLayout
            android:id="@+id/llText"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/spacing_same_topic"
            android:orientation="vertical"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/ivQR">

            <TextView
                android:id="@+id/tvPleasePay"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:maxLines="1"
                tools:text="Please Pay: 12.25316 BTS"
                android:textAppearance="@style/TextAppearance.Bitsy.Body1"
                android:textAlignment="center"
                app:layout_constraintBottom_toTopOf="@id/tvTo"/>

            <TextView
                android:id="@+id/tvTo"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:maxLines="1"
                tools:text="To: seventest-3"
                android:textAppearance="@style/TextAppearance.Bitsy.Body1"
                android:textAlignment="center"
                app:layout_constraintBottom_toBottomOf="parent"/>

        </LinearLayout>

    </androidx.constraintlayout.widget.ConstraintLayout>

</androidx.constraintlayout.widget.ConstraintLayout>