Browse Source

完善空炸功能

wbspool 1 year ago
parent
commit
9cd24c833e

+ 66 - 0
BusinessAirFryer/src/main/java/com/develop/airfryer/ui/WaterSprayStatusView.kt

@@ -0,0 +1,66 @@
+package com.develop.airfryer.ui
+
+import android.content.Context
+import android.util.AttributeSet
+import android.view.LayoutInflater
+import android.view.View
+import android.widget.LinearLayout
+import androidx.core.view.children
+import com.develop.airfryer.databinding.WaterSprayStatusViewBinding
+
+class WaterSprayStatusView(context: Context, attrs: AttributeSet) : LinearLayout(context, attrs) {
+
+    private val binding: WaterSprayStatusViewBinding
+
+    private var gear = 0;
+    private var status = false;
+
+    init {
+        binding = WaterSprayStatusViewBinding.inflate(LayoutInflater.from(context), this, true)
+        updateSelectedStatus(status)
+    }
+
+    fun updateGear(gear:Int){
+        this.gear = gear;
+        updateSelectedStatus(status)
+    }
+
+    fun updateSelectedStatus(status: Boolean) {
+        this.status = status;
+//        children.forEach { it.visibility = GONE }
+        binding.icWaterSpray0Unselected.visibility = View.GONE
+        binding.icWaterSpray0Selected.visibility = View.GONE
+        binding.icWaterSpray1Selected.visibility = View.GONE
+        binding.icWaterSpray1Unselected.visibility = View.GONE
+        binding.icWaterSpray2Selected.visibility = View.GONE
+        binding.icWaterSpray2Unselected.visibility = View.GONE
+
+        if(gear == 0){
+            if(status){
+                binding.icWaterSpray0Selected.visibility = View.VISIBLE
+            }else{
+                binding.icWaterSpray0Unselected.visibility = View.VISIBLE
+            }
+        }
+
+        if(gear == 1){
+            if(status){
+                binding.icWaterSpray1Selected.visibility = View.VISIBLE
+            }else{
+                binding.icWaterSpray1Unselected.visibility = View.VISIBLE
+            }
+        }
+
+        if(gear == 2){
+            if(status){
+                binding.icWaterSpray2Selected.visibility = View.VISIBLE
+            }else{
+                binding.icWaterSpray2Unselected.visibility = View.VISIBLE
+            }
+        }
+
+
+
+    }
+
+}

+ 7 - 0
BusinessAirFryer/src/main/res/drawable/ic_water_spray_selector.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item android:state_selected="true" android:drawable="@drawable/ic_water_spary_selected"/>
+    <item android:state_selected="false" android:drawable="@drawable/ic_water_spary_unselected"/>
+
+</selector>

+ 75 - 0
BusinessAirFryer/src/main/res/layout/water_spray_status_view.xml

@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    xmlns:app="http://schemas.android.com/apk/res-auto">
+
+
+        <ImageView
+            android:id="@+id/ic_water_spray_0_unselected"
+            android:layout_width="@dimen/convert_40px"
+            android:layout_height="@dimen/convert_40px"
+            android:src="@drawable/ic_water_spray_0"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintEnd_toEndOf="parent"
+            >
+
+        </ImageView>
+
+        <ImageView
+            android:id="@+id/ic_water_spray_0_selected"
+            android:layout_width="@dimen/convert_40px"
+            android:layout_height="@dimen/convert_40px"
+            android:src="@drawable/ic_water_spray_0_selected"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintEnd_toEndOf="parent"
+            >
+
+        </ImageView>
+
+        <ImageView
+            android:id="@+id/ic_water_spray_1_unselected"
+
+            android:layout_width="@dimen/convert_26px"
+            android:layout_height="@dimen/convert_40px"
+            android:src="@drawable/ic_water_spray_1"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintEnd_toEndOf="parent"
+            >
+
+        </ImageView>
+
+        <ImageView
+            android:id="@+id/ic_water_spray_1_selected"
+
+            android:layout_width="@dimen/convert_26px"
+            android:layout_height="@dimen/convert_40px"
+            android:src="@drawable/ic_water_spray_1_selected"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintEnd_toEndOf="parent"
+            >
+
+        </ImageView>
+
+        <ImageView
+            android:id="@+id/ic_water_spray_2_unselected"
+            android:layout_width="@dimen/convert_60px"
+            android:layout_height="@dimen/convert_40px"
+            android:src="@drawable/ic_water_spray_2"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintEnd_toEndOf="parent"
+            >
+
+        </ImageView>
+
+        <ImageView
+            android:id="@+id/ic_water_spray_2_selected"
+            android:layout_width="@dimen/convert_60px"
+            android:layout_height="@dimen/convert_40px"
+            android:src="@drawable/ic_water_spray_2_selected"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintEnd_toEndOf="parent"
+            >
+
+        </ImageView>
+</LinearLayout>

