<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="8dp"
    android:fillViewport="true">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <LinearLayout xmlns:app="http://schemas.android.com/apk/res-auto"
            android:id="@+id/llWarning"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:layout_marginBottom="8dp"
            android:background="?attr/colorError"
            android:orientation="horizontal">

            <TextView
                android:id="@+id/tvWarning"
                style="@style/MoneroLabel.Heading"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:drawablePadding="8dp"
                android:gravity="start|center_vertical"
                android:padding="8dp"
                android:textColor="?colorOnError"
                app:drawableStartCompat="@drawable/ic_warning_24dp"
                app:drawableTint="?colorOnError"
                tools:text="Transaction amount locked until block 322229877 (approx. 2.4 months)" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:padding="16dp">

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_weight="2"
                android:gravity="end"
                android:orientation="vertical">

                <TextView
                    android:id="@+id/tvTxAmount"
                    style="@style/MoneroText.PosAmount"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:selectAllOnFocus="true"
                    android:textIsSelectable="true"
                    android:transitionName="@string/tx_details_transition_name"
                    tools:text="+ 1,092.00229" />

                <TextView
                    android:id="@+id/tvTxPocketChangeAmount"
                    style="@style/MoneroText.PosPocketChange"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:selectAllOnFocus="true"
                    android:textIsSelectable="true"
                    tools:text="PocketChange 1,092.00229" />

                <TextView
                    android:id="@+id/tvTxFee"
                    style="@style/MoneroText.PosFee"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:selectAllOnFocus="true"
                    android:textIsSelectable="true"
                    tools:text="Fee 0.0003688271" />
            </LinearLayout>

            <TextView
                android:id="@+id/tvTxTimestamp"
                style="@style/MoneroText.PosDate"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_marginStart="24dp"
                android:layout_weight="1"
                android:gravity="center"
                android:selectAllOnFocus="true"
                android:textIsSelectable="true"
                tools:text="2017-10-09 12:44:13 +0200" />
        </LinearLayout>

        <com.google.android.material.card.MaterialCardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
            android:id="@+id/cvXmrTo"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="16dp"
            android:foreground="?android:attr/selectableItemBackground"
            card_view:contentPadding="8dp">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">

                <ImageView
                    android:id="@+id/tvXmrToLogo"
                    android:layout_width="match_parent"
                    android:layout_height="32dp"
                    android:layout_marginTop="8dp"
                    android:layout_marginBottom="8dp"
                    android:src="@drawable/ic_sideshift_white" />

                <TableLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:shrinkColumns="1">

                    <TableRow>

                        <TextView
                            style="@style/MoneroLabel.Small"
                            android:layout_gravity="center_vertical"
                            android:gravity="end"
                            android:padding="8dp"
                            android:text="@string/tx_amount" />

                        <TextView
                            android:id="@+id/tvTxAmountBtc"
                            style="@style/MoneroText"
                            android:gravity="start"
                            android:padding="8dp"
                            android:selectAllOnFocus="true"
                            android:textIsSelectable="true"
                            tools:text="1.008 BTC" />
                    </TableRow>

                    <TableRow>

                        <TextView
                            style="@style/MoneroLabel.Small"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_gravity="top"
                            android:gravity="end"
                            android:padding="8dp"
                            android:text="@string/tx_destination" />

                        <TextView
                            android:id="@+id/tvDestinationBtc"
                            style="@style/MoneroText"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:gravity="start"
                            android:padding="8dp"
                            android:selectAllOnFocus="true"
                            android:textIsSelectable="true"
                            tools:text="mjn127C5wRQCULksMYMFHLp9UTdQuCfbZ9" />
                    </TableRow>

                    <TableRow>

                        <TextView
                            android:id="@+id/tvXmrToKeyLabel"
                            style="@style/MoneroLabel.Small"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_gravity="center_vertical"
                            android:gravity="end"
                            android:padding="8dp"
                            android:text="@string/label_send_btc_xmrto_key_lb" />

                        <LinearLayout>

                            <TextView
                                android:id="@+id/tvTxXmrToKey"
                                style="@style/MoneroText"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:background="?android:attr/colorBackground"
                                android:drawablePadding="16dp"
                                android:paddingStart="8dp"
                                android:paddingTop="8dp"
                                android:paddingEnd="8dp"
                                android:paddingBottom="8dp"
                                android:textColor="?attr/colorPrimary"
                                card_view:drawableEndCompat="@drawable/ic_content_copy_24dp"
                                tools:text="f173118220f1461841da" />
                        </LinearLayout>
                    </TableRow>
                </TableLayout>

                <TextView
                    android:id="@+id/tvXmrToSupport"
                    style="@style/MoneroText.Medium"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:layout_marginTop="8dp"
                    android:layout_marginBottom="8dp"
                    android:drawablePadding="8dp"
                    android:gravity="center"
                    android:text="@string/label_send_btc_xmrto_info"
                    card_view:drawableEndCompat="@drawable/ic_launch_external" />

            </LinearLayout>

        </com.google.android.material.card.MaterialCardView>

        <TableLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:shrinkColumns="1">

            <TableRow>

                <TextView
                    style="@style/MoneroLabel.Small"
                    android:layout_gravity="top"
                    android:gravity="end"
                    android:padding="8dp"
                    android:text="@string/tx_account" />

                <RelativeLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content">

                    <TextView
                        android:id="@+id/tvAccount"
                        style="@style/MoneroText"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_alignParentStart="true"
                        android:layout_alignParentTop="true"
                        android:gravity="start"
                        android:paddingStart="8dp"
                        android:paddingTop="8dp"
                        android:paddingEnd="8dp"
                        android:transitionName="@string/subaddress_txinfo_transition_name"
                        tools:text="(0,1) #17" />

                    <TextView
                        android:id="@+id/tvAddress"
                        style="@style/MoneroText"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_below="@+id/tvAccount"
                        android:gravity="start"
                        android:paddingStart="8dp"
                        android:paddingEnd="8dp"
                        android:paddingBottom="8dp"
                        android:selectAllOnFocus="true"
                        android:textIsSelectable="true"
                        tools:text="4BKjy1uVRTPiz4pHyaXXawb82XpzLiowSDd8rEQJGqvN6AD6kWosLQ6VJXW9sghopxXgQSh1RTd54JdvvCRsXiF41xvfeW5" />
                </RelativeLayout>
            </TableRow>

            <TableRow>

                <TextView
                    style="@style/MoneroLabel.Small"
                    android:layout_gravity="top"
                    android:gravity="end"
                    android:padding="8sp"
                    android:text="@string/tx_notes" />

                <com.google.android.material.textfield.TextInputLayout
                    style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">

                    <com.google.android.material.textfield.TextInputEditText
                        android:id="@+id/etTxNotes"
                        style="@style/MoneroEdit"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:hint="@string/tx_notes_hint"
                        android:inputType="textMultiLine" />
                </com.google.android.material.textfield.TextInputLayout>
            </TableRow>

            <TableRow>

                <TextView
                    style="@style/MoneroLabel.Small"
                    android:layout_gravity="top"
                    android:gravity="end"
                    android:padding="8dp"
                    android:text="@string/tx_destination" />

                <TextView
                    android:id="@+id/tvDestination"
                    style="@style/MoneroText"
                    android:gravity="start"
                    android:padding="8dp"
                    android:selectAllOnFocus="true"
                    android:textIsSelectable="true" />
            </TableRow>

            <TableRow>

                <TextView
                    style="@style/MoneroLabel.Small"
                    android:layout_gravity="top"
                    android:gravity="end"
                    android:padding="8dp"
                    android:text="@string/tx_paymentId" />

                <TextView
                    android:id="@+id/tvTxPaymentId"
                    style="@style/MoneroText"
                    android:gravity="start"
                    android:padding="8dp"
                    android:selectAllOnFocus="true"
                    android:textIsSelectable="true" />
            </TableRow>

            <TableRow>

                <TextView
                    style="@style/MoneroLabel.Small"
                    android:layout_gravity="top"
                    android:gravity="end"
                    android:padding="8dp"
                    android:text="@string/tx_id" />

                <TextView
                    android:id="@+id/tvTxId"
                    style="@style/MoneroText"
                    android:gravity="start"
                    android:padding="8dp"
                    android:selectAllOnFocus="true"
                    android:textIsSelectable="true" />
            </TableRow>

            <TableRow>

                <TextView
                    style="@style/MoneroLabel.Small"
                    android:layout_gravity="top"
                    android:gravity="end"
                    android:padding="8dp"
                    android:text="@string/tx_key" />

                <TextView
                    android:id="@+id/tvTxKey"
                    style="@style/MoneroText"
                    android:gravity="start"
                    android:padding="8dp"
                    android:selectAllOnFocus="true"
                    android:textIsSelectable="true" />
            </TableRow>

            <TableRow>

                <TextView
                    style="@style/MoneroLabel.Small"
                    android:layout_gravity="top"
                    android:gravity="end"
                    android:padding="8dp"
                    android:text="@string/tx_blockheight" />

                <TextView
                    android:id="@+id/tvTxBlockheight"
                    style="@style/MoneroText"
                    android:gravity="start"
                    android:padding="8dp"
                    android:selectAllOnFocus="true"
                    android:textIsSelectable="true" />
            </TableRow>

            <TableRow>

                <TextView
                    style="@style/MoneroLabel.Small"
                    android:layout_gravity="top"
                    android:gravity="end"
                    android:padding="8dp"
                    android:text="@string/tx_transfers" />

                <TextView
                    android:id="@+id/tvTxTransfers"
                    style="@style/MoneroText"
                    android:gravity="start"
                    android:padding="8dp"
                    android:selectAllOnFocus="true"
                    android:textIsSelectable="true" />

            </TableRow>

        </TableLayout>
    </LinearLayout>
</ScrollView>