zhangshenjie 1 месяц назад
Родитель
Сommit
e3091a6367
39 измененных файлов с 149 добавлено и 37 удалено
  1. 1 0
      BusinessAuth/src/main/res/layout/activity_member_auth.xml
  2. 1 0
      BusinessAuth/src/main/res/layout/fragment_member_forgot.xml
  3. 1 0
      BusinessAuth/src/main/res/layout/fragment_member_launch.xml
  4. 3 1
      BusinessAuth/src/main/res/layout/fragment_member_login.xml
  5. 3 1
      BusinessAuth/src/main/res/layout/fragment_member_profile.xml
  6. 3 1
      BusinessAuth/src/main/res/layout/fragment_member_register.xml
  7. 0 2
      BusinessCommon/src/main/res/layout/cook_card_view.xml
  8. 3 1
      BusinessCommon/src/main/res/layout/dialog_recipe_delete_confirm.xml
  9. 3 1
      BusinessCommon/src/main/res/layout/dialog_recipe_update.xml
  10. 3 1
      BusinessCommon/src/main/res/layout/dialog_share_qr_code.xml
  11. 4 1
      BusinessCommon/src/main/res/layout/dialog_tuya_loading.xml
  12. 3 1
      BusinessMain/src/main/res/layout/activity_home.xml
  13. 1 0
      BusinessMain/src/main/res/layout/activity_mode_entrance.xml
  14. 44 0
      BusinessSetting/src/main/java/com/develop/setting/ui/AboutActivity.kt
  15. 3 1
      BusinessSetting/src/main/res/layout/activity_about.xml
  16. 3 1
      BusinessSetting/src/main/res/layout/activity_birghtness.xml
  17. 1 0
      BusinessSetting/src/main/res/layout/activity_help_docs.xml
  18. 3 1
      BusinessSetting/src/main/res/layout/activity_language.xml
  19. 3 1
      BusinessSetting/src/main/res/layout/activity_privace_policy.xml
  20. 3 1
      BusinessSetting/src/main/res/layout/activity_restore.xml
  21. 3 1
      BusinessSetting/src/main/res/layout/activity_screensaver.xml
  22. 3 1
      BusinessSetting/src/main/res/layout/activity_setting_main.xml
  23. 3 1
      BusinessSetting/src/main/res/layout/activity_sound.xml
  24. 3 1
      BusinessSetting/src/main/res/layout/activity_tuya.xml
  25. 1 0
      BusinessSetting/src/main/res/layout/activity_wifi_list.xml
  26. 3 1
      BusinessStep/src/main/res/layout/activity_cook_detail.xml
  27. 3 1
      BusinessStep/src/main/res/layout/activity_cook_evaluate.xml
  28. 3 1
      BusinessStep/src/main/res/layout/activity_cook_source.xml
  29. 1 0
      BusinessStep/src/main/res/layout/activity_cook_step_base.xml
  30. 1 0
      BusinessStep/src/main/res/layout/activity_food_list.xml
  31. 3 1
      BusinessStep/src/main/res/layout/activity_mode_detail.xml
  32. 3 1
      BusinessStep/src/main/res/layout/fragment_detail_cook_chef_tips.xml
  33. 1 1
      BusinessStep/src/main/res/layout/fragment_detail_cook_desc.xml
  34. 3 1
      BusinessStep/src/main/res/layout/fragment_detail_cook_method.xml
  35. 3 1
      BusinessStep/src/main/res/layout/fragment_detail_cook_serving.xml
  36. 1 0
      BusinessStep/src/main/res/layout/fragment_detail_cook_source.xml
  37. 20 9
      app/build.gradle
  38. 1 1
      libBase/src/main/java/com/develop/base/ext/GlobaExt.kt
  39. 1 0
      libBase/src/main/java/com/develop/base/mvvm/BaseBindingActivity.kt

+ 1 - 0
BusinessAuth/src/main/res/layout/activity_member_auth.xml

@@ -5,6 +5,7 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="@color/white"
+    android:layoutDirection="ltr"
     xmlns:app="http://schemas.android.com/apk/res-auto">
 
     <ImageView