+ 33 - 0
BusinessCommon/src/main/java/com/develop/common/ui/AdaptLinearLayout.kt

@@ -0,0 +1,33 @@
+package com.develop.common.ui
+
+import android.content.Context
+import android.util.AttributeSet
+import android.view.View
+import android.view.ViewGroup
+import android.view.ViewTreeObserver
+import android.widget.LinearLayout
+import androidx.constraintlayout.widget.ConstraintLayout
+import androidx.core.view.children
+
+class AdaptLinearLayout(context: Context, attrs: AttributeSet) : LinearLayout(context, attrs) {
+
+    init {
+
+       viewTreeObserver.addOnGlobalLayoutListener {
+           if (childCount > 0) {
+               val lastChild =  children.last { it.visibility == View.VISIBLE }
+               if (lastChild.visibility == View.VISIBLE) { // 检查最后一个子视图是否可见
+                   val layoutParams =
+                       lastChild.layoutParams as LinearLayout.LayoutParams // 获取最后一个子视图的布局参数
+                   layoutParams.marginEnd = 0 // 设置最后一个子视图的rightMargin属性为0
+                   lastChild.layoutParams = layoutParams // 将更新后的布局参数应用到最后一个子视图中
+               }
+           }
+       }
+
+    }
+
+
+
+
+}

+ 14 - 1
BusinessCommon/src/main/java/com/develop/common/widget/CookCardView.kt

@@ -48,6 +48,8 @@ class CookCardView : ConstraintLayout {
             cardType = getInt(R.styleable.CookCardView_cardType, 0)
             cardSelected = getBoolean(R.styleable.CookCardView_cardSelected, false)
         }.recycle()
+        binding.waterSprayShow.visibility = GONE
+        binding.waterSprayShow.updateSelectedStatus(false)
         when (cardType) {
             1 -> {
                 setCardType(CardType.TEMPERATURE, cardSelected)
@@ -61,6 +63,9 @@ class CookCardView : ConstraintLayout {
             4 -> {
                 setCardType(CardType.DIRECTION, cardSelected)
             }
+            5 -> {
+                setCardType(CardType.WATER_SPARY, cardSelected)
+            }
         }
     }
 
@@ -108,6 +113,11 @@ class CookCardView : ConstraintLayout {
                 binding.viewIcon.setBackgroundResource(R.drawable.cook_direction_selector)
                 binding.tvTitle.text = context.getString(R.string.direction)
             }
+            CardType.WATER_SPARY -> {
+                binding.viewIcon.setBackgroundResource(R.drawable.cook_water_selector)
+                binding.tvTitle.text = context.getString(R.string.water_spary)
+                binding.waterSprayShow.visibility = VISIBLE
+            }
         }
     }
 
@@ -125,6 +135,8 @@ class CookCardView : ConstraintLayout {
             binding.viewIcon.isSelected = false
             binding.tvConfigValue.isSelected = false
         }
+        binding.waterSprayShow.updateSelectedStatus(selected)
+
     }
 
 
@@ -132,6 +144,7 @@ class CookCardView : ConstraintLayout {
         TEMPERATURE,
         COOK_TIME,
         SPEED,
-        DIRECTION
+        DIRECTION,
+        WATER_SPARY
     }
 }

+ 7 - 0
BusinessCommon/src/main/res/drawable/cook_water_selector.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item android:state_selected="true" android:drawable="@drawable/ic_water_spary_selected"/>
+    <item android:state_selected="false" android:drawable="@drawable/ic_water_spary_unselected"/>
+
+</selector>

+ 14 - 0
BusinessCommon/src/main/res/layout/cook_card_view.xml

@@ -64,4 +64,18 @@
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintStart_toStartOf="parent" />
 
