<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:card_view="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools">

    <data>
        <variable
            name="viewmodel"
            type="com.appttude.h_mal.easycc.mvvm.ui.app.MainViewModel" />
    </data>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:focusable="false"
        android:focusableInTouchMode="true"
        tools:context="com.appttude.h_mal.easycc.mvvm.ui.app.MainActivity">

        <RelativeLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:layout_margin="12dp">

            <LinearLayout
                android:id="@+id/whole_view"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginBottom="18dp"
                    android:orientation="vertical">
                    <androidx.cardview.widget.CardView
                        style="@style/cardview_theme">

                        <TextView
                            android:tag="top"
                            android:id="@+id/currency_one"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_margin="12dp"
                            android:text="@{viewmodel.rateIdFrom}"
                            android:textColor="@color/colour_five"
                            android:textSize="18sp" />
                    </androidx.cardview.widget.CardView>


                    <EditText
                        android:id="@+id/topInsertValue"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginBottom="6dp"
                        android:layout_marginTop="6dp"
                        android:background="@drawable/round_edit_text"
                        android:ems="10"
                        android:text="@={viewmodel.topVal}"
                        android:hint="insert value one"
                        android:textColorHighlight="#608d91"
                        android:inputType="numberDecimal"
                        android:padding="12dp"
                        android:tag="from"
                        android:selectAllOnFocus="true" />

                </LinearLayout>

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

                    <androidx.cardview.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
                        style="@style/cardview_theme">

                        <TextView
                            android:id="@+id/currency_two"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_margin="12dp"
                            android:text="@{viewmodel.rateIdTo}"
                            android:tag="bottom"
                            android:textColor="@color/colour_five"
                            android:textSize="18sp" />
                    </androidx.cardview.widget.CardView>


                    <EditText
                        android:id="@+id/bottomInsertValues"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="6dp"
                        android:layout_weight="7"
                        android:background="@drawable/round_edit_text"
                        android:ems="10"
                        android:text="@={viewmodel.bottomVal}"
                        android:hint="insert value two"
                        android:textColorHighlight="#608d91"
                        android:inputType="numberDecimal"
                        android:padding="12dp"
                        android:tag="to"
                        android:selectAllOnFocus="true" />

                </LinearLayout>

            </LinearLayout>

            <ProgressBar
                android:id="@+id/progressBar"
                style="?android:attr/progressBarStyle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:indeterminate="true"
                android:indeterminateTint="@color/colour_four"
                android:indeterminateTintMode="src_atop"
                android:visibility="gone"/>
        </RelativeLayout>
    </RelativeLayout>

</layout>