+ 1 - 0
BusinessAuth/src/main/res/layout/fragment_member_forgot.xml

@@ -3,6 +3,7 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="#fff"
+    android:layoutDirection="ltr"
     xmlns:app="http://schemas.android.com/apk/res-auto">
 
     <LinearLayout

+ 1 - 0
BusinessAuth/src/main/res/layout/fragment_member_launch.xml

@@ -4,6 +4,7 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="#fff"
+    android:layoutDirection="ltr"
     xmlns:app="http://schemas.android.com/apk/res-auto">
 
     <TextView

+ 3 - 1
BusinessAuth/src/main/res/layout/fragment_member_login.xml

@@ -4,7 +4,9 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:background="#fff">
+    android:background="#fff"
+    android:layoutDirection="ltr"
+    >
 
     <androidx.constraintlayout.widget.ConstraintLayout
         android:layout_width="match_parent"

+ 3 - 1
BusinessAuth/src/main/res/layout/fragment_member_profile.xml

@@ -4,7 +4,9 @@
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:overScrollMode="never"
-    android:scrollbars="none">
+    android:scrollbars="none"
+    android:layoutDirection="ltr"
+    >
 
     <androidx.constraintlayout.widget.ConstraintLayout
         android:layout_width="match_parent"

+ 3 - 1
BusinessAuth/src/main/res/layout/fragment_member_register.xml

@@ -2,7 +2,9 @@
 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="#fff">
+    android:background="#fff"
+    android:layoutDirection="ltr"
+    >
 
     <LinearLayout
         android:layout_width="match_parent"

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

@@ -20,8 +20,6 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:maxWidth="@dimen/convert_240px"
-        android:layout_marginLeft="@dimen/convert_20px"
-        android:layout_marginRight="@dimen/convert_20px"
         android:layout_marginStart="@dimen/convert_20px"
         android:layout_marginEnd="@dimen/convert_20px"
         android:layout_marginBottom="@dimen/convert_8px"

+ 3 - 1
BusinessCommon/src/main/res/layout/dialog_recipe_delete_confirm.xml

@@ -4,7 +4,9 @@
     android:layout_height="match_parent"
     xmlns:tools="http://schemas.android.com/tools"
     xmlns:app="http://schemas.android.com/apk/res-auto"
-    tools:background="#000">
+    tools:background="#000"
+    android:layoutDirection="ltr"
+    >
 
     <androidx.constraintlayout.widget.ConstraintLayout
         android:layout_width="@dimen/convert_450px"

+ 3 - 1
BusinessCommon/src/main/res/layout/dialog_recipe_update.xml

@@ -4,7 +4,9 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    tools:background="#000">
+    tools:background="#000"
+    android:layoutDirection="ltr"
+    >
 
     <RelativeLayout
         android:layout_width="@dimen/convert_500px"

+ 3 - 1
BusinessCommon/src/main/res/layout/dialog_share_qr_code.xml

@@ -3,7 +3,9 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     xmlns:tools="http://schemas.android.com/tools"
-    tools:background="#444">
+    tools:background="#444"
+    android:layoutDirection="ltr"
+    >
 
     <RelativeLayout
         android:layout_width="wrap_content"

+ 4 - 1
BusinessCommon/src/main/res/layout/dialog_tuya_loading.xml

@@ -4,7 +4,10 @@
     android:layout_height="match_parent"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     xmlns:tools="http://schemas.android.com/tools"
-    tools:background="#444">
+    tools:background="#444"
+    android:layoutDirection="ltr"
+
+    >
 
     <FrameLayout
         android:id="@+id/tuya_loading_layout"

+ 3 - 1
BusinessMain/src/main/res/layout/activity_home.xml

@@ -3,7 +3,9 @@
     android:id="@+id/content_view"
     android:background="@color/bg_color"
     android:layout_width="match_parent"
-    android:layout_height="match_parent">
+    android:layout_height="match_parent"
+    android:layoutDirection="ltr"
+    >
 
     <RelativeLayout
         android:layout_width="match_parent"

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

@@ -4,6 +4,7 @@
     android:id="@+id/content_view"
     android:layout_height="match_parent"
     android:background="@color/bg_color"