+
+    <com.develop.airfryer.ui.WaterSprayStatusView
+        android:id="@+id/water_spray_show"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintBottom_toBottomOf="parent"
+        android:layout_marginEnd="@dimen/convert_21px"
+        android:layout_marginBottom="@dimen/convert_21px" />
+
+
+
+
+
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 1 - 0
BusinessCommon/src/main/res/values/attrs.xml

@@ -6,6 +6,7 @@
             <enum name="Cook_time" value="2"/>
             <enum name="Speed" value="3"/>
             <enum name="Direction" value="4"/>
+            <enum name="WATER_SPARY" value="5"/>
         </attr>
 
         <attr name="cardSelected" format="boolean"/>

+ 1 - 0
BusinessCommon/src/main/res/values/strings.xml

@@ -246,6 +246,7 @@ Nanfang plus client is an online information platform developed and operated by
     <string name="pizza">PIZZA</string>
     <string name="dehydrate">DEHYDRATE</string>
     <string name="confirm_change_dev_mode">Confirm change dev mode ?</string>
+    <string name="water_spary">WATER SPARY</string>
 
 
 </resources>

+ 1 - 0
BusinessStep/src/main/java/com/develop/step/CookSettingType.kt

@@ -6,5 +6,6 @@ enum class CookSettingType {
     TIME_SETTING,
     SPEED_SETTING,
     DIRECTION_SETTING,
+    WATER_SPRY,
     TURBO
 }

+ 146 - 1
BusinessStep/src/main/java/com/develop/step/ui/ModesDetailActivity.kt

@@ -33,6 +33,7 @@ import com.develop.step.R
 import com.develop.step.databinding.ActivityModeDetailBinding
 import com.develop.step.viewmodel.ModesViewMode
 import com.kuyuntech.cofarcooking.device.sdk.constant.core.CommonEventTypes
+import com.kuyuntech.cofarcooking.device.sdk.constant.core.DevModes
 import com.kuyuntech.cofarcooking.device.sdk.constant.core.DevStatus
 import com.kuyuntech.cofarcooking.device.sdk.constant.core.HeatModes
 import com.kuyuntech.cofarcooking.device.sdk.constant.core.MotorDirections
@@ -61,16 +62,21 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
     private var mRunningState = 0
     private var currentTemp = 0
     private var currentMotorGer = 0
+    private var currentWaterGear = 0;
     private var maxTemp = 0
     private var minTemp = 0
     private var maxMotorGear = 0
     private var minMotorGear = 0
+    private var maxWaterGear = 0
+    private var minWaterGear = 0
+
     private var currTime = 0L
     private var maxTime = 0L
     private var minTime = 0L
     private var isTempChange = false
     private var isTimeChange = false
     private var isMotorGearChange = false
+    private var isWaterGearChange = false
     private var initModeData = false
     private var pressStartTime = -1L
     private var canStart = true
@@ -90,11 +96,30 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
         return ActivityModeDetailBinding.inflate(inflater)
     }
 
+    fun turnDevModeUI(){
+
+        if(CofarSDK.devInfo().devMode == DevModes.AIR_FRYER){
+            //隐藏点击
+            binding.clCookDirection.visibility = View.GONE;
+            binding.clCookSpeed.visibility = View.GONE;
+            binding.clCookWater.visibility = View.VISIBLE
+
+        }
+
+        if(CofarSDK.devInfo().devMode == DevModes.SOUP){
+            //隐藏点击
+            binding.clCookDirection.visibility = View.VISIBLE;
+            binding.clCookSpeed.visibility = View.VISIBLE;
+            binding.clCookWater.visibility = View.GONE
+        }
+
+    }
+
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         hasShowScreenSaver = true
         configLock = true
-
+        turnDevModeUI();
         viewModel.modeType = intent.extras?.getString(MODE_TYPE, ModesType.CHOP.name) ?: ""
         viewModel.lastModeType = viewModel.modeType
         lastModeType = viewModel.modeType
@@ -156,6 +181,17 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
                                 motorGearSpeedEvent(currentMotorGer)
                             }
                         }
+                    CookSettingType.WATER_SPRY -> {
+                        if (isWaterGearChange) {
+                            //当前调节转速
+                            currentWaterGear += 1
+                            if (currentWaterGear > maxWaterGear) {
+                                currentWaterGear = maxWaterGear
+                            }
+                            binding.waterRingView.updateProgress(currentWaterGear)
+                            waterGearSpeedEvent(currentWaterGear)
+                        }
+                    }
                         CookSettingType.TIME_SETTING -> {
                             if (isTimeChange) {
                                 //当前调节时间
@@ -205,6 +241,17 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
                                 motorGearSpeedEvent(currentMotorGer)
                             }
                         }
