wbspool 1 year ago
parent
commit
1a34825ec6
91 changed files with 1759 additions and 405 deletions
  1. 1 0
      BusinessAirFryer/.gitignore
  2. 21 0
      BusinessAirFryer/build.gradle
  3. 0 0
      BusinessAirFryer/consumer-rules.pro
  4. 21 0
      BusinessAirFryer/proguard-rules.pro
  5. 24 0
      BusinessAirFryer/src/androidTest/java/com/develop/airfryer/ExampleInstrumentedTest.kt
  6. 4 0
      BusinessAirFryer/src/main/AndroidManifest.xml
  7. 195 0
      BusinessAirFryer/src/main/assets/config.json
  8. 80 0
      BusinessAirFryer/src/main/java/com/develop/airfryer/ui/DevModeView.kt
  9. 66 0
      BusinessAirFryer/src/main/java/com/develop/airfryer/ui/WaterSprayStatusView.kt
  10. BIN
      BusinessAirFryer/src/main/res/drawable/aab.png
  11. BIN
      BusinessAirFryer/src/main/res/drawable/air_fryer.png
  12. BIN
      BusinessAirFryer/src/main/res/drawable/air_steam.png
  13. BIN
      BusinessAirFryer/src/main/res/drawable/bakc.png
  14. BIN
      BusinessAirFryer/src/main/res/drawable/bake.png
  15. BIN
      BusinessAirFryer/src/main/res/drawable/chicken.png
  16. BIN
      BusinessAirFryer/src/main/res/drawable/chicken_wing.png
  17. BIN
      BusinessAirFryer/src/main/res/drawable/cm_icon_auto_clean.png
  18. BIN
      BusinessAirFryer/src/main/res/drawable/cm_icon_cook_eggs.png
  19. BIN
      BusinessAirFryer/src/main/res/drawable/cm_icon_cook_rice.png
  20. BIN
      BusinessAirFryer/src/main/res/drawable/cm_icon_mulsify.png
  21. BIN
      BusinessAirFryer/src/main/res/drawable/cm_icon_puree.png
  22. BIN
      BusinessAirFryer/src/main/res/drawable/cm_icon_roast.png
  23. BIN
      BusinessAirFryer/src/main/res/drawable/cm_icon_smoothie.png
  24. BIN
      BusinessAirFryer/src/main/res/drawable/cm_icon_sovs_vide.png
  25. BIN
      BusinessAirFryer/src/main/res/drawable/dehydrate.png
  26. BIN
      BusinessAirFryer/src/main/res/drawable/dfb.png
  27. BIN
      BusinessAirFryer/src/main/res/drawable/dfb_active.png
  28. BIN
      BusinessAirFryer/src/main/res/drawable/drumsticks.png
  29. BIN
      BusinessAirFryer/src/main/res/drawable/egg_tart.png
  30. BIN
      BusinessAirFryer/src/main/res/drawable/fish_steak.png
  31. BIN
      BusinessAirFryer/src/main/res/drawable/french_fries.png
  32. BIN
      BusinessAirFryer/src/main/res/drawable/ic_water_spary_selected.png
  33. BIN
      BusinessAirFryer/src/main/res/drawable/ic_water_spary_unselected.png
  34. BIN
      BusinessAirFryer/src/main/res/drawable/ic_water_spray_0.png
  35. BIN
      BusinessAirFryer/src/main/res/drawable/ic_water_spray_0_selected.png
  36. BIN
      BusinessAirFryer/src/main/res/drawable/ic_water_spray_1.png
  37. BIN
      BusinessAirFryer/src/main/res/drawable/ic_water_spray_1_selected.png
  38. BIN
      BusinessAirFryer/src/main/res/drawable/ic_water_spray_2.png
  39. BIN
      BusinessAirFryer/src/main/res/drawable/ic_water_spray_2_selected.png
  40. 7 0
      BusinessAirFryer/src/main/res/drawable/ic_water_spray_selector.xml
  41. BIN
      BusinessAirFryer/src/main/res/drawable/kqzg.png
  42. BIN
      BusinessAirFryer/src/main/res/drawable/kqzg_active.png
  43. BIN
      BusinessAirFryer/src/main/res/drawable/meat.png
  44. BIN
      BusinessAirFryer/src/main/res/drawable/pizza.png
  45. BIN
      BusinessAirFryer/src/main/res/drawable/reheat.png
  46. BIN
      BusinessAirFryer/src/main/res/drawable/shrimp.png
  47. BIN
      BusinessAirFryer/src/main/res/drawable/steam.png
  48. BIN
      BusinessAirFryer/src/main/res/drawable/test.png
  49. BIN
      BusinessAirFryer/src/main/res/drawable/vegetable.png
  50. 90 0
      BusinessAirFryer/src/main/res/layout/dev_mode_view.xml
  51. 75 0
      BusinessAirFryer/src/main/res/layout/water_spray_status_view.xml
  52. 17 0
      BusinessAirFryer/src/test/java/com/develop/airfryer/ExampleUnitTest.kt
  53. 1 0
      BusinessCommon/build.gradle
  54. 3 0
      BusinessCommon/src/main/java/com/develop/common/bean/CfConfig.kt
  55. 3 0
      BusinessCommon/src/main/java/com/develop/common/bean/WorkMode.kt
  56. 3 0
      BusinessCommon/src/main/java/com/develop/common/data_repo/FoodDataProvider.kt
  57. 44 44
      BusinessCommon/src/main/java/com/develop/common/data_repo/db/DataFactory.kt
  58. 33 0
      BusinessCommon/src/main/java/com/develop/common/ui/AdaptLinearLayout.kt
  59. 2 2
      BusinessCommon/src/main/java/com/develop/common/ui/CommonBindingActivity.kt
  60. 45 37
      BusinessCommon/src/main/java/com/develop/common/utils/AppVersionUtil.kt
  61. 37 0
      BusinessCommon/src/main/java/com/develop/common/utils/ConfigUtils.kt
  62. 14 1
      BusinessCommon/src/main/java/com/develop/common/widget/CookCardView.kt
  63. 1 1
      BusinessCommon/src/main/java/com/develop/common/widget/FoodContentView.kt
  64. 7 0
      BusinessCommon/src/main/res/drawable/cook_water_selector.xml
  65. 14 0
      BusinessCommon/src/main/res/layout/cook_card_view.xml
  66. 5 1
      BusinessCommon/src/main/res/layout/dialog_cancel_confirm.xml
  67. 2 2
      BusinessCommon/src/main/res/layout/fragment_comme_list.xml
  68. 20 0
      BusinessCommon/src/main/res/layout/fragment_comme_list_v2.xml
  69. 16 0
      BusinessCommon/src/main/res/layout/home_function_top_bar_view.xml
  70. 1 0
      BusinessCommon/src/main/res/values/attrs.xml
  71. 2 0
      BusinessCommon/src/main/res/values/cucstom_spinner_background.xml.xml
  72. 28 0
      BusinessCommon/src/main/res/values/strings.xml
  73. 6 0
      BusinessCommon/src/main/res/values/styles.xml
  74. 1 1
      BusinessMain/src/main/java/com/develop/main/ui/HomeActivity.kt
  75. 33 12
      BusinessMain/src/main/java/com/develop/main/ui/ModesFragment.kt
  76. 31 22
      BusinessMain/src/main/java/com/develop/main/ui/RecipesFragment.kt
  77. 63 0
      BusinessMain/src/main/java/com/develop/main/ui/RecipesFragmentV2.kt
  78. 51 2
      BusinessMain/src/main/java/com/develop/main/viewmodel/HomeViewModel.kt
  79. 3 0
      BusinessMain/src/main/res/layout/food_grid_view.xml
  80. 1 0
      BusinessMain/src/main/res/layout/item_mode_card_view.xml
  81. 1 0
      BusinessStep/src/main/java/com/develop/step/CookSettingType.kt
  82. 207 12
      BusinessStep/src/main/java/com/develop/step/ui/ModesDetailActivity.kt
  83. 57 5
      BusinessStep/src/main/java/com/develop/step/ui/cook_step/CookStepActivity.kt
  84. 47 0
      BusinessStep/src/main/java/com/develop/step/ui/cook_step/CookStepBaseActivity.kt
  85. 12 0
      BusinessStep/src/main/java/com/develop/step/ui/cook_step/model/CookStepUiData.kt
  86. 5 0
      BusinessStep/src/main/java/com/develop/step/ui/recipes_detail/CookDetailActivity.kt
  87. 90 37
      BusinessStep/src/main/res/layout/activity_mode_detail.xml
  88. 264 223
      BusinessStep/src/main/res/layout/item_cook_controller.xml
  89. 4 3
      app/build.gradle
  90. BIN
      libThirdPart/libs/cofar-cooking-device-sdk-0.0.1-SNAPSHOT.jar
  91. 1 0
      settings.gradle

+ 1 - 0
BusinessAirFryer/.gitignore

@@ -0,0 +1 @@
+/build

+ 21 - 0
BusinessAirFryer/build.gradle

@@ -0,0 +1,21 @@
+plugins {
+    id 'kotlin-kapt'
+    id 'org.jetbrains.kotlin.android'
+}
+
+apply from: '../common.gradle'
+
+android{
+    sourceSets {
+        main {
+            jniLibs.srcDirs = ['libs']
+        }
+    }
+}
+
+dependencies {
+    api project(path: ':libBase')
+    api project(path: ':libThirdPart')
+    kapt 'com.alibaba:arouter-compiler:1.5.2'
+    kapt  "androidx.room:room-compiler:2.4.2"
+}

+ 0 - 0
BusinessAirFryer/consumer-rules.pro


+ 21 - 0
BusinessAirFryer/proguard-rules.pro

@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile

+ 24 - 0
BusinessAirFryer/src/androidTest/java/com/develop/airfryer/ExampleInstrumentedTest.kt

