<?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:tools="http://schemas.android.com/tools">

    <data>

        <variable
            name="feedbackViewModel"
            type="com.datarecovery.master.module.feedback.UserFeedbackViewModel" />
    </data>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#F8F8F8">

        <androidx.appcompat.widget.Toolbar
            android:id="@+id/tool_bar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/white"
            app:layout_constraintTop_toTopOf="parent"
            app:navigationIcon="@drawable/icon_back">

            <TextView
                style="@style/Tool_Bar_Title_Txt"
                android:text="@string/feedback_title" />
        </androidx.appcompat.widget.Toolbar>


        <TextView
            android:id="@+id/tv_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginHorizontal="12dp"
            android:layout_marginTop="16dp"
            android:text="@string/feedback_content_title"
            android:textColor="@color/common_txt_color"
            android:textSize="17sp"
            android:textStyle="bold"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/tool_bar" />

        <com.datarecovery.master.widget.IgnoreNoEnterActionEditText
            android:id="@+id/et_suggestion"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_marginTop="12dp"
            android:background="@drawable/bg_feedback_print"
            android:gravity="start"
            android:hint="@string/feedback_hint"
            android:imeOptions="actionDone"
            android:inputType="textMultiLine"
            android:lineSpacingMultiplier="1.1"
            android:maxLength="500"
            android:padding="16dp"
            android:text="@={feedbackViewModel.etContent}"
            android:textColor="@color/common_txt_color"
            android:textColorHint="#A7A7A7"
            android:textSize="15sp"
            app:layout_constraintDimensionRatio="336:270"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/tv_title"
            app:layout_constraintWidth_percent="0.9333333333333333" />


        <TextView
            android:id="@+id/tv_et_limit"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="16dp"
            android:layout_marginBottom="16dp"
            android:text='@{feedbackViewModel.etContent.length() + "/500" }'
            android:textColor="#A7A7A7"
            android:textSize="13sp"
            app:layout_constraintBottom_toBottomOf="@+id/et_suggestion"
            app:layout_constraintEnd_toEndOf="@+id/et_suggestion"
            tools:text="0/500" />

        <Space
            android:id="@+id/space"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            app:layout_constraintDimensionRatio="360:40"
            app:layout_constraintTop_toBottomOf="@+id/et_suggestion" />

        <TextView
            android:id="@+id/tv_submit"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:background="@drawable/bg_common_btn"
            android:gravity="center"
            android:onClick="@{()-> feedbackViewModel.submitClick()}"
            android:text="@string/feedback_submit"
            android:textColor="@color/white"
            android:textSize="16sp"
            android:textStyle="bold"
            app:layout_constraintDimensionRatio="328:44"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/space"
            app:layout_constraintWidth_percent="0.9111111111111111" />


    </androidx.constraintlayout.widget.ConstraintLayout>
</layout>