<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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:id="@+id/main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/main_bg"
    android:paddingStart="16dp"
    android:paddingTop="16dp"
    android:paddingEnd="16dp"
    tools:context=".viewui.MainActivity">


    <ImageView
        android:id="@+id/iv_main_history"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingEnd="20dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:srcCompat="@drawable/main_history" />

    <TextView
        android:id="@+id/tv_main_title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/text_main_title"
        android:textColor="@color/main_text_ff1f1724"
        android:textSize="18sp"
        android:textStyle="bold"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        tools:layout_editor_absoluteY="108dp" />

    <ImageView
        android:id="@+id/iv_main_setting"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingStart="20dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:srcCompat="@drawable/main_setting" />


    <androidx.core.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginTop="43dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/tv_main_title">

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

            <LinearLayout
                android:id="@+id/change_language"
                android:layout_width="match_parent"
                android:layout_height="48dp"
                android:layout_gravity="center_horizontal"
                android:elevation="2dp"
                android:orientation="horizontal">

                <TextView
                    android:id="@+id/ch_source_language"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:background="@drawable/button_r20_white_bg"
                    android:drawablePadding="25dp"
                    android:ellipsize="end"
                    android:gravity="center"
                    android:maxLines="1"
                    android:paddingStart="16dp"
                    android:paddingEnd="12dp"
                    android:text="@string/text_source_language"
                    android:textColor="@color/main_text_ff1f1724"
                    android:textSize="16sp"
                    android:textStyle="bold"
                    app:drawableEndCompat="@drawable/ic_down_choose" />

                <ImageView
                    android:id="@+id/iv_main_exChange"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:layout_marginStart="12dp"
                    android:layout_marginEnd="12dp"
                    android:background="@drawable/button_r20_white_bg"
                    android:paddingStart="12dp"
                    android:paddingTop="6dp"
                    android:paddingEnd="12dp"
                    android:paddingBottom="6dp"
                    android:src="@drawable/ic_exchage" />

                <TextView
                    android:id="@+id/ch_target_language"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:background="@drawable/button_r20_white_bg"
                    android:drawablePadding="25dp"
                    android:ellipsize="end"
                    android:gravity="center"
                    android:maxLines="1"
                    android:paddingStart="16dp"
                    android:paddingEnd="12dp"
                    android:text="@string/text_target_language"
                    android:textColor="@color/main_text_ff1f1724"
                    android:textSize="16sp"
                    android:textStyle="bold"
                    app:drawableEndCompat="@drawable/ic_down_choose" />
            </LinearLayout>

            <LinearLayout
                android:id="@+id/ll_main_enter_text"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="12dp"
                android:background="@drawable/button_r20_white_bg"
                android:orientation="vertical"
                android:paddingStart="12dp"
                android:paddingTop="16dp"
                android:paddingEnd="12dp"
                android:paddingBottom="16dp">

                <EditText
                    android:id="@+id/et_text"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@android:color/transparent"
                    android:gravity="start|top"
                    android:hint="@string/main_text_enter"
                    android:maxLines="5"
                    android:minHeight="140dp"
                    android:selectAllOnFocus="true"
                    android:textColor="@color/main_text_ff1f1724"
                    android:textSize="16sp"
                    android:textStyle="bold" />

                <TextView
                    android:id="@+id/tv_main_limit_text"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="0/1800"
                    android:textColor="@color/main_text_ff0e8ce8"
                    android:textSize="12sp" />

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="12dp">


                    <TextView
                        android:id="@+id/tv_main_paste"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentStart="true"
                        android:layout_centerVertical="true"
                        android:background="@drawable/button_r10_gray_bg"
                        android:drawableStart="@drawable/main_paste"
                        android:drawablePadding="4dp"
                        android:gravity="center"
                        android:paddingStart="8dp"
                        android:paddingTop="4dp"
                        android:paddingEnd="8dp"
                        android:paddingBottom="4dp"
                        android:text="@string/main_paste_text" />

                    <ImageView
                        android:id="@+id/tv_main_voice"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentEnd="true"
                        android:layout_centerVertical="true"
                        android:src="@drawable/main_voice_text" />

                    <TextView
                        android:id="@+id/tv_main_trans"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentEnd="true"
                        android:layout_centerVertical="true"
                        android:background="@drawable/button_r24_blue_bg"
                        android:drawablePadding="4dp"
                        android:paddingStart="16dp"
                        android:paddingTop="9dp"
                        android:paddingEnd="16dp"
                        android:paddingBottom="9dp"
                        android:text="@string/main_try_text"
                        android:textColor="@color/main_bg_fff9f9f9"
                        android:visibility="gone"
                        app:drawableEndCompat="@drawable/ic_arrow_try" />

                </RelativeLayout>

            </LinearLayout>

            <FrameLayout
                android:id="@+id/home_native"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="20dp"
                android:background="@drawable/button_r20_white_bg"
                android:minHeight="120dp" />

            <LinearLayout
                android:id="@+id/ll_main_quick"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="16dp"
                android:background="@drawable/button_r20_white_bg"
                android:orientation="vertical"
                android:padding="16dp">

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

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center"
                        android:drawablePadding="12dp"
                        android:gravity="center"
                        android:text="@string/main_quick_text"
                        android:textSize="14sp"
                        android:textStyle="bold"
                        app:drawableStartCompat="@drawable/main_ic_quick" />

                    <View
                        android:layout_width="0dp"
                        android:layout_height="1dp"
                        android:layout_gravity="center"
                        android:layout_weight="1" />

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center"
                        android:drawablePadding="12dp"
                        android:gravity="center"
                        android:paddingStart="20dp"
                        android:text="@string/main_quick_set"
                        android:textColor="@color/main_text_ff808080"
                        android:textSize="12sp"
                        android:visibility="gone"
                        app:drawableEndCompat="@drawable/ic_arrow_right" />


                </LinearLayout>

                <ImageView
                    android:id="@+id/iv_quick_start"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:paddingTop="11dp"
                    android:paddingBottom="11dp"
                    android:src="@drawable/main_setting_quick_def" />
            </LinearLayout>

            <LinearLayout
                android:id="@+id/ll_ph"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="12dp">

                <TextView
                    android:id="@+id/tv_main_photo_trans"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"

                    android:layout_weight="1"
                    android:background="@drawable/button_r20_white_bg"
                    android:drawablePadding="12dp"
                    android:gravity="center"
                    android:paddingTop="16dp"
                    android:paddingBottom="16dp"
                    android:text="@string/main_photo_trans"
                    android:textColor="@color/main_text_ff1f1724"

                    android:textSize="14sp"
                    android:textStyle="bold"
                    app:drawableTopCompat="@drawable/main_photo" />

                <TextView
                    android:id="@+id/tv_main_dic"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:layout_marginStart="8dp"
                    android:layout_weight="1"
                    android:background="@drawable/button_r20_white_bg"
                    android:drawablePadding="12dp"
                    android:gravity="center"
                    android:paddingTop="16dp"
                    android:paddingBottom="16dp"
                    android:text="@string/main_dictionary"
                    android:textColor="@color/main_text_ff1f1724"
                    android:textSize="14sp"
                    android:textStyle="bold"
                    android:visibility="gone"
                    app:drawableTopCompat="@drawable/main_dic" />
            </LinearLayout>

        </LinearLayout>
    </androidx.core.widget.NestedScrollView>

</androidx.constraintlayout.widget.ConstraintLayout>