@@ -0,0 +1,24 @@
+package com.develop.airfryer
+
+import androidx.test.platform.app.InstrumentationRegistry
+import androidx.test.ext.junit.runners.AndroidJUnit4
+
+import org.junit.Test
+import org.junit.runner.RunWith
+
+import org.junit.Assert.*
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * See [testing documentation](http://d.android.com/tools/testing).
+ */
+@RunWith(AndroidJUnit4::class)
+class ExampleInstrumentedTest {
+    @Test
+    fun useAppContext() {
+        // Context of the app under test.
+        val appContext = InstrumentationRegistry.getInstrumentation().targetContext
+        assertEquals("com.develop.airfryer.test", appContext.packageName)
+    }
+}

+ 4 - 0
BusinessAirFryer/src/main/AndroidManifest.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.develop.airfryer">
+
+</manifest>

+ 195 - 0
BusinessAirFryer/src/main/assets/config.json

@@ -0,0 +1,195 @@
+{
+  "workModes": [
+    {
+      "type": "ADAPTED_COOKING",
+      "name": "adapted_cooking",
+      "bg": "ic_mode_chop",
+      "icon": "ic_grid_adapted_cooking",
+      "devMode": "SOUP"
+    },
+    {
+      "type": "WIGHT",
+      "name": "wight",
+      "bg": "ic_mode_weight",
+      "icon": "ic_grid_weight",
+      "devMode": "SOUP"
+    },
+    {
+      "type": "BOIL_WATER",
+      "name": "boil_water",
+      "bg": "ic_mode_boil_water",
+      "icon": "ic_grid_boil_water",
+      "devMode": "SOUP"
+    },
+    {
+      "type": "CHOP",
+      "name": "chop",
+      "bg": "ic_mode_chop",
+      "icon": "ic_grid_chop",
+      "devMode": "SOUP"
+    },
+    {
+      "type": "SLOW_COOK",
+      "name": "slow_cook",
+      "bg": "ic_mode_slow_cook",
+      "icon": "ic_grid_slow_cook",
+      "devMode": "SOUP"
+    },
+    {
+      "type": "KNEAD_TOUGH",
+      "name": "knead_dough",
+      "bg": "ic_mode_knead_dough",
+      "icon": "ic_grid_knead_dough",
+      "devMode": "SOUP"
+    },
+    {
+      "type": "STEAM",
+      "name": "steam",
+      "bg": "ic_mode_steam",
+      "icon": "ic_grid_steam",
+      "devMode": "SOUP"
+    },
+    {
+      "type": "FOOD_PROCESSOR",
+      "name": "food_processor",
+      "bg": "ic_mode_food_processor",
+      "icon": "ic_grid_food_processor",
+      "devMode": "SOUP"
+    },
+    {
+      "type": "TURBO",
+      "name": "turbo",
+      "bg": "ic_mode_turbo",
+      "icon": "ic_grid_turbo",
+      "devMode": "SOUP"
+    },
+
+    {
+      "type": "COOK_EGGS",
+      "name": "cook_eggs",
+      "bg": "cm_icon_cook_eggs",
+      "icon": "cm_icon_cook_eggs",
+      "devMode": "SOUP"
+    },
+
+    {
+      "type": "COOK_RICE",
+      "name": "cook_rice",
+      "bg": "cm_icon_cook_rice",
+      "icon": "cm_icon_cook_rice",
+      "devMode": "SOUP"
+    },
+    {
+      "type": "MULSIFY",
+      "name": "mulsify",
+      "bg": "cm_icon_mulsify",
+      "icon": "cm_icon_mulsify",
+      "devMode": "SOUP"
+    }, {
+      "type": "PUREE",
+      "name": "puree",
+      "bg": "cm_icon_puree",
+      "icon": "cm_icon_puree",
+      "devMode": "SOUP"
+    },
+    {
+      "type": "ROAST",
+      "name": "roast",
+      "bg": "cm_icon_roast",
+      "icon": "cm_icon_roast",
+      "devMode": "SOUP"
+    },
+    {
+      "type": "SMOOTHIE",
+      "name": "smoothie",
+      "bg": "cm_icon_smoothie",
+      "icon": "cm_icon_smoothie",
+      "devMode": "SOUP"
+    },
+    {
+      "type": "SOVS_VIDE",
+      "name": "sovs_vide",
+      "bg": "cm_icon_sovs_vide",
+      "icon": "cm_icon_sovs_vide",
+      "devMode": "SOUP"
+    },
+    {
+      "type": "AUTO_CLEAN",
+      "name": "auto_clean",
+      "bg": "cm_icon_auto_clean",
+      "icon": "cm_icon_auto_clean",
+      "devMode": "SOUP"
+    },
+
+    {
+      "type": "AIR_FRYER",
+      "name": "air_fryer",
+       "bg": "air_fryer",
+      "icon": "air_fryer",
+      "devMode": "AIR_FRYER"
+    },
+    {
+      "type": "MEAT",
+      "name": "meat",
+      "bg": "meat",
+      "icon": "meat",
+      "devMode": "AIR_FRYER"
+    },
+    {
+      "type": "FISH",
+      "name": "fish",
+      "bg": "fish_steak",
+      "icon": "fish_steak",
+      "devMode": "AIR_FRYER"
+    },
+    {
+      "type": "BAKC",
+      "name": "bakc",
+      "bg": "bakc",
+      "icon": "bakc",
+      "devMode": "AIR_FRYER"
+    },
+    {
+      "type": "DRUMSTICKS",
+      "name": "drumsticks",
+      "bg": "drumsticks",
+      "icon": "drumsticks",
+      "devMode": "AIR_FRYER"
+    },
+    {
+      "type": "CHICKEN_WING",
+      "name": "chicken_wing",
+      "bg": "chicken_wing",
+      "icon": "chicken_wing",
+      "devMode": "AIR_FRYER"
+    },
+    {
+      "type": "VEGETABLE",
+      "name": "vegetable",
+      "bg": "vegetable",
+      "icon": "vegetable",
+      "devMode": "AIR_FRYER"
+    },
+    {
+      "type": "SHRIMP",
+      "name": "shrimp",
+      "bg": "shrimp",
+      "icon": "shrimp",
+      "devMode": "AIR_FRYER"
+    },
+    {
+      "type": "PIZZA",
+      "name": "pizza",
+      "bg": "pizza",
+      "icon": "pizza",
+      "devMode": "AIR_FRYER"
+    },
+    {
+      "type": "DEHYDRATE",
+      "name": "dehydrate",
+      "bg": "dehydrate",
+      "icon": "dehydrate",
+      "devMode": "AIR_FRYER"
+    }
+  ]
+}

+ 80 - 0
BusinessAirFryer/src/main/java/com/develop/airfryer/ui/DevModeView.kt

@@ -0,0 +1,80 @@
+package com.develop.airfryer.ui
+
+import android.content.Context
+import android.content.Intent
+import android.util.AttributeSet
+import android.view.LayoutInflater
+import android.view.View
+import androidx.constraintlayout.widget.ConstraintLayout
+import com.blankj.utilcode.util.ActivityUtils.startActivity
+import com.blankj.utilcode.util.AppUtils
+import com.develop.airfryer.databinding.DevModeViewBinding
+import com.kuyuntech.cofarcooking.device.sdk.constant.core.CommonEventTypes
+import com.kuyuntech.cofarcooking.device.sdk.constant.core.DevModes
+import com.kuyuntech.cofarcooking.device.sdk.eventbus.event.DevCommonEvent
+import com.kuyuntech.cofarcooking.device.sdk.util.core.CofarSDK
+import org.greenrobot.eventbus.Subscribe
+
+class DevModeView(context: Context, attrs: AttributeSet) : ConstraintLayout(context, attrs){
+
+   private var mode = CofarSDK.devInfo().devMode;
+
+   private val binding: DevModeViewBinding
+
+   init {
+       binding = DevModeViewBinding.inflate(LayoutInflater.from(context), this, true)
+       setupClickListener()
+       CofarSDK.register(this)
+       updateUI()
+       if(!AppUtils.getAppVersionName().split(".")[0].startsWith("5")){
+           this.visibility = GONE
+       }
+   }
+
+    override fun onDetachedFromWindow() {
+        super.onDetachedFromWindow()
+        CofarSDK.unregister(this);
+    }
+
+    @Subscribe
+    fun onDevModeChange(event: DevCommonEvent){
+            if(CommonEventTypes.DEV_MODE_CHANGE == event.type){
+                mode = CofarSDK.devInfo().devMode;
+                updateUI();
+                val intent = Intent(this.context, Class.forName("com.develop.main.ui.ModeEntranceActivity"))
+                intent.flags = Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK
+                this.context.startActivity(intent)
+            }
+
+    }
+
+    private fun updateUI(){
+        //判断模式
+        if(mode == DevModes.AIR_FRYER){
+            binding.dfbAtive.visibility = View.GONE;
+            binding.dfbUnactive.visibility = View.VISIBLE;
+            binding.kqzgActive.visibility = View.VISIBLE;
+            binding.kqzgUnactive.visibility = View.GONE;
+        }else{
+            binding.dfbAtive.visibility = View.VISIBLE;
+            binding.dfbUnactive.visibility = View.GONE;
+            binding.kqzgActive.visibility = View.GONE;
+            binding.kqzgUnactive.visibility = View.VISIBLE;
+        }
+    }
+
+   private fun setupClickListener(){
+
+
+      setOnClickListener {
+          CofarSDK.changeDevMode(if (mode ==DevModes.SOUP) DevModes.AIR_FRYER else DevModes.SOUP)
+
+      }
+
+   }
+
+
+
+
+
+}

+ 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
+            }
+        }
+
+
+
+    }
+
+}

BIN
BusinessAirFryer/src/main/res/drawable/aab.png


BIN
BusinessAirFryer/src/main/res/drawable/air_fryer.png


BIN
BusinessAirFryer/src/main/res/drawable/air_steam.png


BIN
BusinessAirFryer/src/main/res/drawable/bakc.png


BIN
BusinessAirFryer/src/main/res/drawable/bake.png


BIN
BusinessAirFryer/src/main/res/drawable/chicken.png


BIN
BusinessAirFryer/src/main/res/drawable/chicken_wing.png


BIN
BusinessAirFryer/src/main/res/drawable/cm_icon_auto_clean.png


BIN
BusinessAirFryer/src/main/res/drawable/cm_icon_cook_eggs.png


BIN
BusinessAirFryer/src/main/res/drawable/cm_icon_cook_rice.png


BIN
BusinessAirFryer/src/main/res/drawable/cm_icon_mulsify.png


BIN
BusinessAirFryer/src/main/res/drawable/cm_icon_puree.png


BIN
BusinessAirFryer/src/main/res/drawable/cm_icon_roast.png


BIN
BusinessAirFryer/src/main/res/drawable/cm_icon_smoothie.png


BIN
BusinessAirFryer/src/main/res/drawable/cm_icon_sovs_vide.png


BIN
BusinessAirFryer/src/main/res/drawable/dehydrate.png


BIN
BusinessAirFryer/src/main/res/drawable/dfb.png


BIN
BusinessAirFryer/src/main/res/drawable/dfb_active.png


BIN
BusinessAirFryer/src/main/res/drawable/drumsticks.png


BIN
BusinessAirFryer/src/main/res/drawable/egg_tart.png


BIN
BusinessAirFryer/src/main/res/drawable/fish_steak.png


BIN
BusinessAirFryer/src/main/res/drawable/french_fries.png


BIN
BusinessAirFryer/src/main/res/drawable/ic_water_spary_selected.png


BIN
BusinessAirFryer/src/main/res/drawable/ic_water_spary_unselected.png


BIN
BusinessAirFryer/src/main/res/drawable/ic_water_spray_0.png


BIN
BusinessAirFryer/src/main/res/drawable/ic_water_spray_0_selected.png


BIN
BusinessAirFryer/src/main/res/drawable/ic_water_spray_1.png


BIN
BusinessAirFryer/src/main/res/drawable/ic_water_spray_1_selected.png


BIN
BusinessAirFryer/src/main/res/drawable/ic_water_spray_2.png


BIN
BusinessAirFryer/src/main/res/drawable/ic_water_spray_2_selected.png


+ 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>

BIN
BusinessAirFryer/src/main/res/drawable/kqzg.png


BIN
BusinessAirFryer/src/main/res/drawable/kqzg_active.png


BIN
BusinessAirFryer/src/main/res/drawable/meat.png


BIN
BusinessAirFryer/src/main/res/drawable/pizza.png


BIN
BusinessAirFryer/src/main/res/drawable/reheat.png


BIN
BusinessAirFryer/src/main/res/drawable/shrimp.png


BIN
BusinessAirFryer/src/main/res/drawable/steam.png


BIN
BusinessAirFryer/src/main/res/drawable/test.png


BIN
BusinessAirFryer/src/main/res/drawable/vegetable.png


+ 90 - 0
BusinessAirFryer/src/main/res/layout/dev_mode_view.xml

@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    xmlns:app="http://schemas.android.com/apk/res-auto">
+
+
+
+        <androidx.cardview.widget.CardView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            app:cardCornerRadius="@dimen/convert_30px"
+            app:cardElevation="@dimen/convert_8px"
+            app:cardUseCompatPadding="true"
+            app:cardPreventCornerOverlap="false"
+            app:cardBackgroundColor="#ffffff"
+            >
+
+
+
+                <LinearLayout
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content">
+
+                        <LinearLayout
+                            android:gravity="center"
+                            android:id="@+id/dfb_ative"
+                            android:layout_width="@dimen/convert_80px"
+                            android:layout_height="@dimen/convert_60px"
+                            android:background="#EE8F08"
+                            >
+                                <ImageView
+                                    android:layout_width="@dimen/convert_40px"
+                                    android:layout_height="@dimen/convert_40px"
+                                    android:src="@drawable/dfb_active"
+                                    />
+                        </LinearLayout>
+
+                        <LinearLayout
+                            android:gravity="center"
+                            android:id="@+id/dfb_unactive"
+                            android:visibility="gone"
+                            android:layout_width="@dimen/convert_80px"
+                            android:layout_height="@dimen/convert_60px"
+                            android:background="#ffffff"
+                            >
+                                <ImageView
+                                    android:layout_width="@dimen/convert_40px"
+                                    android:layout_height="@dimen/convert_40px"
+                                    android:src="@drawable/dfb"
+                                    />
+                        </LinearLayout>
+
+
+                        <LinearLayout
+                            android:gravity="center"
+                            android:id="@+id/kqzg_unactive"
+                            android:layout_width="@dimen/convert_80px"
+                            android:layout_height="@dimen/convert_60px"
+                            android:background="#ffffff" >
+                                <ImageView
+                                    android:layout_width="@dimen/convert_40px"
+                                    android:layout_height="@dimen/convert_40px"
+                                    android:src="@drawable/kqzg"
+                                    />
+                        </LinearLayout>
+
+                        <LinearLayout
+                            android:gravity="center"
+                            android:visibility="gone"
+                            android:id="@+id/kqzg_active"
+                            android:layout_width="@dimen/convert_80px"
+                            android:layout_height="@dimen/convert_60px"
+                            android:background="#EE8F08" >
+                                <ImageView
+                                    android:layout_width="@dimen/convert_40px"
+                                    android:layout_height="@dimen/convert_40px"
+                                    android:src="@drawable/kqzg_active"
+                                    />
+                        </LinearLayout>
+
+                </LinearLayout>
+
+        </androidx.cardview.widget.CardView>
+
+
+
+
+
+</LinearLayout>

