<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView 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="match_parent"
    android:background="@color/white"
    tools:context=".ui.dashboard.DashboardFragment">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="15dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

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

            <com.google.android.material.textfield.TextInputLayout
                style="@style/ThemeOverlay.Material3.AutoCompleteTextView.OutlinedBox"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="15dp"
                android:layout_marginEnd="15dp"
                android:hint="@string/sender_s_name_or_number"
                app:endIconMode="clear_text">

                <com.google.android.material.textfield.TextInputEditText
                    android:id="@+id/name"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content" />
            </com.google.android.material.textfield.TextInputLayout>

            <com.google.android.material.textfield.TextInputLayout
                style="@style/ThemeOverlay.Material3.AutoCompleteTextView.OutlinedBox"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="15dp"
                android:layout_marginTop="15dp"
                android:layout_marginEnd="15dp"
                android:hint="@string/sms_content"
                app:endIconMode="clear_text">

                <com.google.android.material.textfield.TextInputEditText
                    android:id="@+id/message"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center|start"
                    android:inputType="textMultiLine"
                    android:maxLines="20"
                    android:minLines="10"
                    android:scrollbars="vertical" />
            </com.google.android.material.textfield.TextInputLayout>

            <com.google.android.material.materialswitch.MaterialSwitch
                android:id="@+id/read"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_marginStart="15dp"
                android:layout_marginTop="15dp"
                android:layout_marginEnd="15dp"
                android:text="@string/has_the_message_been_read" />

            <com.google.android.material.button.MaterialSplitButton
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="15dp"
                android:layout_marginTop="15dp"
                android:layout_marginEnd="15dp">

                <Button
                    android:id="@+id/selectTime"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="start|center"
                    android:text="@string/sms_sending_time"
                    app:icon="@drawable/twotone_timer_24" />


            </com.google.android.material.button.MaterialSplitButton>


            <com.google.android.material.card.MaterialCardView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_margin="15dp"

                android:orientation="vertical">

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:layout_width="match_parent"
                    android:layout_height="100dp"
                    android:layout_margin="15dp">

                    <com.google.android.material.textview.MaterialTextView
                        android:id="@+id/materialTextView"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:drawableStart="@drawable/twotone_email_24"
                        android:drawablePadding="5dp"
                        android:gravity="center|start"
                        android:textStyle="bold"
                        app:layout_constraintEnd_toStartOf="@+id/materialTextView2"
                        app:layout_constraintHorizontal_bias="0.5"
                        app:layout_constraintHorizontal_chainStyle="packed"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent"
                        tools:text="Sender" />

                    <com.google.android.material.textview.MaterialTextView
                        android:id="@+id/materialTextView2"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        app:layout_constraintBottom_toBottomOf="@+id/materialTextView"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintHorizontal_bias="0.5"
                        app:layout_constraintStart_toEndOf="@+id/materialTextView"
                        app:layout_constraintTop_toTopOf="parent"
                        tools:text="Time" />

                    <com.google.android.material.textview.MaterialTextView

                        android:id="@+id/show_msg"
                        android:layout_width="0dp"
                        android:layout_height="0dp"
                        android:layout_marginTop="4dp"
                        android:layout_marginBottom="4dp"
                        android:textStyle="italic"
                        app:layout_constraintBottom_toTopOf="@+id/materialTextView3"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintHorizontal_bias="0.153"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toBottomOf="@+id/materialTextView"
                        tools:text="Message" />

                    <com.google.android.material.textview.MaterialTextView
                        android:id="@+id/materialTextView3"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:textStyle="bold"
                        android:visibility="gone"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="parent"
                        tools:text="Read" />
                </androidx.constraintlayout.widget.ConstraintLayout>
            </com.google.android.material.card.MaterialCardView>

            <Button
                android:id="@+id/insert_mms"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="15dp"
                android:layout_marginTop="10dp"
                android:layout_marginEnd="15dp"
                android:text="@string/submit"
                android:textColor="#ffffff"
                android:textSize="13sp" />


        </LinearLayout>

        <com.google.android.material.loadingindicator.LoadingIndicator
            android:id="@+id/loading"
            style="@style/Widget.Material3.LoadingIndicator.Contained"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            tools:visibility="gone" />
    </androidx.constraintlayout.widget.ConstraintLayout>

</androidx.core.widget.NestedScrollView>