瀏覽代碼

处理涂鸦连接,温度调整

zhangshenjie 1 周之前
父節點
當前提交
5dfe3a749c

+ 2 - 0
BusinessCommon/src/main/java/com/develop/common/utils/TuyaUtils.java

@@ -154,6 +154,8 @@ public class TuyaUtils {
                         EventBus.getDefault().post(a);
 
                         if (event != null) {
+
+
                             output("收到 dp: " + event);
 
                             if(event.dpid == TuyaDps.RECIPE_NUM){

+ 7 - 0
BusinessCommon/src/main/java/com/develop/common/widget/HomeFunctionTopBar.kt

@@ -151,6 +151,13 @@ class HomeFunctionTopBar : RelativeLayout, View.OnClickListener {
         binding.tvTitle.updateText(title)
     }
 
+    fun setTuyaType(type: Int) {
+        if (type == binding.ivTuya.visibility){
+            return
+        }
+        binding.ivTuya.visibility = type
+    }
+
     fun setUserName(userName: String) {
         binding.tvState.text = userName
     }

二進制
BusinessCommon/src/main/res/drawable-xxxhdpi/connect_tuya.webp


+ 10 - 2
BusinessCommon/src/main/res/layout/home_function_top_bar_view.xml

@@ -45,7 +45,7 @@
         android:layout_height="wrap_content"
         android:layout_centerVertical="true"
         android:layout_marginEnd="@dimen/convert_58px"
-        android:layout_toStartOf="@+id/iv_wifi"
+        android:layout_toStartOf="@+id/iv_tuya"
         android:orientation="horizontal">
 
         <ImageView
@@ -64,7 +64,15 @@
             android:textColor="@color/login_state"
             android:textSize="@dimen/convert_30px" />
     </LinearLayout>
-
+    <ImageView
+        android:id="@+id/iv_tuya"
+        android:visibility="invisible"
+        android:layout_width="@dimen/convert_60px"
+        android:layout_height="@dimen/convert_60px"
+        android:layout_centerVertical="true"
+        android:src="@drawable/connect_tuya"
+        android:layout_marginEnd="@dimen/convert_26px"
+        android:layout_toStartOf="@id/iv_wifi" />
     <ImageView
         android:id="@+id/iv_wifi"
         android:layout_width="@dimen/convert_60px"

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

@@ -13,6 +13,7 @@ import com.alibaba.android.arouter.facade.annotation.Route
 import com.develop.base.ext.appGlobalScope
 import com.develop.base.ext.background_drawable
 import com.develop.base.ext.getGoneLogin
+import com.develop.base.ext.getGoneTuYa
 import com.develop.base.ext.getSN
 import com.develop.base.ext.isBrand062
 import com.develop.base.ext.isFrLanguage
@@ -32,6 +33,7 @@ import com.develop.common.dialog.CancelConfirmDialog
 import com.develop.common.router.Screens
 import com.develop.common.tag.*
 import com.develop.common.ui.CommonBVMActivity
+import com.develop.common.utils.TuyaUtils
 import com.develop.common.widget.HomeFunctionTopBar
 import com.develop.common.widget.HomeOrBack
 import com.develop.common.widget.NewsLayout
@@ -453,6 +455,14 @@ class HomeActivity : CommonBVMActivity<ActivityHomeBinding, HomeViewModel>() {
         //处理扭橙逻辑 一进来是扭橙盖,重新打开,重新闭合 没办法跳转到扭橙页面
         isResetZero = event.devInfo.resetZero.toInt()
 
+
+        //由于处理涂鸦连接功能,不想处理回调方法,故在这连续回调状态,实时获取涂鸦值
+        if (!TuyaUtils.init&&!getGoneTuYa()){
+            binding.functionTopBar.setTuyaType(View.INVISIBLE)
+        }else{
+            binding.functionTopBar.setTuyaType(View.VISIBLE)
+        }
+
     }
 
 

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

@@ -407,7 +407,7 @@ class CookDetailActivity : CommonBVMActivity<ActivityCookDetailBinding, CookDeta
             com.develop.common.R.drawable.ic_more_share,
             com.develop.common.R.dimen.convert_60px
         )
-        if (isFrLanguage()) {
+        if (isFrLanguage()&&!sn.startsWith("000")) {
             binding.tvMoreScore.textSize = dp5
             binding.tvMoreDelete.textSize = dp5
             binding.tvMoreShare.textSize = dp5

+ 0 - 1
BusinessStep/src/main/res/layout/activity_cook_detail.xml

@@ -421,7 +421,6 @@
                 android:drawableStart="@drawable/ic_more_translate"
                 android:drawablePadding="@dimen/convert_13px"
                 android:gravity="center_vertical"
-                android:visibility="gone"
                 android:text="@string/translation"
                 android:textColor="@color/detail_function_title"
                 android:textSize="@dimen/convert_26px" />

+ 18 - 18
app/build.gradle

@@ -19,8 +19,8 @@ ext {
 
     versionCode = Integer.parseInt(new SimpleDateFormat("yyMMddHH").format(new Date()) + 1)
 //    versionCode=230617180
-//    brandCode="054A"
-    brandCode = "011F"
+//    brandCode="000B"
+    brandCode = "000A"
 //    model = "5037"
     model = "1039"
 
@@ -118,7 +118,7 @@ android {
             manifestPlaceholders = [channelName: "brand000B5037Tuya"]
             dimension "platform"
             applicationId "com.develop.foodcooking"
-            buildConfigField("String", "UpdatePlatform", "\"normal\"")
+            buildConfigField("String", "UpdatePlatform", "\"night\"")
             resValue("string", "app_theme", "@style/SplashTheme")
             buildConfigField("String", "model", "\"5037\"")
             buildConfigField("String", "brandCode", "\"000B\"")
@@ -841,13 +841,13 @@ android {
 //            //appCode 1.01 指向bug修复,2.01指向功能变更
 //            buildConfigField("String", "appCode", "\"1.01\"")
 
-            manifestPlaceholders = [channelName: "brand011FTuya"]
-            buildConfigField("String", "UpdatePlatform", "\"011\"")
-            resValue("string", "app_theme", "@style/Splash011DTheme")
-            buildConfigField("String", "model", "\"1039\"")
-            buildConfigField("String", "brandCode", "\"011F\"")
-            //appCode 1.01 指向bug修复,2.01指向功能变更
-            buildConfigField("String", "appCode", "\"1.01\"")
+//            manifestPlaceholders = [channelName: "brand011FTuya"]
+//            buildConfigField("String", "UpdatePlatform", "\"011\"")
+//            resValue("string", "app_theme", "@style/Splash011DTheme")
+//            buildConfigField("String", "model", "\"1039\"")
+//            buildConfigField("String", "brandCode", "\"011F\"")
+//            //appCode 1.01 指向bug修复,2.01指向功能变更
+//            buildConfigField("String", "appCode", "\"1.01\"")
 
 
 //            manifestPlaceholders = [channelName: "brand011DTuya"]
@@ -997,14 +997,14 @@ android {
 //            buildConfigField("String", "time","\"${getCurrentTime()}\"" )
 ////
 
-//            manifestPlaceholders = [channelName: "brand063BTuya"]
-//            buildConfigField("String", "UpdatePlatform", "\"normal\"")
-//            resValue("string", "app_theme", "@style/SplashThemeNotLogo")
-//            buildConfigField("String", "model", "\"1039\"")
-//            buildConfigField("String", "brandCode", "\"063B\"")
-//            //appCode 1.01 指向bug修复,2.01指向功能变更
-//            buildConfigField("String", "appCode", "\"1.01\"")
-//            buildConfigField("String", "time","\"${getCurrentTime()}\"" )
+            manifestPlaceholders = [channelName: "brand063BTuya"]
+            buildConfigField("String", "UpdatePlatform", "\"normal\"")
+            resValue("string", "app_theme", "@style/SplashThemeNotLogo")
+            buildConfigField("String", "model", "\"1039\"")
+            buildConfigField("String", "brandCode", "\"063B\"")
+            //appCode 1.01 指向bug修复,2.01指向功能变更
+            buildConfigField("String", "appCode", "\"1.01\"")
+            buildConfigField("String", "time","\"${getCurrentTime()}\"" )
 //
 //            manifestPlaceholders = [channelName: "brand053A"]
 //            buildConfigField("String", "UpdatePlatform", "\"night\"")

+ 3 - 2
libBase/src/main/java/com/develop/base/ext/GlobaExt.kt

@@ -226,7 +226,7 @@ fun getSN(): String {
 //        return "010F10390020123010190001"
 //        return "011D10390020123010190001"
 //        return "011A10390020123010190001"
-        return "011F10390020123010190001"
+//        return "011F10390020123010190001"
 //        return "011A10390020123010190009"
 //        return "000A50370020123010190004"
 //        return "011A50370020123010190003"
@@ -256,13 +256,14 @@ fun getSN(): String {
 //        return  "062A20030020123010190003"
 //        return "062A20030020123010190004"
 //        return  "063A10390020123010190015"
+        return  "063B10390020123010190002"
 //        return  "063B10390020123010190001"
 //        return  "063B20030020123010190015"
 //        return "063B21050020123010190001"
 //        return  "049B10390020123010190001"
 //        return "000A50370020123010190017"
 //        return  "053A10390020123010190088"
-//          return "053A10390020123010190001"
+//          return "053A103 90020123010190001"
 //        return  "000A10390020123010190023"
 //        return  "000A21050020123010190023"
 //        return "000A50670020123010190005"

二進制
libThirdPart/libs/cofar-cooking-device-sdk-0.0.1-SNAPSHOT.jar