<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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/colorBgWhiteGray"
    tools:context=".ui.profile.activity.SettingActivity">


    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent">

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

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginTop="@dimen/top_padding"
                android:background="@android:color/white"
                android:orientation="vertical">

                <View
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:background="@color/colorLineSettingGroup" />

                <RelativeLayout
                    android:id="@+id/llLanguage"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/order_button_height"
                    android:layout_marginStart="@dimen/default_screen_padding"
                    android:layout_marginEnd="@dimen/default_screen_padding"
                    android:tag="LANGUAGE">

                    <ImageView
                        android:id="@+id/imgrow1"
                        android:layout_width="30dp"
                        android:layout_height="30dp"
                        android:layout_alignParentStart="true"
                        android:layout_centerVertical="true"
                        android:scaleType="fitCenter"
                        android:src="@drawable/ic_language_setting"
                        app:tint="@color/colorPrimary" />

                    <com.seatel.mobilehall.util.customview.CustomTextView
                        android:id="@+id/ctv_language"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_centerVertical="true"
                        android:layout_marginStart="8dp"
                        android:layout_toEndOf="@+id/imgrow1"
                        android:text="@string/language"
                        android:textColor="@android:color/black"
                        android:textSize="@dimen/default_text_size" />

                    <androidx.cardview.widget.CardView
                        android:layout_width="28dp"
                        android:layout_height="28dp"
                        android:layout_alignParentRight="true"
                        android:layout_centerVertical="true"
                        app:cardCornerRadius="6dp">

                        <ImageView
                            android:id="@+id/img_language"
                            android:layout_width="28dp"
                            android:layout_height="28dp"
                            android:scaleType="centerCrop"
                            android:src="@drawable/img_en_flag_setting" />
                    </androidx.cardview.widget.CardView>

                </RelativeLayout>

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/order_button_height"
                    android:layout_marginStart="@dimen/default_screen_padding"
                    android:layout_marginEnd="@dimen/default_screen_padding">

                    <View
                        android:layout_width="match_parent"
                        android:layout_height="1dp"
                        android:layout_alignParentTop="true"
                        android:background="@color/colorLineSettingPart" />

                    <ImageView
                        android:id="@+id/imgrow2"
                        android:layout_width="28dp"
                        android:layout_height="28dp"
                        android:layout_alignParentStart="true"
                        android:layout_centerVertical="true"
                        android:scaleType="fitCenter"
                        android:src="@drawable/ic_notification"
                        app:tint="@color/colorPrimary" />

                    <com.seatel.mobilehall.util.customview.CustomTextView
                        android:id="@+id/ctv_notification"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_centerVertical="true"
                        android:layout_marginStart="@dimen/default_screen_padding"
                        android:layout_toEndOf="@+id/imgrow2"
                        android:text="@string/notification"
                        android:textColor="@android:color/black"
                        android:textSize="@dimen/default_text_size" />

                    <androidx.appcompat.widget.SwitchCompat
                        android:id="@+id/switchonoff"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentStart="true"
                        android:layout_alignParentEnd="true"
                        android:layout_centerVertical="true"
                        android:checked="true" />

                </RelativeLayout>

                <RelativeLayout
                    android:id="@+id/view_fingerprint"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/order_button_height"
                    android:layout_marginStart="@dimen/default_screen_padding"
                    android:layout_marginEnd="@dimen/default_screen_padding"
                    android:clickable="true"
                    android:focusable="true"
                    android:tag="FINGERPRINT">

                    <View
                        android:layout_width="match_parent"
                        android:layout_height="1dp"
                        android:layout_alignParentTop="true"
                        android:background="@color/colorLineSettingPart" />

                    <ImageView
                        android:id="@+id/img_fingeprint"
                        android:layout_width="28dp"
                        android:layout_height="28dp"
                        android:layout_alignParentStart="true"
                        android:layout_centerVertical="true"
                        android:scaleType="fitCenter"
                        android:src="@drawable/ic_enable_fingerprint"
                        app:tint="@color/colorPrimary" />

                    <com.seatel.mobilehall.util.customview.CustomTextView
                        android:id="@+id/ctv_fingerprint"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_centerVertical="true"
                        android:layout_marginStart="@dimen/default_screen_padding"
                        android:layout_toEndOf="@+id/img_fingeprint"
                        android:text="@string/enable_fingerprint"
                        android:textColor="@android:color/black"
                        android:textSize="@dimen/default_text_size" />

                    <androidx.appcompat.widget.SwitchCompat
                        android:id="@+id/switch_fingerprint"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentEnd="true"
                        android:layout_centerVertical="true"
                        android:checked="true"
                        android:clickable="false"
                        android:focusable="false" />

                </RelativeLayout>

                <View
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:background="@color/colorLineSettingGroup" />

            </LinearLayout>

            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:layout_alignParentTop="true"
                android:layout_marginTop="@dimen/top_padding"
                android:background="@color/colorLineSettingGroup" />

            <RelativeLayout
                android:id="@+id/llClearCache"
                android:layout_width="match_parent"
                android:layout_height="@dimen/order_button_height"
                android:background="@android:color/white"
                android:tag="CLEAR_CACHE">

                <ImageView
                    android:id="@+id/imgrow3"
                    android:layout_width="28dp"
                    android:layout_height="28dp"
                    android:layout_alignParentStart="true"
                    android:layout_centerVertical="true"
                    android:layout_marginStart="@dimen/default_screen_padding"
                    android:src="@drawable/ic_clear_cache_setting"
                    app:tint="@color/colorPrimary" />

                <com.seatel.mobilehall.util.customview.CustomTextView
                    android:id="@+id/ctv_clear_cache"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerVertical="true"
                    android:layout_marginStart="@dimen/default_screen_padding"
                    android:layout_toEndOf="@+id/imgrow3"
                    android:text="@string/clear_cache"
                    android:textColor="@android:color/black"
                    android:textSize="@dimen/default_text_size" />

                <FrameLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentRight="true"
                    android:layout_centerVertical="true"
                    android:layout_marginEnd="10dp">

                    <ProgressBar
                        style="?android:attr/progressBarStyleHorizontal"
                        android:layout_width="50dp"
                        android:layout_height="50dp"
                        android:max="100"
                        android:progress="0"
                        android:progressDrawable="@drawable/circular_progress_bar"
                        android:visibility="gone" />

                    <ProgressBar
                        android:id="@+id/pbAnimateClearCatche"
                        style="?android:attr/progressBarStyleHorizontal"
                        android:layout_width="50dp"
                        android:layout_height="50dp"
                        android:background="@drawable/bg_circular_progress_bar"
                        android:max="100"
                        android:progressDrawable="@drawable/circular_progress_bar" />

                    <LinearLayout
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center"
                        android:orientation="horizontal">

                        <com.seatel.mobilehall.util.customview.CustomTextView
                            android:id="@+id/tvCacheNum"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:ellipsize="middle"
                            android:gravity="center"
                            android:singleLine="true"
                            android:text="0"
                            android:textColor="@android:color/black"
                            android:textSize="@dimen/default_text_size" />

                        <com.seatel.mobilehall.util.customview.CustomTextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:ellipsize="middle"
                            android:gravity="center"
                            android:maxWidth="28dp"
                            android:singleLine="true"
                            android:text="MB"
                            android:textColor="@android:color/black"
                            android:textSize="@dimen/default_text_size"
                            android:visibility="gone" />

                    </LinearLayout>
                </FrameLayout>


            </RelativeLayout>

            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:background="@color/colorLineSettingGroup" />

            <RelativeLayout
                android:id="@+id/llVersionAvailable"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:tag="APP_VERSION">

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/order_button_height"
                    android:background="@android:color/white">

                    <ImageView
                        android:id="@+id/imgrow4"
                        android:layout_width="28dp"
                        android:layout_height="28dp"
                        android:layout_alignParentStart="true"
                        android:layout_centerVertical="true"
                        android:layout_marginStart="@dimen/default_screen_padding"
                        android:src="@drawable/ic_phone_setting"
                        app:tint="@color/colorPrimary" />

                    <com.seatel.mobilehall.util.customview.CustomTextView
                        android:id="@+id/ctv_app_version"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_centerVertical="true"
                        android:layout_marginStart="@dimen/default_screen_padding"
                        android:layout_toEndOf="@+id/imgrow4"
                        android:text="@string/app_version"
                        android:textColor="@android:color/black"
                        android:textSize="@dimen/default_text_size" />

                    <TextView
                        android:id="@+id/tv_app_version"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentRight="true"
                        android:layout_centerVertical="true"
                        android:layout_marginEnd="@dimen/default_screen_padding"
                        android:text="V 1.0"
                        android:textColor="@android:color/black"
                        android:textSize="@dimen/default_text_size" />
                </RelativeLayout>

                <View
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:layout_alignParentBottom="true"
                    android:background="@color/colorLineSettingGroup" />
            </RelativeLayout>

            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:layout_alignParentTop="true"
                android:layout_marginTop="@dimen/top_padding"
                android:background="@color/colorLineSettingGroup" />

            <RelativeLayout
                android:id="@+id/view_log_out"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:tag="LOG_OUT">

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/order_button_height"
                    android:background="@android:color/white">

                    <ImageView
                        android:id="@+id/imlogout"
                        android:layout_width="28dp"
                        android:layout_height="28dp"
                        android:layout_alignParentStart="true"
                        android:layout_centerVertical="true"
                        android:layout_marginStart="@dimen/default_screen_padding"
                        android:src="@drawable/ic_logout_menu"
                        app:tint="@color/colorPrimary" />

                    <com.seatel.mobilehall.util.customview.CustomTextView
                        android:id="@+id/ivlogout"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_centerVertical="true"
                        android:layout_marginStart="@dimen/default_screen_padding"
                        android:layout_toEndOf="@+id/imlogout"
                        android:text="@string/log_out"
                        android:textColor="@android:color/black"
                        android:textSize="@dimen/default_text_size" />

                </RelativeLayout>

                <View
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:layout_alignParentBottom="true"
                    android:background="@color/colorLineSettingGroup" />
            </RelativeLayout>


        </LinearLayout>

    </ScrollView>

    <com.seatel.mobilehall.util.customview.ErrorHandleView
        android:id="@+id/error_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_alignParentStart="true"
        android:layout_alignParentTop="true" />

</RelativeLayout>