+ 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>

+ 17 - 0
BusinessAirFryer/src/test/java/com/develop/airfryer/ExampleUnitTest.kt

@@ -0,0 +1,17 @@
+package com.develop.airfryer
+
+import org.junit.Test
+
+import org.junit.Assert.*
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * See [testing documentation](http://d.android.com/tools/testing).
+ */
+class ExampleUnitTest {
+    @Test
+    fun addition_isCorrect() {
+        assertEquals(4, 2 + 2)
+    }
+}

+ 1 - 0
BusinessCommon/build.gradle

@@ -16,5 +16,6 @@ android{
 
 dependencies {
     api project(path: ':libBase')
+    api project(path:':BusinessAirFryer')
     kapt  "androidx.room:room-compiler:2.4.2"
 }

+ 3 - 0
BusinessCommon/src/main/java/com/develop/common/bean/CfConfig.kt

@@ -0,0 +1,3 @@
+package com.develop.common.bean
+
+data class CfConfig(var workModes: ArrayList<WorkMode>)

+ 3 - 0
BusinessCommon/src/main/java/com/develop/common/bean/WorkMode.kt

@@ -0,0 +1,3 @@
+package com.develop.common.bean
+
+data class WorkMode(val name: String?, val type: String, val icon: String?,val bg: String?,val devMode:String?)

+ 3 - 0
BusinessCommon/src/main/java/com/develop/common/data_repo/FoodDataProvider.kt

@@ -153,6 +153,9 @@ object FoodDataProvider {
 
     /**获取菜品图片路径*/
     fun getResourcePath(relativePath: String?): String {
+        if(relativePath == null){
+            return  ""
+        }
         if (relativePath?.startsWith("http") == true) {
             return relativePath
         }

+ 44 - 44
BusinessCommon/src/main/java/com/develop/common/data_repo/db/DataFactory.kt

@@ -177,50 +177,50 @@ object DataFactory {
         favoriteRecipes.forEach {
             favoriteRecipesIds.add(it.favoriteRecipesId)
         }
-        recipesList.sortWith(Comparator { t, t2 ->
-            when (sortedType) {
-                SortedType.Popular -> {
-                    if ((t.useNum ?: 0) > (t2.useNum ?: 0)) {
-                        return@Comparator -1
-                    } else if ((t.useNum ?: 0) == (t2.useNum ?: 0)) {
-                        return@Comparator 0
-                    } else {
-                        return@Comparator 1
-                    }
-                }
-                SortedType.Newest -> {
-                    if ((t.updateTime ?: 0L) > (t2.updateTime ?: 0L)) {
-                        return@Comparator 1
-                    } else if ((t.updateTime ?: 0L) == (t2.updateTime ?: 0L))
-                        return@Comparator 0
-                    else {
-                        return@Comparator -1
-                    }
-
-                }
-                SortedType.Score -> {
-                    val score1 = t.score?.toInt() ?: 0
-                    val score2 = t2.score?.toInt() ?: 0
-                    if (score1 > score2) {
-                        return@Comparator 1
-                    } else if (score1 == score2) {
-                        return@Comparator 0
-                    } else {
-                        return@Comparator -1
-                    }
-                }
-                SortedType.A2Z -> {
-                    val score1 = t.name?.compareTo(t2.name ?: "") ?: 0
-                    if (score1 > 0) {
-                        return@Comparator 1
-                    } else if (score1 == 0) {
-                        return@Comparator 0
-                    } else {
-                        return@Comparator -1
-                    }
-                }
-            }
-        })
+//        recipesList.sortWith(Comparator { t, t2 ->
+//            when (sortedType) {
+//                SortedType.Popular -> {
+//                    if ((t.useNum ?: 0) > (t2.useNum ?: 0)) {
+//                        return@Comparator -1
+//                    } else if ((t.useNum ?: 0) == (t2.useNum ?: 0)) {
+//                        return@Comparator 0
+//                    } else {
+//                        return@Comparator 1
+//                    }
+//                }
+//                SortedType.Newest -> {
+//                    if ((t.updateTime ?: 0L) > (t2.updateTime ?: 0L)) {
+//                        return@Comparator 1
+//                    } else if ((t.updateTime ?: 0L) == (t2.updateTime ?: 0L))
+//                        return@Comparator 0
+//                    else {
+//                        return@Comparator -1
+//                    }
+//
+//                }
+//                SortedType.Score -> {
+//                    val score1 = t.score?.toInt() ?: 0
+//                    val score2 = t2.score?.toInt() ?: 0
+//                    if (score1 > score2) {
+//                        return@Comparator 1
+//                    } else if (score1 == score2) {
+//                        return@Comparator 0
+//                    } else {
+//                        return@Comparator -1
+//                    }
+//                }
+//                SortedType.A2Z -> {
+//                    val score1 = t.name?.compareTo(t2.name ?: "") ?: 0
+//                    if (score1 > 0) {
+//                        return@Comparator 1
+//                    } else if (score1 == 0) {
+//                        return@Comparator 0
+//                    } else {
+//                        return@Comparator -1
+//                    }
+//                }
+//            }
+//        })
         val foodList = mutableListOf<FoodContentModel>()
         for (i in recipesList.indices) {
             val recipes = recipesList[i]

+ 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 // 将更新后的布局参数应用到最后一个子视图中
+               }
+           }
+       }
+
+    }
+
+
+
+
+}

+ 2 - 2
BusinessCommon/src/main/java/com/develop/common/ui/CommonBindingActivity.kt

@@ -241,8 +241,8 @@ abstract class CommonBindingActivity<T : ViewBinding> : BaseBindingActivity<T>()
                 }
 
                 override fun onCancel() {
-                    if (event.confirm != null) {
-                        event.confirm.callback();
+                    if (event.cancel != null) {
+                        event.cancel.callback();
                     }
                     cancelConfirmDialog.removeSelf();
                     lastMsg = "";

+ 45 - 37
BusinessCommon/src/main/java/com/develop/common/utils/AppVersionUtil.kt

@@ -24,52 +24,60 @@ import java.util.*
 object AppVersionUtil {
 
     fun checkRecipeUpdate(shoNoUpdateDialog: Boolean = false) {
+
         TopResumedAtyHolder.getCurrentActivity()?.apply {
             scopeNetLife {
-                val result = Post<DevInfoResult>(Api.DEV_INFO) {
-                    body = DeviceInfoBody.genDeviceInfoBody()
-                }.await()
-                val downloadDir = this@apply.externalCacheDir.toString()
-                val downloadName = System.nanoTime().toString()
-                val recipeUpdateTime = result.recipeUpdateTime
-                val newRecipes = LinkedList(result.newRecipes)
-                if (newRecipes.isEmpty() && shoNoUpdateDialog) {
-                    val dialog = RecipeUpdateDialog()
-                    dialog.onDialogClickListener =
-                        object : RecipeUpdateDialog.OnDialogClickListener {
-                            override fun onConfirm() {
 
+                try {
+                    val result = Post<DevInfoResult>(Api.DEV_INFO) {
+                        body = DeviceInfoBody.genDeviceInfoBody()
+                    }.await()
+                    val downloadDir = this@apply.externalCacheDir.toString()
+                    val downloadName = System.nanoTime().toString()
+                    val recipeUpdateTime = result.recipeUpdateTime
+                    val newRecipes = LinkedList(result.newRecipes)
+                    if (newRecipes.isEmpty() && shoNoUpdateDialog) {
+                        val dialog = RecipeUpdateDialog()
+                        dialog.onDialogClickListener =
+                            object : RecipeUpdateDialog.OnDialogClickListener {
+                                override fun onConfirm() {
+
+                                }
+
+                                override fun onCancel() {
+                                }
                             }
+                        dialog.showNoUpdateTips(supportFragmentManager, "RECIPE_UPDATE_DIALOG")
 
-                            override fun onCancel() {
-                            }
-                        }
-                    dialog.showNoUpdateTips(supportFragmentManager, "RECIPE_UPDATE_DIALOG")
+                    }
+                    if (newRecipes.isNotEmpty()) {
+                        val dialog = RecipeUpdateDialog()
+                        dialog.onDialogClickListener =
+                            object : RecipeUpdateDialog.OnDialogClickListener {
+                                override fun onConfirm() {
+                                    downloadRecipes(
+                                        newRecipes,
+                                        dialog,
+                                        newRecipes.size.toLong(),
+                                        downloadDir,
+                                        downloadName,
+                                        recipeUpdateTime
+                                    )
+                                }
+
+                                override fun onCancel() {
+                                }
 
-                }
-                if (newRecipes.isNotEmpty()) {
-                    val dialog = RecipeUpdateDialog()
-                    dialog.onDialogClickListener =
-                        object : RecipeUpdateDialog.OnDialogClickListener {
-                            override fun onConfirm() {
-                                downloadRecipes(
-                                    newRecipes,
-                                    dialog,
-                                    newRecipes.size.toLong(),
-                                    downloadDir,
-                                    downloadName,
-                                    recipeUpdateTime
-                                )
                             }
+                        dialog.showUpdateTips(
+                            supportFragmentManager, "RECIPE_UPDATE_DIALOG", newRecipes.size.toLong()
+                        )
+                    }
+                }catch (e:java.lang.Exception){
+                    e.printStackTrace()
+                }
 
-                            override fun onCancel() {
-                            }
 
-                        }
-                    dialog.showUpdateTips(
-                        supportFragmentManager, "RECIPE_UPDATE_DIALOG", newRecipes.size.toLong()
-                    )
-                }
             }
 
         }

+ 37 - 0
BusinessCommon/src/main/java/com/develop/common/utils/ConfigUtils.kt

@@ -0,0 +1,37 @@
+package com.develop.common.utils
+
+import android.content.Context
+import com.develop.base.ext.GlobalApp
+import com.develop.common.bean.CfConfig
+import com.develop.common.bean.WorkMode
+import com.google.gson.Gson
+import org.json.JSONObject
+import java.io.IOException
+import java.nio.charset.Charset
+
+object ConfigUtils {
+
+
+    fun loadConfig(): CfConfig? {
+        return try {
+            val inputStream = GlobalApp().assets.open("config.json")
+            val size = inputStream.available()
+            val buffer = ByteArray(size)
+            inputStream.read(buffer)
+            inputStream.close()
+
+            val jsonString = String(buffer, Charset.defaultCharset())
+            val gson = Gson()
+            val cfConfig = gson.fromJson(jsonString, CfConfig::class.java)
+            cfConfig;
+        } catch (ex: IOException) {
+            ex.printStackTrace()
+            null
+        }
+    }
+
+    fun getMode(type: String): WorkMode? {
+        return loadConfig()?.workModes?.find { it.type == type }?.copy()
+    }
+
+}

+ 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
     }
 }

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

@@ -87,7 +87,7 @@ class FoodContentView : RelativeLayout {
             }
         }
         binding.apply {
-            ivCover.load(cover)
+            if("" != cover) ivCover.load(cover)
             tvFoodName.updateText(content.foodName)
             starView.apply {
                 setStarCount(content.starCount)

+ 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>

+ 5 - 1
BusinessCommon/src/main/res/layout/dialog_cancel_confirm.xml

@@ -29,7 +29,9 @@
 
         <TextView
             android:id="@+id/tv_yes"
-            android:layout_width="@dimen/convert_140px"
+            android:paddingLeft="@dimen/convert_32px"
+            android:paddingRight="@dimen/convert_32px"
+            android:layout_width="wrap_content"
             android:layout_height="@dimen/convert_60px"
             android:layout_below="@id/tv_title"
             android:layout_marginStart="@dimen/convert_90px"
@@ -42,6 +44,8 @@
 
         <TextView
             android:id="@+id/tv_cancel"
+            android:paddingLeft="@dimen/convert_32px"
+            android:paddingRight="@dimen/convert_32px"
             android:layout_width="@dimen/convert_140px"
             android:layout_height="@dimen/convert_60px"
             android:layout_below="@id/tv_title"

+ 2 - 2
BusinessCommon/src/main/res/layout/fragment_comme_list.xml

@@ -5,10 +5,10 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     app:stateEnabled="true">
-
     <androidx.recyclerview.widget.RecyclerView
         android:id="@+id/rv"
+        android:overScrollMode="never"
         android:layout_width="match_parent"
         android:layout_height="match_parent" />
 
-</com.scwang.smart.refresh.layout.SmartRefreshLayout>
+</com.scwang.smart.refresh.layout.SmartRefreshLayout >

+ 20 - 0
BusinessCommon/src/main/res/layout/fragment_comme_list_v2.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:gravity="center"
+    android:id="@+id/rv"
+    android:orientation="vertical"
+    android:overScrollMode="never"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent" >
+
+    <Spinner
+        style="@style/CustomSpinner"
+        android:layout_width="@dimen/convert_208px"
+        android:layout_height="@dimen/convert_60px">
+
+    </Spinner>
+
+
+</LinearLayout>

+ 16 - 0
BusinessCommon/src/main/res/layout/home_function_top_bar_view.xml

@@ -4,6 +4,7 @@
     android:layout_height="@dimen/convert_88px">
 
 
+
     <RelativeLayout
         android:id="@+id/mode_layout"
         android:layout_width="@dimen/convert_314px"
@@ -17,6 +18,7 @@
             android:layout_centerVertical="true"
             android:layout_marginStart="@dimen/convert_40px" />
 
+
         <androidx.appcompat.widget.AppCompatTextView
             android:id="@+id/function_name"
             android:layout_width="wrap_content"
@@ -26,6 +28,10 @@
             android:layout_toEndOf="@id/iv_function"
             android:textColor="@color/color_fff"
             android:textSize="@dimen/convert_36px" />
+
+
+
+
     </RelativeLayout>
 
     <LinearLayout
@@ -84,6 +90,7 @@
 
     <androidx.appcompat.widget.AppCompatTextView
         android:id="@+id/tv_title"
+        android:visibility="gone"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_centerVertical="true"
@@ -91,4 +98,13 @@
         android:layout_toEndOf="@id/mode_layout"
         android:textColor="@color/color_1A1A1A"
         android:textSize="@dimen/convert_30px" />
+
+    <com.develop.airfryer.ui.DevModeView
+        android:layout_centerVertical="true"
+        android:layout_toStartOf="@id/user_layout"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="@dimen/convert_24px"
+        />
+
 </RelativeLayout>

+ 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"/>

+ 2 - 0
BusinessCommon/src/main/res/values/cucstom_spinner_background.xml.xml

@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources />

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

@@ -233,4 +233,32 @@ Nanfang plus client is an online information platform developed and operated by
     <string name="account_or_pwd_error">Incorrect account number or password</string>
     <string name="login_faild">Incorrect account number or password</string>
 
+
+    <!-- 空炸模式 -->
+    <string name="air_fryer">AIR FRYER</string>
+    <string name="meat">MEAT</string>
+    <string name="fish">FISH</string>
+    <string name="bakc">BAKC</string>
+    <string name="drumsticks">DRUMSTICKS</string>
+    <string name="chicken_wing">CHICKEN WING</string>
+    <string name="vegetable">VEGETABLE</string>
+    <string name="shrimp">SHRIMP</string>
+    <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>
+    <string name="error_pot_clover_tips">The current cooking mode is not consistent with the type of pot cover. Do you want to switch to the corresponding cooking mode?</string>
+
+
+
+    <string name="cook_eggs">COOK EGGS</string>
+    <string name="cook_rice">COOK RICE</string>
+    <string name="mulsify">MULSIFY</string>
+    <string name="puree">PUREE</string>
+    <string name="roast">ROAST</string>
+    <string name="smoothie">SMOOTHIE</string>
+    <string name="sovs_vide">SOVS VIDE</string>
+    <string name="auto_clean">AUTO CLEAN</string>
+
+
 </resources>

+ 6 - 0
BusinessCommon/src/main/res/values/styles.xml

@@ -27,4 +27,10 @@
         <item name="cornerSizeTopRight">@dimen/convert_10px</item>
         <item name="cornerSizeTopLeft">@dimen/convert_10px</item>
     </style>
+
+    <style name="CustomSpinner" parent="Widget.AppCompat.Spinner">
+        <item name="android:padding">8dp</item>
+        <item name="android:layout_margin">8dp</item>
+        <item name="android:dropDownSelector">@android:color/white</item>
+    </style>
 </resources>

+ 1 - 1
BusinessMain/src/main/java/com/develop/main/ui/HomeActivity.kt

@@ -37,7 +37,7 @@ class HomeActivity : CommonBVMActivity<ActivityHomeBinding, HomeViewModel>() {
     }
 
     private val recipesFragment by lazy {
-        RecipesFragment()
+        RecipesFragmentV2()
     }
     private var newsLayout: NewsLayout? = null
 

+ 33 - 12
BusinessMain/src/main/java/com/develop/main/ui/ModesFragment.kt

@@ -1,5 +1,6 @@
 package com.develop.main.ui
 
+import android.content.Context
 import android.os.Bundle
 import android.view.LayoutInflater
 import android.view.ViewGroup
@@ -7,25 +8,29 @@ import android.widget.ImageView
 import androidx.appcompat.widget.AppCompatTextView
 import androidx.recyclerview.widget.LinearSnapHelper
 import androidx.recyclerview.widget.RecyclerView
+import com.develop.common.bean.WorkMode
 import com.develop.base.ext.load
 import com.develop.base.ext.navigateTo
 import com.develop.base.ext.resId2Dimension
 import com.develop.base.ext.updateText
 import com.develop.base.util.TopResumedAtyHolder
-import com.develop.common.data_repo.db.DataFactory
-import com.develop.common.data_repo.db.ModelsModel
 import com.develop.common.data_repo.db.ModesType
 import com.develop.common.dialog.CancelConfirmDialog
 import com.develop.common.router.Screens
 import com.develop.common.tag.MODE_TYPE
 import com.develop.common.ui.CommonBVMFragment
+import com.develop.common.utils.ConfigUtils
 import com.develop.main.R
 import com.develop.main.databinding.FragmentModesBinding
 import com.develop.main.viewmodel.HomeViewModel
 import com.drake.brv.utils.linear
 import com.drake.brv.utils.setup
+import com.kuyuntech.cofarcooking.device.sdk.constant.core.DevModes
 import com.kuyuntech.cofarcooking.device.sdk.constant.core.DevStatus
 import com.kuyuntech.cofarcooking.device.sdk.util.core.CofarSDK
+import org.json.JSONObject
+import java.io.IOException
+import java.nio.charset.Charset
 import kotlin.math.abs
 
 /**
@@ -53,25 +58,41 @@ class ModesFragment : CommonBVMFragment<FragmentModesBinding, HomeViewModel>() {
         initView()
     }
 
+
+
+
+
+
+
+
+
+
+
     private fun initView() {
-        modeTypeList = DataFactory.modesTypeList
+
+        val configJson = ConfigUtils.loadConfig()
+        var modes = configJson?.workModes?.filter { it.devMode == CofarSDK.devInfo().devMode }
+
+
         binding.galleryRecycle.apply {
             linear(RecyclerView.HORIZONTAL)
             setup {
-                addType<ModelsModel>(R.layout.item_mode_card_view)
+                addType<WorkMode>(R.layout.item_mode_card_view)
                 onBind {
-                    val model = getModel<ModelsModel>()
-                    findView<ImageView>(R.id.iv_icon).load(model.resId)
-                    findView<AppCompatTextView>(R.id.tv_mode_name).updateText(
-                        model.modeName
-                    )
+                    val model = getModel<WorkMode>()
+                    findView<ImageView>(R.id.iv_icon).load(resources.getIdentifier(model.icon,"drawable","com.develop.foodcooking"))
+                    model.name?.let { it1 ->
+                        findView<AppCompatTextView>(R.id.tv_mode_name).updateText(
+                            resources.getString(resources.getIdentifier(it1,"string","com.develop.foodcooking"))
+                        )
+                    }
                 }
                 R.id.card_view.onClick {
 
 
                     val devInfo = CofarSDK.devInfo();
 
-                    if( devInfo.status != DevStatus.STOP.toInt() && devInfo.runningInstId != modeTypeList[absoluteAdapterPosition].name){
+                    if( devInfo.status != DevStatus.STOP.toInt() && devInfo.runningInstId != modes?.get(absoluteAdapterPosition)?.type){
                         runningWeightTips()
                         return@onClick
                     }
@@ -81,11 +102,11 @@ class ModesFragment : CommonBVMFragment<FragmentModesBinding, HomeViewModel>() {
 
 
                         val bundle = Bundle()
-                        bundle.putString(MODE_TYPE, modeTypeList[absoluteAdapterPosition].name)
+                        bundle.putString(MODE_TYPE, modes?.get(absoluteAdapterPosition)?.type)
                         with(bundle)
                     }
                 }
-            }.models = DataFactory.genGalleryModesList(resources)
+            }.models = modes
             // 让item居中显示
             val snapHelper = LinearSnapHelper()
             // 绑定到 mRecyclerView

+ 31 - 22
BusinessMain/src/main/java/com/develop/main/ui/RecipesFragment.kt

@@ -3,6 +3,7 @@ package com.develop.main.ui
 
 import android.media.metrics.Event
 import android.os.Bundle
+import android.util.Log
 import android.util.SparseIntArray
 import android.view.LayoutInflater
 import android.view.View
@@ -10,6 +11,7 @@ import android.view.ViewGroup
 import android.widget.RelativeLayout
 import androidx.appcompat.widget.AppCompatTextView
 import androidx.databinding.ViewDataBinding
+import androidx.recyclerview.widget.LinearLayoutManager
 import androidx.recyclerview.widget.RecyclerView
 import com.bumptech.glide.Glide
 import com.develop.base.ext.globalApp
@@ -29,10 +31,7 @@ import com.develop.main.R
 import com.develop.main.databinding.ItemFilterAndSortViewBinding
 import com.develop.main.viewmodel.HomeViewModel
 import com.drake.brv.BindingAdapter
-import com.drake.brv.utils.grid
-import com.drake.brv.utils.linear
-import com.drake.brv.utils.models
-import com.drake.brv.utils.setup
+import com.drake.brv.utils.*
 import org.greenrobot.eventbus.EventBus
 import org.greenrobot.eventbus.Subscribe
 
@@ -42,6 +41,7 @@ class RecipesFragment : CommonBVMFragment<FragmentCommeListBinding, HomeViewMode
 
     private var sortRv: RecyclerView? = null
     private var filterRv: RecyclerView? = null
+    private var foodRecycle: RecyclerView? = null
 
     private var categoryDataList = mutableListOf<DevRecipeCategory>()
     private var sortDataList = mutableListOf<FilterSortModel>()
@@ -139,18 +139,23 @@ class RecipesFragment : CommonBVMFragment<FragmentCommeListBinding, HomeViewMode
                         }
                         HOME_FOOD_LIST_PROVIDER -> {
                             val foodListModel = getModel<FoodListModel>()
-                            val foodRecycle = findView<RecyclerView>(R.id.food_recycle)
-                            foodRecycle.apply {
-                                grid(4)
-                                setup {
-                                    addType<FoodContentModel>(com.develop.common.R.layout.food_content_provider)
-                                    onBind {
-                                        findView<FoodContentView>(com.develop.common.R.id.food_content_view).setFoodContent(
-                                            getModel()
-                                        )
-                                    }
-                                }
-                            }.models = foodListModel.foodList
+
+                            if(foodRecycle == null){
+                                 foodRecycle = findView<RecyclerView>(R.id.food_recycle)
+                                 foodRecycle!!.grid(4)
+                                 foodRecycle!!.setup {
+                                     addType<FoodContentModel>(com.develop.common.R.layout.food_content_provider)
+                                     onBind {
+                                         findView<FoodContentView>(com.develop.common.R.id.food_content_view).setFoodContent(
+                                             getModel()
+                                         )
+                                     } }
+                            }
+
+
+                            foodRecycle!!.models = foodListModel.foodList
+
+
                         }
                         HOME_FUNCTION_PROVIDER -> {
                             filterSortSearchView =
@@ -182,12 +187,16 @@ class RecipesFragment : CommonBVMFragment<FragmentCommeListBinding, HomeViewMode
                 }
             }
         }
+
+
+
         binding.page.apply {
             setEnableRefresh(false)
+            setEnableNestedScroll(true)
             setOnLoadMoreListener {
                 isRefresh = false
                 if (viewModel.isSearch) {
-                    finishLoadMore(0)
+                    finishLoadMore(true)
                     return@setOnLoadMoreListener
                 }
                 if (viewModel.recipesType == RecipesType.ONLINE) {
@@ -196,11 +205,11 @@ class RecipesFragment : CommonBVMFragment<FragmentCommeListBinding, HomeViewMode
                             categoryCode, viewModel.currCategoryName, isLoadMore = true
                         )
                     } else {
-                        finishLoadMore(0)
+                        finishLoadMore(true)
                     }
                 } else {
-                    if (!viewModel.loadMoreLocalRecipes()) {
-                        finishLoadMore(0)
+                    if (viewModel.loadMoreLocalRecipes()) {
+                        closeHeaderOrFooter()
                     }
                 }
             }
@@ -370,7 +379,7 @@ class RecipesFragment : CommonBVMFragment<FragmentCommeListBinding, HomeViewMode
             //获取对应分类菜谱回调
             localRecipesLiveData.observe(viewLifecycleOwner) {
                 binding.page.apply {
-                    finishLoadMore(0)
+                    finishLoadMore(true)
                 }
                 binding.rv.apply {
                     models = it
@@ -383,7 +392,7 @@ class RecipesFragment : CommonBVMFragment<FragmentCommeListBinding, HomeViewMode
             //获取线上菜谱列表回调
             onLineRecipesLiveData.observe(viewLifecycleOwner) {
                 binding.page.apply {
-                    finishLoadMore(0)
+                    finishLoadMore(true)
                 }
                 binding.rv.apply {
                     models = it

+ 63 - 0
BusinessMain/src/main/java/com/develop/main/ui/RecipesFragmentV2.kt

@@ -0,0 +1,63 @@
+package com.develop.main.ui
+
+
+import android.media.metrics.Event
+import android.os.Bundle
+import android.util.Log
+import android.util.SparseIntArray
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import android.widget.RelativeLayout
+import androidx.appcompat.widget.AppCompatTextView
+import androidx.databinding.ViewDataBinding
+import androidx.recyclerview.widget.LinearLayoutManager
+import androidx.recyclerview.widget.RecyclerView
+import com.bumptech.glide.Glide
+import com.develop.base.ext.globalApp
+import com.develop.base.ext.navigateTo
+import com.develop.base.ext.resId2Dimension
+import com.develop.base.ext.updateText
+import com.develop.base.widgets.CommonPopupWindow
+import com.develop.common.data_repo.db.*
+import com.develop.common.data_repo.db.entity.DevRecipeCategory
+import com.develop.common.databinding.FragmentCommeListBinding
+import com.develop.common.databinding.FragmentCommeListV2Binding
+import com.develop.common.event.RefreshDataEvent
+import com.develop.common.router.Screens
+import com.develop.common.tag.*
+import com.develop.common.ui.CommonBVMFragment
+import com.develop.common.widget.*
+import com.develop.main.R
+import com.develop.main.databinding.ItemFilterAndSortViewBinding
+import com.develop.main.viewmodel.HomeViewModel
+import com.drake.brv.BindingAdapter
+import com.drake.brv.utils.*
+import org.greenrobot.eventbus.EventBus
+import org.greenrobot.eventbus.Subscribe
+
+class RecipesFragmentV2 : CommonBVMFragment<FragmentCommeListV2Binding, HomeViewModel>() {
+
+
+
+    override fun createViewModel(): HomeViewModel {
+        return getViewModelOfActivity(HomeViewModel::class.java)
+    }
+
+    override fun createViewBinding(
+        inflater: LayoutInflater, container: ViewGroup?
+    ): FragmentCommeListV2Binding {
+        return FragmentCommeListV2Binding.inflate(inflater, container, false)
+    }
+
+    override fun onPostCreateView() {
+        super.onPostCreateView()
+
+    }
+
+    override fun onDestroy() {
+        super.onDestroy()
+    }
+
+
+}

+ 51 - 2
BusinessMain/src/main/java/com/develop/main/viewmodel/HomeViewModel.kt

@@ -77,6 +77,55 @@ class HomeViewModel : BaseViewModel() {
                     FoodDataProvider.getDatabase().recipeDao().queryRecipesByCategory(categoryNum)
                         .toMutableList()
                 }
+
+
+            totalLocalRecipes.sortWith(Comparator { t, t2 ->
+                when (sortedType) {
+                    SortedType.Popular -> {
+                        if ((t.useNum ?: 0) > (t2.useNum ?: 0)) {
+                            return@Comparator -1
+                        } else if ((t.useNum ?: 0) == (t2.useNum ?: 0)) {
+                            return@Comparator 0
+                        } else {
+                            return@Comparator 1
+                        }
+                    }
+                    SortedType.Newest -> {
+                        if ((t.updateTime ?: 0L) > (t2.updateTime ?: 0L)) {
+                            return@Comparator 1
+                        } else if ((t.updateTime ?: 0L) == (t2.updateTime
+                                ?: 0L)
+                        ) return@Comparator 0
+                        else {
+                            return@Comparator -1
+                        }
+
+                    }
+                    SortedType.Score -> {
+                        val score1 = t.score?.toInt() ?: 0
+                        val score2 = t2.score?.toInt() ?: 0
+                        if (score1 > score2) {
+                            return@Comparator 1
+                        } else if (score1 == score2) {
+                            return@Comparator 0
+                        } else {
+                            return@Comparator -1
+                        }
+                    }
+                    SortedType.A2Z -> {
+                        val score1 = t.name?.compareTo(t2.name ?: "") ?: 0
+                        if (score1 > 0) {
+                            return@Comparator 1
+                        } else if (score1 == 0) {
+                            return@Comparator 0
+                        } else {
+                            return@Comparator -1
+                        }
+                    }
+                }
+            })
+
+
             totalLocalSize = totalLocalRecipes.size
             val localRecipeList = if (totalLocalSize < 12) {
                 hasMoreLocal = false
@@ -102,7 +151,7 @@ class HomeViewModel : BaseViewModel() {
     fun loadMoreLocalRecipes(): Boolean {
         if (hasMoreLocal) {
             startSize = endSize
-            endSize = startSize + 12
+            endSize = startSize + 24
             if (endSize > totalLocalSize) {
                 endSize = totalLocalSize
                 hasMoreLocal = false
@@ -186,7 +235,7 @@ class HomeViewModel : BaseViewModel() {
                     }
                 }
             }
-            result.add(FoodListModel(foodContentList,""))
+            result.add(FoodListModel(foodContentList, ""))
             hotWordSearchRecipesLiveData.postValue(result)
         }
     }

+ 3 - 0
BusinessMain/src/main/res/layout/food_grid_view.xml

@@ -1,9 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/food_recycle"
+    android:overScrollMode="never"
+    android:scrollbars="vertical"
     android:paddingStart="@dimen/convert_14px"
     android:paddingEnd="@dimen/permission_sp_14"
     android:layout_width="match_parent"
+    android:nestedScrollingEnabled="true"
     android:layout_height="wrap_content">
 
 </androidx.recyclerview.widget.RecyclerView>

+ 1 - 0
BusinessMain/src/main/res/layout/item_mode_card_view.xml

@@ -12,6 +12,7 @@
         android:layout_height="@dimen/convert_400px"
         android:layout_marginTop="@dimen/convert_60px"
         app:cardElevation="@dimen/convert_10px"
+        app:cardCornerRadius="@dimen/convert_24px"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent">
 

+ 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
 }

+ 207 - 12
BusinessStep/src/main/java/com/develop/step/ui/ModesDetailActivity.kt

@@ -1,6 +1,7 @@
 package com.develop.step.ui
 
 import android.annotation.SuppressLint
+import android.graphics.BitmapFactory
 import android.os.Bundle
 import android.util.Log
 import android.view.KeyEvent
@@ -9,6 +10,7 @@ import android.view.KeyEvent.ACTION_UP
 import android.view.LayoutInflater
 import android.view.MotionEvent
 import android.view.View
+import android.widget.ImageView
 import com.alibaba.android.arouter.facade.annotation.Route
 import com.develop.base.util.ThreadUtils
 import com.develop.common.data_repo.db.ModesType
@@ -22,6 +24,7 @@ import com.develop.common.tag.PRESS_DOWN_KEY_CODE
 import com.develop.common.tag.TURN_DOWN_KEY_CODE
 import com.develop.common.tag.TURN_UP_KEY_CODE
 import com.develop.common.ui.CommonBVMActivity
+import com.develop.common.utils.ConfigUtils
 import com.develop.common.utils.getTimeStr
 import com.develop.common.widget.DirectionView
 import com.develop.common.widget.RingControlView
@@ -32,6 +35,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
@@ -60,16 +64,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
@@ -89,11 +98,34 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
         return ActivityModeDetailBinding.inflate(inflater)
     }
 
+    private fun turnDevModeUI(){
+
+        if(CofarSDK.devInfo().devMode == DevModes.AIR_FRYER){
+            //隐藏点击
+            binding.clCookDirection.visibility = View.GONE;
+            binding.clCookSpeed.visibility = View.GONE;
+            binding.clCookWater.visibility = View.VISIBLE
+            binding.ivTurbo.visibility = View.GONE
+
+
+        }
+
+        if(CofarSDK.devInfo().devMode == DevModes.SOUP){
+            //隐藏点击
+            binding.clCookDirection.visibility = View.VISIBLE;
+            binding.clCookSpeed.visibility = View.VISIBLE;
+            binding.clCookWater.visibility = View.GONE
+          //  binding.ivTurbo.visibility = View.VISIBLE
+
+        }
+
+    }
+
     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
@@ -155,6 +187,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) {
                                 //当前调节时间
@@ -204,6 +247,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) {
                                 //当前调节时间
@@ -318,8 +372,22 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
                 }
             }
 
-            if (CommonEventTypes.MOTOR_GEAR_RATHER_THEN_3_WITH_TEMP == event.type || CommonEventTypes.MOTOR_REVERSE_CAN_NOT_RATHER_THEN_3 == event.type) {
-                CofarSDK.cfgMotorGear(3);
+            if (CommonEventTypes.MAX_MOTOR_GEAR_RATHER_THEN_WITH_TEMP == event.type ) {
+                CofarSDK.cfgMotorGear(CofarSDK.devInfo().mode.maxMotorWithTemp.toByte())
+                currDevInfo.mode.apply {
+                    updateMotorGearUI(
+                        minMotorGear.toFloat(),
+                        maxMotorGear.toFloat(),
+                        CofarSDK.devInfo().mode.maxMotorWithTemp,
+                        isMotorGearChange
+                    )
+                }
+            }
+
+
+
+            if ( CommonEventTypes.MOTOR_REVERSE_CAN_NOT_RATHER_THEN_3 == event.type) {
+                CofarSDK.cfgMotorGear(3)
                 currDevInfo.mode.apply {
                     updateMotorGearUI(
                         minMotorGear.toFloat(),
@@ -370,7 +438,21 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
                     motorGear,
                     isMotorGearChange
                 )
-                updateMotorDirectionUI(currDevInfo.motorDirection.toInt(), isMotorDirectionChange)
+
+
+                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(if(currDevInfo.motorDirectionBuffer.toInt() == -1) currDevInfo.motorDirection.toInt() else currDevInfo.motorDirectionBuffer.toInt(), isMotorDirectionChange)
+
                 updateWeightUI(currDevInfo.weight.toFloat())
             }
         }
@@ -380,8 +462,21 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
     //======================================初始化数据和监听去==================================\\
 
     private fun initData() {
-        binding.tvModeName.text = viewModel.getModeTitle(resources)
-        binding.ivBanner.setBackgroundResource(viewModel.getBanner())
+        var workMode = ConfigUtils.getMode(modeType)
+        binding.tvModeName.text = getString(resources.getIdentifier(workMode?.name,"string",this.packageName))
+        binding.ivBanner.setImageResource(resources.getIdentifier(workMode?.bg,"drawable",this.packageName))
+//        // 获取ImageView的宽度和高度
+//        val imageViewWidth = binding.ivBanner.width
+//        val imageViewHeight = binding.ivBanner.height
+//
+//        // 设置ImageView的尺寸和scaleType属性
+//        binding.ivBanner.layoutParams.width = imageViewWidth
+//        binding.ivBanner.layoutParams.height = imageViewHeight
+//        binding.ivBanner.scaleType = ImageView.ScaleType.FIT_CENTER
+//
+//        // 设置ImageView的图片
+//        val bitmap = BitmapFactory.decodeResource(resources, resources.getIdentifier(workMode?.bg,"drawable",this.packageName))
+//        binding.ivBanner.setImageBitmap(bitmap)
         //点击切换的模式来显示对应的UI
         viewModel.currentStep.observe(this) {
             if (it == null) {
@@ -403,6 +498,10 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
                 CookSettingType.SPEED_SETTING -> {
                     changeSpeedSettingStep()
                 }
+                CookSettingType.WATER_SPRY -> {
+                   // changeSpeedSettingStep()
+                    changeWaterSprySettingStep()
+                }
                 CookSettingType.DIRECTION_SETTING -> {
                     changeDirectionSettingStep()
                 }
@@ -536,6 +635,10 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
             viewModel.changeStep(CookSettingType.DIRECTION_SETTING)
         }
 
+        binding.clCookWater.setOnClickListener {
+            viewModel.changeStep(CookSettingType.WATER_SPRY)
+        }
+
         binding.ivTurbo.setOnClickListener {
             turboClick()
         }
@@ -655,6 +758,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
@@ -709,6 +819,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
             binding.ivWeight.visibility = View.VISIBLE
             binding.ivTurbo.visibility = View.VISIBLE
         }
+        turnDevModeUI()
         changeTempSettingStep()
     }
 
@@ -743,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.TEMP_SETTING)
     }
 
@@ -757,6 +871,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)
     }
 
@@ -771,6 +888,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)
     }
 
@@ -785,15 +905,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)
@@ -807,6 +949,9 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
                 CookSettingType.DIRECTION_SETTING -> {
                     clCookDirection.upSelectedView(true)
                 }
+                CookSettingType.WATER_SPRY -> {
+                    clCookWater.upSelectedView(true)
+                }
                 CookSettingType.WEIGHT -> {
                     // do nothing
                 }
@@ -1005,6 +1150,11 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
     private fun updateMotorGearUI(
         minMotorGear: Float, maxMotorGear: Float, currentMotorGer: Int, isMotorGearChange: Boolean,focusUpdate: Boolean = false
     ) {
+
+        if(CofarSDK.devInfo().devMode != DevModes.SOUP){
+            return
+        }
+
         this.minMotorGear = minMotorGear.toInt()
         this.maxMotorGear = maxMotorGear.toInt()
         this.isMotorGearChange = isMotorGearChange
@@ -1012,13 +1162,46 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
             clCookSpeed.updateChangeValue(currentMotorGer.toString())
             speedRingView.setRange(minMotorGear, maxMotorGear)
             speedRingView.setCanTouch(isMotorGearChange)
-            if (!userChanging) {
+            if (!userChanging || focusUpdate) {
                 speedRingView.updateProgress(currentMotorGer)
                 speedRingText.text = currentMotorGer.toString()
             }
         }
     }
 
+
+    /**
+     * 更新喷水档位的UI
+     * @param minWaterGear 最小转速
+     * @param maxWaterGear 电机最大转速
+     * @param currentMotorGer 电机当前转速
+     * @param isWaterGearChange 转速是否可以修改
+     */
+    private fun updateWaterGearUI(
+        minWaterGear: Float, maxWaterGear: Float, currentMotorGer: Int, isWaterGearChange: Boolean,focusUpdate: Boolean = false
+    ) {
+
+        if(CofarSDK.devInfo().devMode != DevModes.AIR_FRYER){
+             return
+        }
+
+        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 当前的重量
@@ -1103,6 +1286,8 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
 
             }
         }
+
+        turnDevModeUI()
     }
 
     /**
@@ -1112,9 +1297,9 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
         if (currDevInfo.status.toByte() != DevStatus.STOP) {
             binding.btnCancel.visibility = View.VISIBLE
             binding.btnConfirm.visibility = View.VISIBLE
-            binding.btnStop.visibility = View.INVISIBLE
-            binding.btnPause.visibility = View.INVISIBLE
-            binding.btnResume.visibility = View.INVISIBLE
+            binding.btnStop.visibility = View.GONE
+            binding.btnPause.visibility = View.GONE
+            binding.btnResume.visibility = View.GONE
         }
     }
 
@@ -1282,6 +1467,13 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
         showConfirmAndCancelBtn()
     }
 
+
+    private fun waterGearSpeedEvent(progress: Int){
+        userChanging = true
+        CofarSDK.cfgWaterBear(progress);
+        showConfirmAndCancelBtn()
+    }
+
     /**
      * 旋转电机转速事件
      */
@@ -1296,7 +1488,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
      * 点击电机方向事件
      */
     private fun motorGearDirectionClick(direction: DirectionView.Direction) {
-        userChanging = false
+        userChanging = true
         binding.clCookDirection.updateChangeValue(
             viewModel.getDirectionStr(
                 direction == DirectionView.Direction.LEFT, resources
@@ -1304,11 +1496,14 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
         )
         if (direction != DirectionView.Direction.RIGHT) {
             CofarSDK.cfgMotorDirection(MotorDirections.REVERSE);
+            updateMotorDirectionUI(MotorDirections.REVERSE.toInt(), true);
+
 
         } else {
             CofarSDK.cfgMotorDirection(MotorDirections.FORWARD);
+            updateMotorDirectionUI(MotorDirections.FORWARD.toInt(), true);
+
         }
-        updateMotorDirectionUI(currDevInfo.motorDirection.toInt(), true);
 
         showConfirmAndCancelBtn()
     }

+ 57 - 5
BusinessStep/src/main/java/com/develop/step/ui/cook_step/CookStepActivity.kt

@@ -37,10 +37,7 @@ import com.develop.common.utils.CofarUtils
 import com.develop.common.utils.TimeUtil
 import com.develop.step.ui.cook_step.model.CookStepStatus
 import com.develop.step.ui.cook_step.model.CookStepUiData
-import com.kuyuntech.cofarcooking.device.sdk.constant.core.CommonEventTypes
-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
+import com.kuyuntech.cofarcooking.device.sdk.constant.core.*
 import com.kuyuntech.cofarcooking.device.sdk.eventbus.core.DevInfo
 import com.kuyuntech.cofarcooking.device.sdk.eventbus.event.DevCommonEvent
 import com.kuyuntech.cofarcooking.device.sdk.util.core.CofarSDK
@@ -60,6 +57,26 @@ class CookStepActivity : CookStepBaseActivity() {
     private var coverPath: Any? = null
     private var isFromOverWrite = false
 
+
+    private fun turnDevModeUI(){
+
+        if(CofarSDK.devInfo().devMode == DevModes.AIR_FRYER){
+            //隐藏点击
+            binding.controller.clCookDirection.visibility = View.GONE;
+            binding.controller.clCookSpeed.visibility = View.GONE;
+            binding.controller.clCookWater.visibility = View.VISIBLE
+        }
+
+        if(CofarSDK.devInfo().devMode == DevModes.SOUP){
+            //隐藏点击
+            binding.controller.clCookDirection.visibility = View.VISIBLE;
+            binding.controller.clCookSpeed.visibility = View.VISIBLE;
+            binding.controller.clCookWater.visibility = View.GONE
+
+        }
+
+    }
+
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
 
@@ -155,6 +172,7 @@ class CookStepActivity : CookStepBaseActivity() {
         }
         initData()
         initStepData()
+        turnDevModeUI()
     }
 
     private fun initData() {
@@ -510,6 +528,13 @@ class CookStepActivity : CookStepBaseActivity() {
         checkShowConfirm()
     }
 
+    override fun onUserWaterGear(value: Int) {
+        CofarSDK.cfgWaterBear(value);
+        binding.controller.waterSprayShow.updateGear(value)                               // 圆环设置-当前运行速度
+        binding.controller.clCookWater.binding.waterSprayShow.updateGear(value)
+        checkShowConfirm()
+    }
+
     override fun onSettingDirection(value: Int) {
         viewModel.displayStep()?.uiData?.direction = value
         if (value == 0) {
@@ -712,7 +737,27 @@ class CookStepActivity : CookStepBaseActivity() {
                 binding.controller.speedRingView.updateProgress(it.currentSpeed)
                 onUserChangeSpeed(it.currentSpeed)
             }
-        } else if (tabType == CookSettingType.TIME_SETTING) {
+        } else if(tabType == CookSettingType.WATER_SPRY){
+            cookStep?.uiData?.let {
+                if (!it.isWaterGearChange) {
+                    return
+                }
+                if (increase) {
+                    it.currentWaterGear++
+                    if (it.currentWaterGear > it.limitMaxWaterGear) {
+                        it.currentWaterGear = it.limitMaxWaterGear
+                    }
+                } else {
+                    it.currentWaterGear--
+                    if (it.currentWaterGear < it.limitMinWaterGear) {
+                        it.currentWaterGear = it.limitMinWaterGear
+                    }
+                }
+                viewModel.stepUiData.doingModify = true
+                binding.controller.waterRingView.updateProgress(it.currentWaterGear)
+                onUserWaterGear(it.currentWaterGear)
+            }
+        }else if (tabType == CookSettingType.TIME_SETTING) {
             cookStep?.uiData?.let {
                 if (!it.isTimeChange) {
                     return
@@ -1013,6 +1058,13 @@ class CookStepActivity : CookStepBaseActivity() {
             binding.controller.tvSetSpeed.updateText(uiData.currentSpeed.toString())                           // 下面的TAB-当前运行速度
         }
 
+        // 喷水设置
+        if (!viewModel.stepUiData.doingModify || focusUpdate) {
+            binding.controller.waterRingView.updateProgress(CofarSDK.devInfo().waterGear?:0)                               // 圆环设置-当前运行速度
+            binding.controller.waterSprayShow.updateGear(CofarSDK.devInfo().waterGear?:0)                               // 圆环设置-当前运行速度
+            binding.controller.clCookWater.binding.waterSprayShow.updateGear(CofarSDK.devInfo().waterGear?:0)                               // 圆环设置-当前运行速度
+        }
+
         // 方向设置
         if (!viewModel.stepUiData.doingModify || focusUpdate) {
             updateDirection(uiData.direction)

+ 47 - 0
BusinessStep/src/main/java/com/develop/step/ui/cook_step/CookStepBaseActivity.kt

@@ -77,6 +77,8 @@ abstract class CookStepBaseActivity :
 
     abstract fun onUserChangeSpeed(value: Int)
 
+    abstract fun onUserWaterGear(value: Int)
+
     abstract fun onDevStateChange(devInfo: DevInfo)
 
     /**
@@ -165,6 +167,9 @@ abstract class CookStepBaseActivity :
         binding.controller.clCookDirection.setOnClickListener {
             changeDirectionSettingStep()
         }
+        binding.controller.clCookWater.setOnClickListener{
+            changeWaterGearSettingStep()
+        }
         binding.viewBack.setOnClickListener {
             val run = recipeNumber?.let { it1 -> CofarSDK.devInfo().runningInstId.startsWith(it1) }
             if (runningState != 0 && run == true) {
@@ -202,6 +207,16 @@ abstract class CookStepBaseActivity :
                     onUserChangeSpeed(progress)
                 }
             }
+
+            waterRingView.setRange(0f, 2f)
+            speedRingView.updateProgress(0)
+            waterRingView.onRingViewListener = object : RingControlView.OnRingViewListener {
+                override fun onProgressChange(progress: Int) {
+                    viewModel.stepUiData.doingModify = true
+                    onUserWaterGear(progress)
+                }
+            }
+
         }
         binding.ivTurboView.setOnTouchListener { view, motionEvent ->
             when (motionEvent.action) {
@@ -276,6 +291,8 @@ abstract class CookStepBaseActivity :
     }
 
     fun changeTempSettingPanel() {
+        binding.controller.waterRingView.visibility = View.GONE
+        binding.controller.waterSprayShow.visibility = View.GONE
         binding.llWeightView.visibility = View.GONE
         binding.controller.root.visibility = View.VISIBLE
         binding.controller.tempRingView.visibility = View.VISIBLE
@@ -291,6 +308,8 @@ abstract class CookStepBaseActivity :
     }
 
     fun changeTimeSettingPanel() {
+        binding.controller.waterRingView.visibility = View.GONE
+        binding.controller.waterSprayShow.visibility = View.GONE
         binding.llWeightView.visibility = View.GONE
         binding.controller.root.visibility = View.VISIBLE
         binding.controller.tempRingView.visibility = View.INVISIBLE
@@ -306,6 +325,8 @@ abstract class CookStepBaseActivity :
     }
 
     fun changeSpeedSettingStep() {
+        binding.controller.waterRingView.visibility = View.GONE
+        binding.controller.waterSprayShow.visibility = View.GONE
         binding.llWeightView.visibility = View.GONE
         binding.controller.root.visibility = View.VISIBLE
         binding.controller.tempRingView.visibility = View.INVISIBLE
@@ -314,13 +335,35 @@ abstract class CookStepBaseActivity :
         binding.controller.tvSpeedText.visibility = View.VISIBLE
         binding.controller.clSetTime.visibility = View.GONE
         binding.controller.flDirection.visibility = View.GONE
+
         if (viewModel.displayStep()?.isTurboMode() != true) {
             binding.ivTurboView.visibility = View.GONE
         }
         setPanelViewProperty(CookSettingType.SPEED_SETTING)
     }
 
+    fun changeWaterGearSettingStep() {
+        binding.llWeightView.visibility = View.GONE
+        binding.controller.root.visibility = View.VISIBLE
+        binding.controller.tempRingView.visibility = View.INVISIBLE
+        binding.controller.tvRingTempText.visibility = View.GONE
+        binding.controller.speedRingView.visibility = View.GONE
+        binding.controller.tvSpeedText.visibility = View.GONE
+        binding.controller.clSetTime.visibility = View.GONE
+        binding.controller.flDirection.visibility = View.GONE
+
+        binding.controller.waterRingView.visibility = View.VISIBLE
+        binding.controller.waterSprayShow.visibility = View.VISIBLE
+
+        if (viewModel.displayStep()?.isTurboMode() != true) {
+            binding.ivTurboView.visibility = View.GONE
+        }
+        setPanelViewProperty(CookSettingType.WATER_SPRY)
+    }
+
     fun changeDirectionSettingStep() {
+        binding.controller.waterRingView.visibility = View.GONE
+        binding.controller.waterSprayShow.visibility = View.GONE
         binding.llWeightView.visibility = View.GONE
         binding.controller.root.visibility = View.VISIBLE
         binding.controller.tempRingView.visibility = View.INVISIBLE
@@ -356,6 +399,7 @@ abstract class CookStepBaseActivity :
             viewIconDirection.isSelected = false
             tvCookingTempTarget.isSelected = false
             tvCookingTimeTarget.isSelected = false
+            clCookWater.upSelectedView(false)
             when (selectStep) {
                 CookSettingType.TEMP_SETTING -> {
                     tvCookingTempTarget.isSelected = true
@@ -383,6 +427,9 @@ abstract class CookStepBaseActivity :
                     viewBackgroundDirection.isSelected = true
                     viewIconDirection.isSelected = true
                 }
+                CookSettingType.WATER_SPRY -> {
+                clCookWater.upSelectedView(true)
+             }
                 else -> {}
             }
         }

+ 12 - 0
BusinessStep/src/main/java/com/develop/step/ui/cook_step/model/CookStepUiData.kt

@@ -28,6 +28,9 @@ class CookStepUiData {
     // 当前转速
     var currentSpeed = 0
 
+    var currentWaterGear = 0
+
+
     // 限制时间调整范围
     var limitMinTime = 0
     var limitMaxTime = 0
@@ -40,10 +43,16 @@ class CookStepUiData {
     var limitMinSpeed = 0
     var limitMaxSpeed = 0
 
+    // 限制转速调整范围
+    var limitMinWaterGear = 0
+    var limitMaxWaterGear = 0
+
     //是否可以修改参数
     var isTempChange = false
     var isTimeChange = false
     var isMotorGearChange = false
+    var isWaterGearChange = false
+
     var isMotorDirectionChange = false
 
     fun applyRecipeSetting(data: DevRecipeCookingStep) {
@@ -64,6 +73,9 @@ class CookStepUiData {
             isTempChange = it.isTempChange
             isTimeChange = it.isTimeChange
             isMotorGearChange = it.isMotorGearChange
+            isWaterGearChange = it.isWaterGearChange
+            limitMinWaterGear = it.minWaterGear
+            limitMaxWaterGear = it.maxWaterGear
             isMotorDirectionChange = it.isMotorDirectionChange
         }
         targetTime = getFixedValue(targetTime, limitMinTime, limitMaxTime)

+ 5 - 0
BusinessStep/src/main/java/com/develop/step/ui/recipes_detail/CookDetailActivity.kt

@@ -28,6 +28,8 @@ import com.develop.step.viewmodel.CookDetailViewModel
 import java.util.*
 import com.develop.step.R
 import com.develop.step.ui.recipes_detail.model.CookDetailInfo
+import com.kuyuntech.cofarcooking.device.sdk.constant.core.DevModes
+import com.kuyuntech.cofarcooking.device.sdk.util.core.CofarSDK
 import org.greenrobot.eventbus.EventBus
 
 @Route(path = Screens.Cook.COOK_DETAIL)
@@ -72,6 +74,9 @@ class CookDetailActivity : CommonBVMActivity<ActivityCookDetailBinding, CookDeta
         return ActivityCookDetailBinding.inflate(inflater)
     }
 
+
+
+
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         ARouter.getInstance().inject(this)

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

@@ -7,10 +7,18 @@
 
 
     <ImageView
+       android:scaleType="centerCrop"
         android:id="@+id/iv_banner"
         android:layout_width="match_parent"
         android:layout_height="match_parent" />
 
+    <View
+        android:background="@color/black"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:alpha="0.1"
+        />
+
     <RelativeLayout
         android:id="@+id/title_layout"
         android:layout_width="match_parent"
@@ -125,6 +133,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"
@@ -170,7 +204,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"
@@ -199,43 +233,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"

+ 264 - 223
BusinessStep/src/main/res/layout/item_cook_controller.xml

@@ -90,6 +90,33 @@
         app:layout_constraintVertical_bias="0.45"
         tools:visibility="gone"/>
 
+
+    <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>
+
+
     <com.develop.common.widget.TimePickerView
         android:id="@+id/cl_set_time"
         android:layout_width="match_parent"
@@ -150,245 +177,259 @@
 
     </FrameLayout>
 
-    <androidx.constraintlayout.widget.ConstraintLayout
-        android:id="@+id/cl_cook_temp"
-        android:layout_width="@dimen/convert_280px"
-        android:layout_height="@dimen/convert_140px"
-        android:layout_marginBottom="@dimen/convert_190px"
-        app:layout_constraintBottom_toBottomOf="parent"
+    <com.develop.common.ui.AdaptLinearLayout
+        android:id="@+id/card_wrapper"
         app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintEnd_toStartOf="@+id/cl_cook_time">
-
-        <View
-            android:id="@+id/view_background_temp"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:background="@drawable/bg_cook_item_selected" />
-
-        <TextView
-            android:id="@+id/tv_temp_value"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginEnd="@dimen/convert_21px"
-            android:layout_marginBottom="@dimen/convert_8px"
-            android:includeFontPadding="false"
-            android:text="80°C"
-            android:textColor="@color/cook_panel_text"
-            android:textSize="@dimen/convert_40px"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintEnd_toEndOf="parent" />
-
-        <ImageView
-            android:id="@+id/view_icon_temp"
-            android:layout_width="@dimen/convert_42px"
-            android:layout_height="@dimen/convert_42px"
-            android:layout_marginStart="@dimen/convert_11px"
-            android:layout_marginTop="@dimen/convert_17px"
-            android:scaleType="fitCenter"
-            android:src="@drawable/ic_cook_temp"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toTopOf="parent"
-            app:tint="@color/cook_panel_text" />
-
-        <TextView
-            android:id="@+id/tv_title_temp"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="@dimen/convert_47px"
-            android:text="@string/temperature"
-            android:textColor="@color/cook_panel_text"
-            android:textSize="@dimen/convert_26px"
-            app:layout_constraintBottom_toBottomOf="@+id/view_icon_temp"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toTopOf="@+id/view_icon_temp" />
-
-        <TextView
-            android:id="@+id/tv_cooking_temp_target"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="@dimen/convert_25px"
-            android:layout_marginTop="@dimen/convert_16px"
-            android:layout_marginBottom="@dimen/convert_11px"
-            android:text="--80°C--"
-            android:textColor="@color/cook_panel_text"
-            android:textSize="@dimen/convert_24px"
-            android:visibility="visible"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintStart_toStartOf="parent" />
-
-    </androidx.constraintlayout.widget.ConstraintLayout>
-
-    <androidx.constraintlayout.widget.ConstraintLayout
-        android:id="@+id/cl_cook_time"
-        android:layout_width="@dimen/convert_280px"
-        android:layout_height="@dimen/convert_140px"
-        app:layout_constraintEnd_toStartOf="@+id/cl_cook_speed"
-        app:layout_constraintStart_toEndOf="@+id/cl_cook_temp"
-        app:layout_constraintTop_toTopOf="@+id/cl_cook_temp">
-
-        <View
-            android:id="@+id/view_background_time"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:background="@drawable/bg_cook_item_selected" />
-
-        <TextView
-            android:id="@+id/tv_set_time"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginEnd="@dimen/convert_21px"
-            android:layout_marginBottom="@dimen/convert_8px"
-            android:includeFontPadding="false"
-            android:text="00:60"
-            android:textColor="@color/cook_panel_text"
-            android:textSize="@dimen/convert_40px"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintEnd_toEndOf="parent" />
-
-        <ImageView
-            android:id="@+id/view_icon_time"
-            android:layout_width="@dimen/convert_42px"
-            android:layout_height="@dimen/convert_42px"
-            android:layout_marginStart="@dimen/convert_20px"
-            android:layout_marginTop="@dimen/convert_17px"
-            android:scaleType="fitCenter"
-            android:src="@drawable/ic_cook_time"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toTopOf="parent"
-            app:tint="@color/cook_panel_text" />
+        app:layout_constraintTop_toBottomOf="@id/temp_ring_view"
+        android:gravity="center"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        >
+        <androidx.constraintlayout.widget.ConstraintLayout
+            android:id="@+id/cl_cook_temp"
+            android:layout_width="@dimen/convert_280px"
+            android:layout_height="@dimen/convert_140px"
+            android:layout_marginEnd="@dimen/convert_24px">
+
+            <View
+                android:id="@+id/view_background_temp"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:background="@drawable/bg_cook_item_selected" />
 
-        <TextView
-            android:id="@+id/tv_title_time"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="@dimen/convert_70px"
-            android:text="@string/time"
-            android:textColor="@color/cook_panel_text"
-            android:textSize="@dimen/convert_26px"
-            app:layout_constraintBottom_toBottomOf="@+id/view_icon_time"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toTopOf="@+id/view_icon_time" />
+            <TextView
+                android:id="@+id/tv_temp_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginEnd="@dimen/convert_21px"
+                android:layout_marginBottom="@dimen/convert_8px"
+                android:includeFontPadding="false"
+                android:text="80°C"
+                android:textColor="@color/cook_panel_text"
+                android:textSize="@dimen/convert_40px"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintEnd_toEndOf="parent" />
+
+            <ImageView
+                android:id="@+id/view_icon_temp"
+                android:layout_width="@dimen/convert_42px"
+                android:layout_height="@dimen/convert_42px"
+                android:layout_marginStart="@dimen/convert_11px"
+                android:layout_marginTop="@dimen/convert_17px"
+                android:scaleType="fitCenter"
+                android:src="@drawable/ic_cook_temp"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toTopOf="parent"
+                app:tint="@color/cook_panel_text" />
 
-        <TextView
-            android:id="@+id/tv_cooking_time_target"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="@dimen/convert_25px"
-            android:layout_marginTop="@dimen/convert_16px"
-            android:layout_marginBottom="@dimen/convert_11px"
-            android:text="--05:00--"
-            android:textColor="@color/cook_panel_text"
-            android:textSize="@dimen/convert_24px"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintStart_toStartOf="parent" />
+            <TextView
+                android:id="@+id/tv_title_temp"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="@dimen/convert_47px"
+                android:text="@string/temperature"
+                android:textColor="@color/cook_panel_text"
+                android:textSize="@dimen/convert_26px"
+                app:layout_constraintBottom_toBottomOf="@+id/view_icon_temp"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toTopOf="@+id/view_icon_temp" />
 
-    </androidx.constraintlayout.widget.ConstraintLayout>
+            <TextView
+                android:id="@+id/tv_cooking_temp_target"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="@dimen/convert_25px"
+                android:layout_marginTop="@dimen/convert_16px"
+                android:layout_marginBottom="@dimen/convert_11px"
+                android:text="--80°C--"
+                android:textColor="@color/cook_panel_text"
+                android:textSize="@dimen/convert_24px"
+                android:visibility="visible"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintStart_toStartOf="parent" />
+
+        </androidx.constraintlayout.widget.ConstraintLayout>
+
+        <androidx.constraintlayout.widget.ConstraintLayout
+            android:id="@+id/cl_cook_time"
+            android:layout_width="@dimen/convert_280px"
+            android:layout_height="@dimen/convert_140px"
+            android:layout_marginEnd="@dimen/convert_24px">
+
+            <View
+                android:id="@+id/view_background_time"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:background="@drawable/bg_cook_item_selected" />
 
-    <androidx.constraintlayout.widget.ConstraintLayout
-        android:id="@+id/cl_cook_speed"
-        android:layout_width="@dimen/convert_280px"
-        android:layout_height="@dimen/convert_140px"
-        app:layout_constraintEnd_toStartOf="@+id/cl_cook_direction"
-        app:layout_constraintStart_toEndOf="@+id/cl_cook_time"
-        app:layout_constraintTop_toTopOf="@+id/cl_cook_temp">
+            <TextView
+                android:id="@+id/tv_set_time"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginEnd="@dimen/convert_21px"
+                android:layout_marginBottom="@dimen/convert_8px"
+                android:includeFontPadding="false"
+                android:text="00:60"
+                android:textColor="@color/cook_panel_text"
+                android:textSize="@dimen/convert_40px"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintEnd_toEndOf="parent" />
+
+            <ImageView
+                android:id="@+id/view_icon_time"
+                android:layout_width="@dimen/convert_42px"
+                android:layout_height="@dimen/convert_42px"
+                android:layout_marginStart="@dimen/convert_20px"
+                android:layout_marginTop="@dimen/convert_17px"
+                android:scaleType="fitCenter"
+                android:src="@drawable/ic_cook_time"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toTopOf="parent"
+                app:tint="@color/cook_panel_text" />
 
-        <View
-            android:id="@+id/view_background_speed"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:background="@drawable/bg_cook_item_selected" />
+            <TextView
+                android:id="@+id/tv_title_time"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="@dimen/convert_70px"
+                android:text="@string/time"
+                android:textColor="@color/cook_panel_text"
+                android:textSize="@dimen/convert_26px"
+                app:layout_constraintBottom_toBottomOf="@+id/view_icon_time"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toTopOf="@+id/view_icon_time" />
 
-        <TextView
-            android:id="@+id/tv_set_speed"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginEnd="@dimen/convert_21px"
-            android:layout_marginBottom="@dimen/convert_8px"
-            android:includeFontPadding="false"
-            android:text="2"
-            android:textColor="@color/cook_panel_text"
-            android:textSize="@dimen/convert_40px"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintEnd_toEndOf="parent" />
+            <TextView
+                android:id="@+id/tv_cooking_time_target"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="@dimen/convert_25px"
+                android:layout_marginTop="@dimen/convert_16px"
+                android:layout_marginBottom="@dimen/convert_11px"
+                android:text="--05:00--"
+                android:textColor="@color/cook_panel_text"
+                android:textSize="@dimen/convert_24px"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintStart_toStartOf="parent" />
+
+        </androidx.constraintlayout.widget.ConstraintLayout>
+
+        <androidx.constraintlayout.widget.ConstraintLayout
+            android:id="@+id/cl_cook_speed"
+            android:layout_width="@dimen/convert_280px"
+            android:layout_height="@dimen/convert_140px"
+            android:layout_marginEnd="@dimen/convert_24px">
+
+            <View
+                android:id="@+id/view_background_speed"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:background="@drawable/bg_cook_item_selected" />
 
-        <ImageView
-            android:id="@+id/view_icon_speed"
-            android:layout_width="@dimen/convert_46px"
-            android:layout_height="@dimen/convert_46px"
-            android:layout_marginStart="@dimen/convert_20px"
-            android:layout_marginTop="@dimen/convert_13px"
-            android:scaleType="fitCenter"
-            android:src="@drawable/ic_cook_quick"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toTopOf="parent"
-            app:tint="@color/cook_panel_text" />
+            <TextView
+                android:id="@+id/tv_set_speed"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginEnd="@dimen/convert_21px"
+                android:layout_marginBottom="@dimen/convert_8px"
+                android:includeFontPadding="false"
+                android:text="2"
+                android:textColor="@color/cook_panel_text"
+                android:textSize="@dimen/convert_40px"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintEnd_toEndOf="parent" />
+
+            <ImageView
+                android:id="@+id/view_icon_speed"
+                android:layout_width="@dimen/convert_46px"
+                android:layout_height="@dimen/convert_46px"
+                android:layout_marginStart="@dimen/convert_20px"
+                android:layout_marginTop="@dimen/convert_13px"
+                android:scaleType="fitCenter"
+                android:src="@drawable/ic_cook_quick"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toTopOf="parent"
+                app:tint="@color/cook_panel_text" />
 
-        <TextView
-            android:id="@+id/tv_title_speed"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="@dimen/convert_70px"
-            android:text="@string/speed"
-            android:textColor="@color/cook_panel_text"
-            android:textSize="@dimen/convert_26px"
-            app:layout_constraintBottom_toBottomOf="@+id/view_icon_speed"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toTopOf="@+id/view_icon_speed" />
+            <TextView
+                android:id="@+id/tv_title_speed"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="@dimen/convert_70px"
+                android:text="@string/speed"
+                android:textColor="@color/cook_panel_text"
+                android:textSize="@dimen/convert_26px"
+                app:layout_constraintBottom_toBottomOf="@+id/view_icon_speed"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toTopOf="@+id/view_icon_speed" />
+
+        </androidx.constraintlayout.widget.ConstraintLayout>
+
+        <androidx.constraintlayout.widget.ConstraintLayout
+            android:id="@+id/cl_cook_direction"
+            android:layout_width="@dimen/convert_280px"
+            android:layout_height="@dimen/convert_140px"
+            android:layout_marginEnd="@dimen/convert_24px">
+
+            <View
+                android:id="@+id/view_background_direction"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:background="@drawable/bg_cook_item_selected" />
 
-    </androidx.constraintlayout.widget.ConstraintLayout>
+            <TextView
+                android:id="@+id/tv_set_direction"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:includeFontPadding="false"
+                android:text="@string/turn_right"
+                android:textColor="@color/cook_panel_text"
+                android:textSize="@dimen/convert_30px"
+                android:layout_marginEnd="@dimen/convert_24px"
+                android:layout_marginBottom="@dimen/convert_8px"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintBottom_toBottomOf="parent"/>
+
+            <ImageView
+                android:id="@+id/view_icon_direction"
+                android:layout_width="@dimen/convert_42px"
+                android:layout_height="@dimen/convert_42px"
+                android:layout_marginStart="@dimen/convert_22px"
+                android:layout_marginTop="@dimen/convert_17px"
+                android:scaleType="fitCenter"
+                android:src="@drawable/ic_cook_rotate"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toTopOf="parent"
+                app:tint="@color/cook_panel_text" />
 
-    <androidx.constraintlayout.widget.ConstraintLayout
-        android:id="@+id/cl_cook_direction"
-        android:layout_width="@dimen/convert_280px"
-        android:layout_height="@dimen/convert_140px"
-        app:layout_constraintStart_toEndOf="@+id/cl_cook_speed"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintTop_toTopOf="@+id/cl_cook_temp">
+            <TextView
+                android:id="@+id/tv_title_direction"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="@dimen/convert_70px"
+                android:text="@string/direction"
+                android:textColor="@color/cook_panel_text"
+                android:textSize="@dimen/convert_26px"
+                app:layout_constraintBottom_toBottomOf="@+id/view_icon_direction"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toTopOf="@+id/view_icon_direction" />
+
+        </androidx.constraintlayout.widget.ConstraintLayout>
+
+        <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"
+            />
 
-        <View
-            android:id="@+id/view_background_direction"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:background="@drawable/bg_cook_item_selected" />
+    </com.develop.common.ui.AdaptLinearLayout>
 
-        <TextView
-            android:id="@+id/tv_set_direction"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:includeFontPadding="false"
-            android:text="@string/turn_right"
-            android:textColor="@color/cook_panel_text"
-            android:textSize="@dimen/convert_30px"
-            android:layout_marginEnd="@dimen/convert_24px"
-            android:layout_marginBottom="@dimen/convert_8px"
-            app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintBottom_toBottomOf="parent"/>
 
-        <ImageView
-            android:id="@+id/view_icon_direction"
-            android:layout_width="@dimen/convert_42px"
-            android:layout_height="@dimen/convert_42px"
-            android:layout_marginStart="@dimen/convert_22px"
-            android:layout_marginTop="@dimen/convert_17px"
-            android:scaleType="fitCenter"
-            android:src="@drawable/ic_cook_rotate"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toTopOf="parent"
-            app:tint="@color/cook_panel_text" />
 
-        <TextView
-            android:id="@+id/tv_title_direction"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="@dimen/convert_70px"
-            android:text="@string/direction"
-            android:textColor="@color/cook_panel_text"
-            android:textSize="@dimen/convert_26px"
-            app:layout_constraintBottom_toBottomOf="@+id/view_icon_direction"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toTopOf="@+id/view_icon_direction" />
 
-    </androidx.constraintlayout.widget.ConstraintLayout>
 
     <TextView
         android:id="@+id/btn_start"

+ 4 - 3
app/build.gradle

@@ -7,10 +7,11 @@ plugins {
 
 
 ext{
-    versionCode=230407200
-    brandCode="000A"
+
+    versionCode=230505180
+    brandCode="010A"
     brandVersionCode=versionCode
-    model="1037"
+    model="5037"
 }
 
 

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


+ 1 - 0
settings.gradle

@@ -7,3 +7,4 @@ include ':BusinessAuth'
 include ':BusinessSetting'
 include ':BusinessMain'
 include ':BusinessStep'
+include ':BusinessAirFryer'