<?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"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/mode_bg_color">

    <LinearLayout
        android:id="@+id/title_layout"
        android:layout_width="match_parent"
        android:layout_height="@dimen/convert_132px"
        android:orientation="horizontal">

        <ImageView
            android:id="@+id/iv_back"
            android:layout_width="@dimen/convert_122px"
            android:layout_height="@dimen/convert_132px"
            android:background="@drawable/ic_cook_back" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/tv_mode_name"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@color/mode_detail_title_bg_color"
            android:gravity="center"
            android:textColor="@color/color_fff"
            android:textSize="@dimen/convert_54px" />
    </LinearLayout>

    <ImageView
        android:id="@+id/iv_banner"
        android:layout_width="match_parent"
        android:layout_height="@dimen/convert_500px"
        android:layout_below="@id/title_layout" />

    <ImageView
        android:id="@+id/iv_turbo"
        android:layout_width="@dimen/convert_120px"
        android:layout_height="@dimen/convert_120px"
        android:layout_below="@id/iv_banner"
        android:layout_marginStart="@dimen/convert_48px"
        android:layout_marginTop="@dimen/convert_60px"
        android:background="@drawable/ic_turbo_entrance" />

    <ImageView
        android:id="@+id/iv_weight"
        android:layout_width="@dimen/convert_120px"
        android:layout_height="@dimen/convert_120px"
        android:layout_below="@id/iv_banner"
        android:layout_alignParentEnd="true"
        android:layout_marginEnd="@dimen/convert_48px"
        android:layout_marginTop="@dimen/convert_60px"
        android:background="@drawable/ic_weight_entrance" />

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/function_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@id/iv_banner"
        android:paddingHorizontal="@dimen/convert_75px">

        <com.develop.step.widgets.RingControlView
            app:layout_constraintTop_toTopOf="parent"
            android:id="@+id/temp_ring_view"
            android:layout_width="@dimen/convert_500px"
            android:layout_height="@dimen/convert_500px"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintVertical_bias="0.35" />



        <com.develop.food.base.widgets.SteamFire
            android:visibility="gone"
            android:id="@+id/steam_fire"
            app:layout_constraintTop_toTopOf="@id/temp_ring_view"
            android:layout_height="@dimen/convert_500px"
            android:layout_width="@dimen/convert_500px"
            app:layout_constraintStart_toStartOf="@id/temp_ring_view"
             />

        <com.develop.step.widgets.RingControlView
            android:id="@+id/speed_ring_view"
            android:visibility="gone"
            android:layout_width="@dimen/convert_500px"
            android:layout_height="@dimen/convert_500px"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintVertical_bias="0.35" />
        
        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/temp_ring_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="80°C"
            android:textColor="@color/ring_text_color"
            android:textSize="@dimen/convert_90px"
            app:layout_constraintBottom_toBottomOf="@+id/temp_ring_view"
            app:layout_constraintEnd_toEndOf="@+id/temp_ring_view"
            app:layout_constraintStart_toStartOf="@+id/temp_ring_view"
            app:layout_constraintTop_toTopOf="@+id/temp_ring_view"
            app:layout_constraintVertical_bias="0.45" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/speed_ring_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="2"
            android:visibility="gone"
            android:textColor="#E60012"
            android:textSize="@dimen/convert_90px"
            app:layout_constraintBottom_toBottomOf="@+id/temp_ring_view"
            app:layout_constraintEnd_toEndOf="@+id/temp_ring_view"
            app:layout_constraintStart_toStartOf="@+id/temp_ring_view"
            app:layout_constraintTop_toTopOf="@+id/temp_ring_view"
            app:layout_constraintVertical_bias="0.45" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/temp_ring_text_cooking"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="80°C"
            android:textColor="#FFA627"
            android:textSize="@dimen/convert_54px"
            android:visibility="gone"
            app:layout_constraintEnd_toEndOf="@+id/temp_ring_view"
            app:layout_constraintStart_toStartOf="@+id/temp_ring_view"
            app:layout_constraintTop_toBottomOf="@+id/temp_ring_text" />

        <com.develop.food.base.widgets.TimePickerView
            android:id="@+id/cl_set_time"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:visibility="gone"
            android:layout_marginBottom="@dimen/convert_74px"
            app:layout_constraintBottom_toTopOf="@+id/cl_cook_temp"
            app:layout_constraintEnd_toEndOf="parent"
            app:time_color="@color/color_E60012"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintVertical_bias="0.36"/>

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/tv_countdown_time"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/convert_6px"
            android:text="--05:00--"
            android:textColor="#ffffff"
            android:textSize="@dimen/convert_54px"
            android:visibility="gone"
            app:layout_constraintBottom_toTopOf="@+id/cl_set_time"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent" />

        <com.develop.food.base.widgets.DirectionView
            android:id="@+id/fl_direction"
            android:layout_width="@dimen/convert_500px"
            android:layout_height="@dimen/convert_500px"
            android:layout_marginTop="@dimen/convert_33px"
            android:layout_marginBottom="@dimen/convert_74px"
            android:visibility="gone"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintVertical_bias="0.36" />

        <com.develop.food.base.widgets.CookCardView
            android:id="@+id/cl_cook_temp"
            android:layout_width="@dimen/convert_210px"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/convert_14px"
            app:cardType="Temperature"
            app:cardSelected="true"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/temp_ring_view" />


        <com.develop.food.base.widgets.CookCardView
            android:id="@+id/cl_cook_time"
            android:layout_width="@dimen/convert_210px"
            android:layout_height="wrap_content"
            app:cardType="Cook_time"
            app:layout_constraintEnd_toStartOf="@+id/cl_cook_speed"
            app:layout_constraintStart_toEndOf="@+id/cl_cook_temp"
            app:layout_constraintTop_toTopOf="@+id/cl_cook_temp"/>


        <com.develop.food.base.widgets.CookCardView
            android:id="@+id/cl_cook_speed"
            android:layout_width="@dimen/convert_210px"
            android:layout_height="wrap_content"
            app:cardType="Speed"
            app:layout_constraintEnd_toStartOf="@+id/cl_cook_direction"
            app:layout_constraintStart_toEndOf="@+id/cl_cook_time"
            app:layout_constraintTop_toTopOf="@+id/cl_cook_temp"/>

        <com.develop.food.base.widgets.CookCardView
            android:id="@+id/cl_cook_direction"
            app:cardType="Direction"
            android:layout_width="@dimen/convert_210px"
            android:layout_height="wrap_content"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="@+id/cl_cook_temp"/>


        <androidx.appcompat.widget.AppCompatTextView
            android:layout_marginTop="@dimen/convert_44px"
            android:id="@+id/btn_start"
            android:layout_width="match_parent"
            android:layout_height="@dimen/convert_120px"
            android:layout_marginBottom="@dimen/convert_42px"
            android:background="@drawable/bg_orange_button"
            android:gravity="center"
            android:text="@string/start"
            android:textColor="@color/home_menu_title_color"
            android:textSize="@dimen/convert_54px"
            app:layout_constraintTop_toBottomOf="@id/cl_cook_speed" />

        <androidx.appcompat.widget.AppCompatTextView
            android:layout_marginTop="@dimen/convert_44px"
            android:id="@+id/btn_resume"
            android:layout_width="match_parent"
            android:layout_height="@dimen/convert_120px"
            android:layout_marginBottom="@dimen/convert_42px"
            android:background="@drawable/bg_orange_button"
            android:gravity="center"
            android:text="@string/resume"
            android:visibility="invisible"
            android:textColor="@color/home_menu_title_color"
            android:textSize="@dimen/convert_54px"
            app:layout_constraintTop_toBottomOf="@id/cl_cook_speed" />

        <androidx.appcompat.widget.AppCompatTextView
            android:layout_marginTop="@dimen/convert_44px"
            android:id="@+id/btn_pause"
            android:layout_width="match_parent"
            android:layout_height="@dimen/convert_120px"
            android:layout_marginBottom="@dimen/convert_42px"
            android:background="@drawable/bg_orange_button"
            android:gravity="center"
            android:text="@string/pause"
            android:visibility="visible"
            android:textColor="@color/home_menu_title_color"
            android:textSize="@dimen/convert_54px"
            app:layout_constraintTop_toBottomOf="@id/cl_cook_speed" />

        <androidx.appcompat.widget.AppCompatTextView
            android:layout_marginTop="@dimen/convert_22px"
            android:id="@+id/btn_stop"
            android:visibility="gone"
            android:layout_width="match_parent"
            android:layout_height="@dimen/convert_120px"
            android:background="@drawable/bg_white_button"
            android:gravity="center"
            android:text="@string/stop"
            android:textColor="@color/mode_detail_title_bg_color"
            android:textSize="@dimen/convert_54px"
            app:layout_constraintTop_toBottomOf="@id/btn_start" />

        <androidx.appcompat.widget.AppCompatTextView
            android:layout_marginTop="@dimen/convert_44px"
            android:id="@+id/btn_confirm"
            android:visibility="visible"
            android:layout_width="match_parent"
            android:layout_height="@dimen/convert_120px"
            android:background="@drawable/bg_orange_button"
            android:gravity="center"
            android:text="@string/confirm"
            android:textColor="@color/home_menu_title_color"
            android:textSize="@dimen/convert_54px"
            app:layout_constraintTop_toBottomOf="@id/cl_cook_speed" />

        <androidx.appcompat.widget.AppCompatTextView
            android:layout_marginTop="@dimen/convert_22px"
            android:id="@+id/btn_cancel"
            android:visibility="gone"
            android:layout_width="match_parent"
            android:layout_height="@dimen/convert_120px"
            android:background="@drawable/bg_white_button"
            android:gravity="center"
            android:text="@string/cancel"
            android:textColor="@color/mode_detail_title_bg_color"
            android:textSize="@dimen/convert_54px"
            app:layout_constraintTop_toBottomOf="@id/btn_confirm" />

        <ImageView
            android:visibility="gone"
            android:id="@+id/iv_turbo_view"
            android:layout_width="@dimen/convert_200px"
            android:layout_height="@dimen/convert_200px"
            android:layout_marginTop="@dimen/convert_90px"
            android:background="@drawable/ic_turbo_unselected"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/cl_cook_speed" />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/ll_weight_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:layout_alignParentBottom="true">

        <TextView
            android:id="@+id/tv_weight_num"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="#fff"
            android:textSize="@dimen/convert_180px"
            android:text="50g"
            android:layout_marginBottom="@dimen/convert_80px"
            android:includeFontPadding="false"
            android:layout_gravity="center_horizontal"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintBottom_toTopOf="@+id/weight_view"/>

        <com.develop.step.widgets.WeightView
            android:id="@+id/weight_view"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/convert_83px"
            app:layout_constraintBottom_toBottomOf="parent"/>

        <TextView
            android:id="@+id/tv_weight_tare"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:paddingHorizontal="@dimen/convert_80px"
            android:paddingVertical="@dimen/convert_20px"
            android:textColor="#fff"
            android:textSize="@dimen/convert_56px"
            android:text="@string/tare"
            android:includeFontPadding="false"
            android:layout_marginBottom="@dimen/convert_66px"
            android:background="@drawable/bg_tare_button"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"/>

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