+                        CookSettingType.WATER_SPRY -> {
+                            if (isWaterGearChange) {
+                                //当前调节转速
+                                currentWaterGear -= 1
+                                if (currentWaterGear > maxWaterGear) {
+                                    currentWaterGear = maxWaterGear
+                                }
+                                binding.waterRingView.updateProgress(currentWaterGear)
+                                waterGearSpeedEvent(currentWaterGear)
+                            }
+                        }
                         CookSettingType.TIME_SETTING -> {
                             if (isTimeChange) {
                                 //当前调节时间
@@ -371,6 +418,19 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
                     motorGear,
                     isMotorGearChange
                 )
+
+
+                var waterGear = if(currDevInfo.waterGear != null) currDevInfo.waterGear.toInt() else defaultMotorGear;
+                if (currDevInfo.waterGearBuffer != null && currDevInfo.waterGearBuffer.toInt() != -1) {
+                    waterGear = currDevInfo.waterGearBuffer.toInt()
+                }
+                updateWaterGearUI(
+                    minWaterGear.toFloat(),
+                    maxWaterGear.toFloat(),
+                    waterGear,
+                    isWaterGearChange
+                )
+
                 updateMotorDirectionUI(currDevInfo.motorDirection.toInt(), isMotorDirectionChange)
                 updateWeightUI(currDevInfo.weight.toFloat())
             }
@@ -405,6 +465,10 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
                 CookSettingType.SPEED_SETTING -> {
                     changeSpeedSettingStep()
                 }
+                CookSettingType.WATER_SPRY -> {
+                   // changeSpeedSettingStep()
+                    changeWaterSprySettingStep()
+                }
                 CookSettingType.DIRECTION_SETTING -> {
                     changeDirectionSettingStep()
                 }
@@ -538,6 +602,10 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
             viewModel.changeStep(CookSettingType.DIRECTION_SETTING)
         }
 
+        binding.clCookWater.setOnClickListener {
+            viewModel.changeStep(CookSettingType.WATER_SPRY)
+        }
+
         binding.ivTurbo.setOnClickListener {
             turboClick()
         }
@@ -657,6 +725,13 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
             }
         }
 
+        binding.waterRingView.onRingViewListener = object : RingControlView.OnRingViewListener {
+            override fun onProgressChange(progress: Int) {
+                currentWaterGear = progress
+                waterGearSpeedEvent(progress)
+            }
+        }
+
         binding.clSetTime.onTimePickerCallback = object : TimePickerView.OnTimePickerCallback {
             override fun onTimePicker(
                 hours: Int, minute: Int, second: Int, time: String, setByUser: Boolean
@@ -745,6 +820,9 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
         binding.tempRingTextCooking.visibility = View.GONE
         binding.clSetTime.visibility = View.GONE
         binding.flDirection.visibility = View.GONE
+        binding.waterRingView.visibility = View.GONE
+        binding.waterSprayShow.visibility = View.GONE
+
         setPanelViewProperty(CookSettingType.TEMP_SETTING)
     }
 
@@ -759,6 +837,9 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
         binding.tempRingTextCooking.visibility = View.GONE
         binding.clSetTime.visibility = View.VISIBLE
         binding.flDirection.visibility = View.GONE
+        binding.waterRingView.visibility = View.GONE
+        binding.waterSprayShow.visibility = View.GONE
+
         setPanelViewProperty(CookSettingType.TIME_SETTING)
     }
 
@@ -773,6 +854,9 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
         binding.tempRingTextCooking.visibility = View.GONE
         binding.clSetTime.visibility = View.GONE
         binding.flDirection.visibility = View.GONE
+        binding.waterRingView.visibility = View.GONE
+        binding.waterSprayShow.visibility = View.GONE
+
         setPanelViewProperty(CookSettingType.SPEED_SETTING)
     }
 
@@ -787,15 +871,37 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
         binding.tempRingTextCooking.visibility = View.GONE
         binding.clSetTime.visibility = View.GONE
         binding.flDirection.visibility = View.VISIBLE