+    android:layoutDirection="ltr"
     >
 
     <FrameLayout

+ 44 - 0
BusinessSetting/src/main/java/com/develop/setting/ui/AboutActivity.kt

@@ -33,13 +33,17 @@ import com.develop.base.ext.setGone
 import com.develop.base.ext.setVisible
 import com.develop.base.ext.updateText
 import com.develop.base.util.GlobalToast
+import com.develop.base.util.MMkvUtils
 import com.develop.base.widgets.CommonPopupWindow
 import com.develop.common.data_repo.FoodDataProvider
+import com.develop.common.data_repo.db.DataFactory
 import com.develop.common.dialog.CancelConfirmDialog
 import com.develop.common.dialog.CommonDialog
 import com.develop.common.dialog.RecipeUpdateDialog
 import com.develop.common.food_sdk.GlobalDevEvent
 import com.develop.common.router.Screens
+import com.develop.common.tag.CURRENT_LANGUAGE
+import com.develop.common.tag.LANGUAGE_SETTING
 import com.develop.common.ui.CommonBVMActivity
 import com.develop.common.utils.AppVersionUtil
 import com.develop.common.utils.StringUtils
@@ -393,8 +397,12 @@ class AboutActivity : CommonBVMActivity<ActivityAboutBinding, AboutViewModel>()
         }
 
 
+
         binding.ivLogo.setOnClickListener {
 
+
+
+
             weightAlignCount++
             if (weightAlignCount >= 7) {
                 weightAlignCount = 0
@@ -505,6 +513,8 @@ class AboutActivity : CommonBVMActivity<ActivityAboutBinding, AboutViewModel>()
 
 
         binding.devSn.setOnClickListener {
+//            addListLocale()
+
             testCount++
             if (testCount >= 7) {
                 testCount = 0
@@ -558,6 +568,40 @@ class AboutActivity : CommonBVMActivity<ActivityAboutBinding, AboutViewModel>()
 
     }
 
+    fun addListLocale() {
+        //判断是否设置语言,如果重新设置需要重新写入系统语言,将选中放第一位
+            //设置语言
+            var list = DataFactory.createLanguageDataV2(resources)
+            var listStr = mutableListOf<String>()
+            listStr.add("en")
+            for (i in 1..list.size) {
+                if (list[i - 1].value.lowercase() != "en") {
+                    listStr.add(list[i - 1].value.lowercase())
+                }
+            }
+
+            //调试键盘问题,但没用
+            val condition: (String) -> Boolean = {
+                it == (MMkvUtils.getString(CURRENT_LANGUAGE)?.lowercase() ?: "en")
+            }
+            firstLocale(listStr, condition)
+            //获取配置语言,然后设置系统语言,首语言默认英语
+//            SerialportUtils.getAddLocale(listStr)
+        listStr.forEach {
+            Log.e("TAG asd", "asd:$it");
+        }
+
+    }
+
+    fun firstLocale(list: MutableList<String>, condition: (String) -> Boolean) {
+        val index = list.indexOfFirst(condition)
+        if (index >= 0) {
+            val element = list.removeAt(index)
+            list.add(0, element)
+        }
+    }
+
+
 
     fun installPackage(context: Context, apk: File) {
         try {

+ 3 - 1
BusinessSetting/src/main/res/layout/activity_about.xml

@@ -5,7 +5,9 @@
     android:layout_width="match_parent"
     android:id="@+id/about_layout"
     android:background="@color/bg_color"
-    android:layout_height="match_parent">
+    android:layout_height="match_parent"
+    android:layoutDirection="ltr"
+    >
 
     <ImageView
         android:id="@+id/iv_close"

+ 3 - 1
BusinessSetting/src/main/res/layout/activity_birghtness.xml

@@ -4,7 +4,9 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:background="@color/bg_color"
-    android:layout_height="match_parent">
+    android:layout_height="match_parent"
+    android:layoutDirection="ltr"
+    >
 
 
     <ImageView

+ 1 - 0
BusinessSetting/src/main/res/layout/activity_help_docs.xml

@@ -5,6 +5,7 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="@color/bg_color"
+    android:layoutDirection="ltr"
     tools:context=".ui.HelpDocsActivity">
 
     <ImageView

+ 3 - 1
BusinessSetting/src/main/res/layout/activity_language.xml

@@ -4,7 +4,9 @@
     android:id="@+id/language_layout"
     android:layout_width="match_parent"
     android:background="@color/bg_color"
-    android:layout_height="match_parent">
+    android:layout_height="match_parent"
+    android:layoutDirection="ltr"
+    >
 
     <ImageView
         android:visibility="invisible"

+ 3 - 1
BusinessSetting/src/main/res/layout/activity_privace_policy.xml

@@ -4,7 +4,9 @@
     android:id="@+id/prilvace_layout"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@color/bg_color">
+    android:background="@color/bg_color"
+    android:layoutDirection="ltr"
+    >
 
     <ImageView
         android:id="@+id/iv_banner"

+ 3 - 1
BusinessSetting/src/main/res/layout/activity_restore.xml

@@ -4,7 +4,9 @@
     android:id="@+id/restore_layout"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@color/bg_color">
+    android:background="@color/bg_color"
+    android:layoutDirection="ltr"
+    >
 
 
     <ImageView

+ 3 - 1
BusinessSetting/src/main/res/layout/activity_screensaver.xml

@@ -2,7 +2,9 @@
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
-    android:layout_height="match_parent">
+    android:layout_height="match_parent"
+    android:layoutDirection="ltr"
+    >
 
 
     <com.youth.banner.Banner

+ 3 - 1
BusinessSetting/src/main/res/layout/activity_setting_main.xml

@@ -3,7 +3,9 @@
     android:id="@+id/setting_layout"
     android:layout_width="match_parent"
     android:background="@color/bg_color"
-    android:layout_height="match_parent">
+    android:layout_height="match_parent"
+    android:layoutDirection="ltr"
+    >
 
     <ImageView
         android:id="@+id/iv_close"

+ 3 - 1
BusinessSetting/src/main/res/layout/activity_sound.xml

@@ -3,7 +3,9 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:background="@color/bg_color"
-    android:layout_height="match_parent">
+    android:layout_height="match_parent"
+    android:layoutDirection="ltr"
+    >
 
     <ImageView
         android:id="@+id/iv_close"

+ 3 - 1
BusinessSetting/src/main/res/layout/activity_tuya.xml

@@ -3,7 +3,9 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:background="@color/bg_color"
-    android:layout_height="match_parent">
+    android:layout_height="match_parent"
+    android:layoutDirection="ltr"
+    >
 
     <ImageView
         android:id="@+id/iv_tuya_close"

+ 1 - 0
BusinessSetting/src/main/res/layout/activity_wifi_list.xml

@@ -5,6 +5,7 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:id="@+id/wifi_layout"
+    android:layoutDirection="ltr"
     >
 
 

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

@@ -5,7 +5,9 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:id="@+id/cook_layout"
-    android:background="@color/bg_color">
+    android:background="@color/bg_color"
+    android:layoutDirection="ltr"
+    >
 
     <ImageView
         android:id="@+id/iv_top_banner"

+ 3 - 1
BusinessStep/src/main/res/layout/activity_cook_evaluate.xml

@@ -5,7 +5,9 @@
     android:layout_height="match_parent"
     android:background="@color/bg_color"
     xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools">
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layoutDirection="ltr"
+    >
 
     <TextView
         android:id="@+id/tv_title"

+ 3 - 1
BusinessStep/src/main/res/layout/activity_cook_source.xml

@@ -3,7 +3,9 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:id="@+id/source_layout"
-    android:background="@color/bg_color">
+    android:background="@color/bg_color"
+    android:layoutDirection="ltr"
+    >
 
     <ImageView
         android:id="@+id/iv_close"

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

@@ -6,6 +6,7 @@
     android:layout_height="match_parent"
     android:background="@color/bg_color"
     android:id="@+id/cook_step_layout"
+    android:layoutDirection="ltr"
     >
 
     <androidx.constraintlayout.widget.ConstraintLayout

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

@@ -4,6 +4,7 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:id="@+id/food_layout"
+    android:layoutDirection="ltr"
     >
 
     <ImageView

+ 3 - 1
BusinessStep/src/main/res/layout/activity_mode_detail.xml

@@ -3,7 +3,9 @@
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@color/bg_color">
+    android:background="@color/bg_color"
+    android:layoutDirection="ltr"
+    >
 
 
     <ImageView

+ 3 - 1
BusinessStep/src/main/res/layout/fragment_detail_cook_chef_tips.xml

@@ -5,7 +5,9 @@
     android:layout_height="match_parent"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:paddingHorizontal="@dimen/convert_50px"
-    android:paddingTop="@dimen/convert_40px">
+    android:paddingTop="@dimen/convert_40px"
+    android:layoutDirection="ltr"
+    >
 
     <TextView
         android:id="@+id/tv_step_detail"

+ 1 - 1
BusinessStep/src/main/res/layout/fragment_detail_cook_desc.xml

@@ -10,7 +10,7 @@
     android:scrollbars="vertical"
     android:scrollbarSize="@dimen/convert_8px"
     android:scrollbarThumbVertical="@color/color_CCAAAAAA"
-
+    android:layoutDirection="ltr"
     >
 
     <TextView

+ 3 - 1
BusinessStep/src/main/res/layout/fragment_detail_cook_method.xml

@@ -4,7 +4,9 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:clipToPadding="false"
-    android:clipChildren="false">
+    android:clipChildren="false"
+    android:layoutDirection="ltr"
+    >
 
     <androidx.recyclerview.widget.RecyclerView
         android:id="@+id/rv_tools"

+ 3 - 1
BusinessStep/src/main/res/layout/fragment_detail_cook_serving.xml

@@ -4,7 +4,9 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:paddingHorizontal="@dimen/convert_47px">
+    android:paddingHorizontal="@dimen/convert_47px"
+    android:layoutDirection="ltr"
+    >
 
     <TextView
         android:id="@+id/tv_step_title"

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

@@ -4,6 +4,7 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layoutDirection="ltr"
    >
 
     <ScrollView

+ 20 - 9
app/build.gradle

@@ -20,7 +20,7 @@ ext {
     versionCode = Integer.parseInt(new SimpleDateFormat("yyMMddHH").format(new Date()) + 1)
 //    versionCode=230617180
 //    brandCode="000B"
-    brandCode = "011D"
+    brandCode = "085B"
 //    model = "5037"
     model = "1039"
 
@@ -1127,14 +1127,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()}\"" )
 //
 
 
@@ -1216,6 +1216,17 @@ android {
 ////            buildConfigField("String", "appCode", "\"2.01\"")
 //            buildConfigField("String", "time", "\"${getCurrentTime()}\"")
 
+            manifestPlaceholders = [channelName: "brand085BTuya"]
+            buildConfigField("String", "UpdatePlatform", "\"normal\"")
+            resValue("string", "app_theme", "@style/SplashThemeNotLogo")
+            buildConfigField("String", "model", "\"1039\"")
+            buildConfigField("String", "brandCode", "\"085B\"")
+            //appCode 1.01 指向bug修复,2.01指向功能变更
+            buildConfigField("String", "appCode", "\"1.01\"")
+//            buildConfigField("String", "appCode", "\"2.01\"")
+            buildConfigField("String", "time", "\"${getCurrentTime()}\"")
+
+
 
 
         }

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

@@ -276,7 +276,7 @@ fun getSN(): String {
 //        return "062A20030020123010190004"
 //        return  "063A10390020123010190015"
 //        return  "063B10390020123010190002"
-        return  "063B10390020123010190001"
+        return  "085B10390020123010190001"
 //        return  "063B20030020123010190015"
 //        return "063B21050020123010190001"
 //        return "058A10390020123010190001"

+ 1 - 0
libBase/src/main/java/com/develop/base/mvvm/BaseBindingActivity.kt

@@ -43,6 +43,7 @@ abstract class BaseBindingActivity<T : ViewBinding> : AppCompatActivity() {
 
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
+        // 强制设置方向为 LTR
         //去掉title/actionBar/支持显示到刘海区域
         requestWindowFeature(Window.FEATURE_NO_TITLE)
         window.setFlags(