+        binding.waterRingView.visibility = View.GONE
+        binding.waterSprayShow.visibility = View.GONE
+
         setPanelViewProperty(CookSettingType.DIRECTION_SETTING)
     }
 
+    /**切换到*/
+    private fun changeWaterSprySettingStep() {
+        binding.llWeightView.visibility = View.GONE
+        binding.functionLayout.visibility = View.VISIBLE
+        binding.tempRingView.visibility = View.INVISIBLE
+        binding.tempRingText.visibility = View.GONE
+        binding.speedRingView.visibility = View.GONE
+        binding.speedRingText.visibility = View.GONE
+        binding.tempRingTextCooking.visibility = View.GONE
+        binding.clSetTime.visibility = View.GONE
+        binding.flDirection.visibility = View.GONE
+        binding.clCookWater.visibility = View.VISIBLE
+        binding.waterRingView.visibility = View.VISIBLE
+        binding.waterSprayShow.visibility = View.VISIBLE
+
+        setPanelViewProperty(CookSettingType.WATER_SPRY)
+    }
+
     private fun setPanelViewProperty(selectStep: CookSettingType) {
         binding.apply {
             clCookTemp.upSelectedView(false)
             clCookTime.upSelectedView(false)
             clCookSpeed.upSelectedView(false)
             clCookDirection.upSelectedView(false)
+            clCookWater.upSelectedView(false)
             when (selectStep) {
                 CookSettingType.TEMP_SETTING -> {
                     clCookTemp.upSelectedView(true)
@@ -809,6 +915,9 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
                 CookSettingType.DIRECTION_SETTING -> {
                     clCookDirection.upSelectedView(true)
                 }
+                CookSettingType.WATER_SPRY -> {
+                    clCookWater.upSelectedView(true)
+                }
                 CookSettingType.WEIGHT -> {
                     // do nothing
                 }
@@ -1021,6 +1130,35 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
         }
     }
 
+
+    /**
+     * 更新喷水档位的UI
+     * @param minWaterGear 最小转速
+     * @param maxWaterGear 电机最大转速
+     * @param currentMotorGer 电机当前转速
+     * @param isWaterGearChange 转速是否可以修改
+     */
+    private fun updateWaterGearUI(
+        minWaterGear: Float, maxWaterGear: Float, currentMotorGer: Int, isWaterGearChange: Boolean,focusUpdate: Boolean = false
+    ) {
+
+        this.minWaterGear = minWaterGear.toInt()
+        this.maxWaterGear = maxWaterGear.toInt()
+        this.isWaterGearChange = isWaterGearChange
+
+        binding.apply {
+            clCookSpeed.updateChangeValue(currentMotorGer.toString())
+            waterRingView.setRange(minWaterGear, maxWaterGear)
+            waterRingView.setCanTouch(isWaterGearChange)
+            waterSprayShow.updateGear(currentMotorGer)
+            binding.clCookWater.binding.waterSprayShow.updateGear(currentWaterGear)
+            if (!userChanging) {
+                waterRingView.updateProgress(currentMotorGer)
+            }
+        }
+    }
+
+
     /**
      * 更新电机转速的UI
      * @param weight 当前的重量
@@ -1284,6 +1422,13 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
         showConfirmAndCancelBtn()
     }
 
+
+    private fun waterGearSpeedEvent(progress: Int){
+        userChanging = true
+        CofarSDK.cfgWaterBear(progress);
+        showConfirmAndCancelBtn()
+    }
+
     /**
      * 旋转电机转速事件
      */

+ 82 - 37
BusinessStep/src/main/res/layout/activity_mode_detail.xml

@@ -132,6 +132,32 @@
             app:layout_constraintTop_toTopOf="parent"
             app:layout_constraintVertical_bias="0.32" />
 
+        <com.develop.common.widget.RingControlView
+            android:id="@+id/water_ring_view"
+            android:layout_width="@dimen/convert_270px"
+            android:layout_height="@dimen/convert_270px"
+            android:visibility="invisible"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toTopOf="parent"
+            app:layout_constraintVertical_bias="0.32" />
+
+        <com.develop.airfryer.ui.WaterSprayStatusView
+            android:id="@+id/water_spray_show"
+            android:scaleX="2"
+            android:scaleY="2"
+            android:visibility="gone"
+            app:layout_constraintBottom_toBottomOf="@+id/water_ring_view"
+            app:layout_constraintEnd_toEndOf="@+id/water_ring_view"
+            app:layout_constraintStart_toStartOf="@+id/water_ring_view"
+            app:layout_constraintTop_toTopOf="@+id/water_ring_view"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+        </com.develop.airfryer.ui.WaterSprayStatusView>
+
+
         <androidx.appcompat.widget.AppCompatTextView
             android:id="@+id/temp_ring_text"
             android:layout_width="wrap_content"
@@ -177,7 +203,7 @@
             android:layout_height="wrap_content"
             android:layout_marginBottom="@dimen/convert_74px"
             android:visibility="gone"
-            app:layout_constraintBottom_toTopOf="@+id/cl_cook_temp"
+            app:layout_constraintBottom_toTopOf="@+id/card_wrapper"
             app:layout_constraintEnd_toEndOf="parent"
             app:layout_constraintStart_toStartOf="parent"
             app:layout_constraintVertical_bias="0.36"
@@ -206,43 +232,62 @@
             app:layout_constraintStart_toStartOf="parent"
             app:layout_constraintTop_toTopOf="parent" />
 
-        <com.develop.common.widget.CookCardView
-            android:id="@+id/cl_cook_temp"
-            android:layout_width="@dimen/convert_280px"
-            android:layout_height="@dimen/convert_140px"
-            android:layout_marginTop="@dimen/convert_14px"
-            app:cardSelected="true"
-            app:cardType="Temperature"
+        <com.develop.common.ui.AdaptLinearLayout
+            android:id="@+id/card_wrapper"
             app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toBottomOf="@id/temp_ring_view" />
-
-
-        <com.develop.common.widget.CookCardView
-            android:id="@+id/cl_cook_time"
-            android:layout_width="@dimen/convert_280px"
-            android:layout_height="@dimen/convert_140px"
-            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.common.widget.CookCardView
-            android:id="@+id/cl_cook_speed"
-            android:layout_width="@dimen/convert_280px"
-            android:layout_height="@dimen/convert_140px"
-            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.common.widget.CookCardView
-            android:id="@+id/cl_cook_direction"
-            android:layout_width="@dimen/convert_280px"
-            android:layout_height="@dimen/convert_140px"
-            app:cardType="Direction"
-            app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintTop_toTopOf="@+id/cl_cook_temp" />
+            app:layout_constraintTop_toBottomOf="@id/temp_ring_view"
+            android:gravity="center"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal"
+           >
+
+            <com.develop.common.widget.CookCardView
+                android:id="@+id/cl_cook_temp"
+                android:layout_width="@dimen/convert_280px"
+                android:layout_height="@dimen/convert_140px"
+                app:cardSelected="true"
+                app:cardType="Temperature"
+                android:layout_marginEnd="@dimen/convert_24px"
+                 />
+
+
+            <com.develop.common.widget.CookCardView
+                android:id="@+id/cl_cook_time"
+                android:layout_width="@dimen/convert_280px"
+                android:layout_height="@dimen/convert_140px"
+                app:cardType="Cook_time"
+                android:layout_marginEnd="@dimen/convert_24px"
+                 />
+
+
+            <com.develop.common.widget.CookCardView
+                android:id="@+id/cl_cook_speed"
+                android:layout_width="@dimen/convert_280px"
+                android:layout_height="@dimen/convert_140px"
+                app:cardType="Speed"
+                android:layout_marginEnd="@dimen/convert_24px"
+                 />
+
+            <com.develop.common.widget.CookCardView
+                android:id="@+id/cl_cook_direction"
+                android:layout_width="@dimen/convert_280px"
+                android:layout_height="@dimen/convert_140px"
+                app:cardType="Direction"
+                android:layout_marginEnd="@dimen/convert_24px"
+                 />
+
+            <com.develop.common.widget.CookCardView
+                android:id="@+id/cl_cook_water"
+                android:layout_width="@dimen/convert_280px"
+                android:layout_height="@dimen/convert_140px"
+                app:cardType="WATER_SPARY"
+                android:layout_marginEnd="@dimen/convert_24px"
+                />
+
+        </com.develop.common.ui.AdaptLinearLayout>
+
+
 
         <androidx.appcompat.widget.AppCompatTextView
             android:id="@+id/btn_start"

BIN
libThirdPart/libs/cofar-cooking-device-sdk-0.0.1-SNAPSHOT.jar