Pārlūkot izejas kodu

1、支付方式页优化
2、界面优化

ccc 2 nedēļas atpakaļ
vecāks
revīzija
b54d903814
34 mainītis faili ar 429 papildinājumiem un 69 dzēšanām
  1. 1 1
      lib_base/src/main/res/values-ab/strings.xml
  2. 2 0
      lib_common/src/main/java/com/quyunshuo/sbm10/common/constant/MMKVName.kt
  3. 1 0
      module_backstage/src/main/java/com/module/backstage/fragment/LanguageFragment.kt
  4. 5 0
      module_backstage/src/main/res/layout/backstage_activity_setting.xml
  5. 6 0
      module_backstage/src/main/res/layout/backstage_fragment_price.xml
  6. 33 10
      module_backstage/src/main/res/layout/backstage_fragment_reset_pwd.xml
  7. 6 0
      module_backstage/src/main/res/layout/backstage_fragment_show_product.xml
  8. 3 0
      module_backstage/src/main/res/layout/backstage_item_button.xml
  9. 2 0
      module_backstage/src/main/res/layout/backstage_item_debug_alarm.xml
  10. 2 0
      module_backstage/src/main/res/layout/backstage_item_debug_param.xml
  11. 2 0
      module_backstage/src/main/res/layout/backstage_item_debug_product.xml
  12. 5 0
      module_backstage/src/main/res/layout/backstage_item_general_param.xml
  13. 7 0
      module_backstage/src/main/res/layout/backstage_item_input.xml
  14. 7 0
      module_backstage/src/main/res/layout/backstage_item_input_text.xml
  15. 7 4
      module_backstage/src/main/res/layout/backstage_item_price.xml
  16. 8 0
      module_backstage/src/main/res/layout/backstage_item_product.xml
  17. 4 0
      module_backstage/src/main/res/layout/backstage_item_slider.xml
  18. 8 1
      module_backstage/src/main/res/layout/backstage_item_spinner.xml
  19. 10 0
      module_backstage/src/main/res/layout/backstage_item_system_settings.xml
  20. 59 0
      module_home/src/main/java/com/quyunshuo/module/home/adapter/CartProductDialogAdapter.kt
  21. 4 5
      module_home/src/main/java/com/quyunshuo/module/home/adapter/PayChooseDialogAdapter.kt
  22. 1 1
      module_home/src/main/java/com/quyunshuo/module/home/dialog/LanguageSelectorDialog.kt
  23. 27 4
      module_home/src/main/java/com/quyunshuo/module/home/dialog/PayChooseDialogFragment.kt
  24. 15 0
      module_home/src/main/java/com/quyunshuo/module/home/fragment/fragment/BuyFragment.kt
  25. 6 4
      module_home/src/main/java/com/quyunshuo/module/home/fragment/fragment/HomeFragment.kt
  26. 5 0
      module_home/src/main/java/com/quyunshuo/module/home/service/GlobalService.kt
  27. 1 0
      module_home/src/main/res/layout/backstage_dialog_warring.xml
  28. 97 35
      module_home/src/main/res/layout/home_dialog_pay_choose.xml
  29. 2 0
      module_home/src/main/res/layout/home_fragment_buy.xml
  30. 7 1
      module_home/src/main/res/layout/home_fragment_home.xml
  31. 2 0
      module_home/src/main/res/layout/home_fragment_userlogin.xml
  32. 78 0
      module_home/src/main/res/layout/home_item_cart_product.xml
  33. 5 2
      module_home/src/main/res/layout/home_item_home_product.xml
  34. 1 1
      module_pay/src/main/java/com/module/pay/common/OtherEnum.kt

+ 1 - 1
lib_base/src/main/res/values-ab/strings.xml

@@ -45,7 +45,7 @@
     <string name="base_plc_alarm_7">擋片重設失敗</string>
     <string name="base_plc_alarm_8">玉米芯卡住</string>
 
-    <string name="base_pro_01">甜爆米花</string>
+    <string name="base_pro_01">甜爆米花</string>
     <string name="base_pro_02">鹹味爆米花</string>
     <string name="base_two_code">微信支付寶</string>
     <string name="base_bill_coin">紙幣硬幣</string>

+ 2 - 0
lib_common/src/main/java/com/quyunshuo/sbm10/common/constant/MMKVName.kt

@@ -23,6 +23,8 @@ abstract class MMKVName {
             get() = "MANAGER_ID"//后台管理id
         val LANGUAGE_TYPE: String
             get() = "LANGUAGE_TYPE"//语言类型
+        val LANGUAGE_TYPE_DEFAULT: String
+            get() = "LANGUAGE_TYPE_DEFAULT"//默认语言类型
         val ICT: String
             get() = "ICT"//支付通讯协议
         val CHANGE: String

+ 1 - 0
module_backstage/src/main/java/com/module/backstage/fragment/LanguageFragment.kt

@@ -41,6 +41,7 @@ class LanguageFragment : BaseFragment<BackstageFragmentLanguageBinding, Language
         flLanguage.setOnCheckedChangeListener(this@LanguageFragment)
         btnOk.setOnClickListener{
             SpUtils.putInt(MMKVName.LANGUAGE_TYPE, languageType)
+            SpUtils.putInt(MMKVName.LANGUAGE_TYPE_DEFAULT, languageType)
             set(languageValue)
             ToastUtil.switchToastStyleToSuccess(UiUtil.getStringRes(R.string.modific_success))
             ARouter.getInstance().build(RouteUrl.Main.MainActivity).navigation()

+ 5 - 0
module_backstage/src/main/res/layout/backstage_activity_setting.xml

@@ -42,6 +42,7 @@
                 android:layout_height="250dp"
                 android:layout_centerInParent="true"
                 android:layout_centerVertical="true"
+                android:autoSizeTextType="uniform"
                 android:gravity="center"
                 android:minWidth="267dp"
                 android:text="@string/backstage_system_set"
@@ -111,6 +112,8 @@
             android:layout_width="300dp"
             android:layout_height="120dp"
             android:layout_marginStart="20dp"
+            android:autoSizeMaxTextSize="50sp"
+            android:autoSizeTextType="uniform"
             android:layout_marginTop="50dp"
             android:background="@drawable/setting_rectangle_t_blue_background"
             android:gravity="center"
@@ -155,6 +158,8 @@
         <TextView
             android:id="@+id/btn_connection_server"
             android:layout_width="300dp"
+            android:autoSizeTextType="uniform"
+            android:autoSizeMaxTextSize="50sp"
             android:layout_height="120dp"
             android:layout_marginStart="100dp"
             android:layout_marginTop="50dp"

+ 6 - 0
module_backstage/src/main/res/layout/backstage_fragment_price.xml

@@ -34,7 +34,10 @@
             <TextView
                 android:id="@+id/backstage_textview7"
                 android:layout_width="wrap_content"
+                android:maxWidth="480dp"
                 android:layout_height="90dp"
+                android:autoSizeTextType="uniform"
+                android:autoSizeMaxTextSize="45sp"
                 android:layout_marginStart="30dp"
                 android:gravity="center"
                 android:textStyle="bold"
@@ -69,6 +72,9 @@
             android:layout_width="480dp"
             android:layout_height="120dp"
             android:minWidth="280dp"
+            android:autoSizeTextType="uniform"
+            android:padding="10dp"
+            android:autoSizeMaxTextSize="50sp"
             android:minHeight="80dp"
             android:background="@drawable/update_btn_background"
             android:text="@string/backstage_update_price"

+ 33 - 10
module_backstage/src/main/res/layout/backstage_fragment_reset_pwd.xml

@@ -31,10 +31,13 @@
 
         <TextView
             android:id="@+id/backstage_textview4"
-            android:layout_width="230dp"
-            android:minWidth="150dp"
+            android:layout_width="430dp"
             android:layout_height="wrap_content"
             android:layout_marginTop="107dp"
+            android:maxWidth="430dp"
+            android:maxHeight="80dp"
+            android:autoSizeTextType="uniform"
+            android:autoSizeMaxTextSize="52sp"
             android:text="@string/backstage_old_password"
             android:textSize="52sp"
             app:layout_constraintEnd_toStartOf="@id/backstage_edittext3"
@@ -44,13 +47,15 @@
         <EditText
             android:id="@+id/backstage_edittext3"
             android:layout_width="444dp"
-            android:layout_height="wrap_content"
-            android:minHeight="80dp"
+            android:layout_height="100dp"
             android:background="@drawable/backstage_shape_general_param_yellow_et"
             android:inputType="textPassword"
             android:hint="@string/backstage_old_password_input"
             android:paddingLeft="20dp"
             android:textColor="#576478"
+            android:autoSizeTextType="uniform"
+            android:padding="20dp"
+            android:autoSizeMaxTextSize="46sp"
             android:textSize="46sp"
             app:layout_constraintBaseline_toBaselineOf="@+id/backstage_textview4"
             app:layout_constraintEnd_toEndOf="parent"
@@ -58,9 +63,12 @@
 
         <TextView
             android:id="@+id/backstage_textview3"
-            android:layout_width="230dp"
-            android:minWidth="150dp"
+            android:layout_width="430dp"
             app:layout_constraintEnd_toStartOf="@id/backstage_edittext"
+            android:maxWidth="430dp"
+            android:maxHeight="80dp"
+            android:autoSizeTextType="uniform"
+            android:autoSizeMaxTextSize="52sp"
             android:layout_height="wrap_content"
             android:layout_marginTop="107dp"
             android:text="@string/backstage_new_password"
@@ -71,13 +79,16 @@
         <EditText
             android:id="@+id/backstage_edittext"
             android:layout_width="444dp"
-            android:layout_height="wrap_content"
+            android:layout_height="100dp"
             android:minHeight="80dp"
             android:background="@drawable/backstage_shape_general_param_yellow_et"
             android:hint="@string/backstage_new_password_input"
             android:inputType="textPassword"
             android:paddingLeft="20dp"
+            android:autoSizeTextType="uniform"
+            android:autoSizeMaxTextSize="46sp"
             app:layout_constraintStart_toEndOf="@id/backstage_textview3"
+            android:padding="20dp"
             android:textColor="#576478"
             android:textSize="46sp"
             app:layout_constraintBaseline_toBaselineOf="@+id/backstage_textview3"
@@ -85,12 +96,15 @@
 
         <TextView
             android:id="@+id/backstage_textview5"
-            android:layout_width="230dp"
+            android:layout_width="430dp"
             android:layout_height="wrap_content"
-            android:maxWidth="330dp"
             android:layout_marginStart="4dp"
             android:layout_marginTop="107dp"
             android:minWidth="150dp"
+            android:maxWidth="430dp"
+            android:maxHeight="80dp"
+            android:autoSizeTextType="uniform"
+            android:autoSizeMaxTextSize="52sp"
             app:layout_constraintEnd_toStartOf="@id/backstage_edittext2"
             android:text="@string/backstage_confirm_password"
             android:textSize="52sp"
@@ -100,12 +114,15 @@
         <EditText
             android:id="@+id/backstage_edittext2"
             android:layout_width="444dp"
-            android:layout_height="wrap_content"
+            android:layout_height="100dp"
             android:minHeight="80dp"
             android:background="@drawable/backstage_shape_general_param_yellow_et"
             android:inputType="textPassword"
             android:hint="@string/backstage_confirm_password_input"
             android:paddingLeft="20dp"
+            android:autoSizeTextType="uniform"
+            android:autoSizeMaxTextSize="46sp"
+            android:padding="20dp"
             android:textColor="#576478"
             android:textSize="46sp"
             app:layout_constraintStart_toEndOf="@id/backstage_textview5"
@@ -123,7 +140,10 @@
             android:minWidth="260dp"
             android:textColor="@color/white"
             android:textSize="42sp"
+            android:padding="10dp"
             android:text="@string/backstage_confirm_update"
+            android:autoSizeTextType="uniform"
+            android:autoSizeMaxTextSize="42sp"
             app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintEnd_toStartOf="@+id/home_return_to_upper_level"
             app:layout_constraintStart_toStartOf="parent"
@@ -136,12 +156,15 @@
             android:layout_width="260dp"
             android:layout_height="100dp"
             android:layout_marginTop="65dp"
+            android:padding="10dp"
             android:gravity="center"
             android:background="@drawable/backstage_shape_general_param_yellow_et"
             android:minWidth="260dp"
             android:textColor="@color/black"
             android:text="@string/rewrite"
             android:textStyle="bold"
+            android:autoSizeTextType="uniform"
+            android:autoSizeMaxTextSize="42sp"
             android:textSize="42sp"
             app:layout_constraintStart_toEndOf="@id/home_return_to_upper_level1"
             app:layout_constraintBottom_toBottomOf="parent"

+ 6 - 0
module_backstage/src/main/res/layout/backstage_fragment_show_product.xml

@@ -22,11 +22,14 @@
         android:layout_height="120dp"
         android:layout_marginBottom="860dp"
         android:minWidth="380dp"
+        android:autoSizeTextType="uniform"
+        android:autoSizeMaxTextSize="42sp"
         android:minHeight="100dp"
         android:background="@drawable/update_btn_background"
         android:text="@string/backstage_confirm_update"
         android:paddingHorizontal="10dp"
         android:textSize="42sp"
+        android:padding="20dp"
         android:textStyle="bold"
         android:textColor="@color/white"
         app:layout_constraintBottom_toBottomOf="parent"
@@ -39,6 +42,9 @@
         android:layout_width="380dp"
         android:layout_height="120dp"
         android:layout_marginBottom="860dp"
+        android:autoSizeTextType="uniform"
+        android:autoSizeMaxTextSize="42sp"
+        android:padding="20dp"
         android:minWidth="380dp"
         android:minHeight="100dp"
         android:background="@drawable/update_btn_background"

+ 3 - 0
module_backstage/src/main/res/layout/backstage_item_button.xml

@@ -23,6 +23,9 @@
         android:id="@+id/btn_update"
         android:layout_width="185dp"
         android:layout_height="100dp"
+        android:padding="10dp"
+        android:autoSizeTextType="uniform"
+        android:autoSizeMaxTextSize="48sp"
         android:background="@drawable/backstage_rectangle_blue_background"
         android:text="@string/backstage_operate"
         android:textColor="@color/white"

+ 2 - 0
module_backstage/src/main/res/layout/backstage_item_debug_alarm.xml

@@ -14,6 +14,8 @@
         android:minHeight="78dp"
         android:background="@drawable/backstage_selector_debug_param_cb_bg"
         android:button="@null"
+        android:autoSizeMaxTextSize="46sp"
+        android:autoSizeTextType="uniform"
         android:checked="false"
         android:padding="10dp"
         android:text="报警屏蔽按钮"

+ 2 - 0
module_backstage/src/main/res/layout/backstage_item_debug_param.xml

@@ -12,6 +12,8 @@
         android:maxHeight="180dp"
         android:layout_height="180dp"
         android:minHeight="78dp"
+        android:autoSizeTextType="uniform"
+        android:autoSizeMaxTextSize="46sp"
         android:background="@drawable/backstage_selector_debug_param_cb_bg"
         android:button="@null"
         android:checked="false"

+ 2 - 0
module_backstage/src/main/res/layout/backstage_item_debug_product.xml

@@ -24,6 +24,8 @@
         android:layout_width="wrap_content"
         android:layout_marginTop="20dp"
         android:maxWidth="360dp"
+        android:autoSizeTextType="uniform"
+        android:autoSizeMaxTextSize="45sp"
         android:layout_height="wrap_content"
         android:maxHeight="90dp"
         android:text="水中芙蓉"

+ 5 - 0
module_backstage/src/main/res/layout/backstage_item_general_param.xml

@@ -13,6 +13,8 @@
         android:layout_height="160dp"
         android:layout_marginEnd="8dp"
         android:textColor="@color/black"
+        android:autoSizeTextType="uniform"
+        android:autoSizeMaxTextSize="40sp"
         android:textSize="40sp"
         android:gravity="center_vertical"
         android:text="参数名字"
@@ -44,6 +46,9 @@
         android:background="@drawable/backstage_rectangle_blue_background"
         android:text="@string/backstage_update"
         android:textColor="@color/white"
+        android:autoSizeTextType="uniform"
+        android:autoSizeMaxTextSize="38sp"
+        android:padding="10dp"
         android:textSize="38sp"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toEndOf="@+id/et_value"

+ 7 - 0
module_backstage/src/main/res/layout/backstage_item_input.xml

@@ -10,6 +10,10 @@
         android:id="@+id/tv_name"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
+        android:maxWidth="700dp"
+        android:maxHeight="90dp"
+        android:autoSizeTextType="uniform"
+        android:autoSizeMaxTextSize="52sp"
         android:layout_marginEnd="8dp"
         android:textColor="@color/black"
         android:textSize="52sp"
@@ -41,6 +45,9 @@
         android:layout_height="100dp"
         android:background="@drawable/backstage_rectangle_blue_background"
         android:text="@string/backstage_update"
+        android:padding="10dp"
+        android:autoSizeTextType="uniform"
+        android:autoSizeMaxTextSize="48sp"
         android:textColor="@color/white"
         android:textSize="48sp"
         app:layout_constraintStart_toEndOf="@+id/et_value"

+ 7 - 0
module_backstage/src/main/res/layout/backstage_item_input_text.xml

@@ -12,6 +12,10 @@
         android:layout_height="wrap_content"
         android:layout_marginEnd="8dp"
         android:textColor="@color/black"
+        android:maxWidth="700dp"
+        android:maxHeight="90dp"
+        android:autoSizeTextType="uniform"
+        android:autoSizeMaxTextSize="52sp"
         android:textSize="52sp"
         android:textStyle="bold"
         android:text="功能"
@@ -41,6 +45,9 @@
         android:background="@drawable/backstage_rectangle_blue_background"
         android:text="@string/backstage_update"
         android:textColor="@color/white"
+        android:padding="10dp"
+        android:autoSizeTextType="uniform"
+        android:autoSizeMaxTextSize="48sp"
         android:textSize="48sp"
         app:layout_constraintStart_toEndOf="@+id/et_value"
         app:layout_constraintTop_toTopOf="parent" />

+ 7 - 4
module_backstage/src/main/res/layout/backstage_item_price.xml

@@ -24,11 +24,14 @@
         <TextView
             android:id="@+id/tv_name"
             android:layout_width="wrap_content"
-            android:layout_height="200dp"
-            android:layout_marginLeft="20dp"
-            android:layout_toRightOf="@id/iv_sugar"
+            android:maxWidth="430dp"
+            android:autoSizeTextType="uniform"
+            android:autoSizeMaxTextSize="50sp"
+            android:layout_height="180dp"
+            android:layout_marginLeft="10dp"
             android:gravity="center"
-            android:maxHeight="90dp"
+            android:layout_toRightOf="@id/iv_sugar"
+            android:maxHeight="80dp"
             android:text="商品名字"
             android:textColor="#576478"
             android:textSize="50sp"

+ 8 - 0
module_backstage/src/main/res/layout/backstage_item_product.xml

@@ -23,6 +23,8 @@
         android:id="@+id/tv_name"
         android:layout_width="550dp"
         android:layout_height="wrap_content"
+        android:autoSizeTextType="uniform"
+        android:autoSizeMaxTextSize="50sp"
         android:layout_marginStart="170dp"
         android:layout_marginTop="20dp"
         android:maxHeight="90dp"
@@ -38,6 +40,8 @@
         android:layout_width="150dp"
         android:layout_height="150dp"
         android:background="#8194F0"
+        android:autoSizeTextType="uniform"
+        android:autoSizeMaxTextSize="50sp"
         android:layout_marginTop="20dp"
         android:layout_marginStart="20dp"
         app:layout_constraintTop_toBottomOf="@id/tv_name"
@@ -51,6 +55,8 @@
         android:id="@+id/et_sugarprice"
         android:layout_width="550dp"
         android:layout_height="150dp"
+        android:autoSizeTextType="uniform"
+        android:autoSizeMaxTextSize="50sp"
         android:layout_marginStart="8dp"
         android:hint="@string/custom_name"
         android:background="@drawable/backstage_shape_general_param_et"
@@ -98,6 +104,8 @@
         android:maxWidth="300dp"
         android:background="#FF7A7A"
         android:layout_marginEnd="20dp"
+        android:autoSizeTextType="uniform"
+        android:autoSizeMaxTextSize="30sp"
         android:gravity="center"
         android:inputType="numberDecimal"
         android:paddingLeft="10dp"

+ 4 - 0
module_backstage/src/main/res/layout/backstage_item_slider.xml

@@ -11,6 +11,10 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:textColor="@color/black"
+        android:maxWidth="700dp"
+        android:maxHeight="90dp"
+        android:autoSizeTextType="uniform"
+        android:autoSizeMaxTextSize="52sp"
         android:textSize="52sp"
         android:textStyle="bold"
         app:layout_constraintTop_toTopOf="parent"

+ 8 - 1
module_backstage/src/main/res/layout/backstage_item_spinner.xml

@@ -11,7 +11,11 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:textColor="@color/black"
-        android:textSize="52sp"
+        android:textSize="50sp"
+        android:maxWidth="700dp"
+        android:maxHeight="90dp"
+        android:autoSizeTextType="uniform"
+        android:autoSizeMaxTextSize="50sp"
         android:textStyle="bold"
         android:text="功能"
         app:layout_constraintBottom_toBottomOf="@+id/sp_multiple"
@@ -40,6 +44,9 @@
         android:background="@drawable/backstage_rectangle_blue_background"
         android:text="@string/backstage_update"
         android:textColor="@color/white"
+        android:padding="10dp"
+        android:autoSizeTextType="uniform"
+        android:autoSizeMaxTextSize="48sp"
         android:textSize="48sp"
         app:layout_constraintBottom_toBottomOf="@+id/sp_multiple"
         app:layout_constraintStart_toEndOf="@+id/sp_multiple"

+ 10 - 0
module_backstage/src/main/res/layout/backstage_item_system_settings.xml

@@ -11,6 +11,10 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:text="同意游客登录:"
+        android:maxWidth="700dp"
+        android:maxHeight="90dp"
+        android:autoSizeTextType="uniform"
+        android:autoSizeMaxTextSize="50sp"
         android:textColor="@color/black"
         android:textSize="50sp"
         android:textStyle="bold"
@@ -36,6 +40,9 @@
             android:button="@null"
             android:gravity="center"
             android:textStyle="bold"
+            android:padding="10dp"
+            android:autoSizeTextType="uniform"
+            android:autoSizeMaxTextSize="48sp"
             android:textSize="48sp"
             android:textColor="@drawable/backstage_selector_other_tv_color"
             android:background="@drawable/backstage_selector_other_rg"
@@ -45,6 +52,9 @@
             android:layout_width="250dp"
             android:layout_height="100dp"
             android:button="@null"
+            android:padding="10dp"
+            android:autoSizeTextType="uniform"
+            android:autoSizeMaxTextSize="48sp"
             android:textStyle="bold"
             android:gravity="center"
             android:textSize="48sp"

+ 59 - 0
module_home/src/main/java/com/quyunshuo/module/home/adapter/CartProductDialogAdapter.kt

@@ -0,0 +1,59 @@
+package com.quyunshuo.module.home.adapter
+
+import android.view.LayoutInflater
+import android.view.ViewGroup
+import androidx.lifecycle.LiveData
+import androidx.lifecycle.MutableLiveData
+import androidx.recyclerview.widget.RecyclerView
+import com.quyunshuo.module.home.R
+import com.quyunshuo.module.home.databinding.HomeItemCartProductBinding
+import com.quyunshuo.sbm10.base.addressenum.PayEnum
+import com.quyunshuo.sbm10.common.listener.AdapterClickListener
+import com.quyunshuo.sbm10.common.util.UiUtil
+import com.quyunshuo.sbm10.base.utils.SpUtils
+import com.quyunshuo.sbm10.common.bean.ShoppingCartBean
+import com.quyunshuo.sbm10.common.constant.MMKVName
+
+class CartProductDialogAdapter(var productList:List<ShoppingCartBean>): RecyclerView.Adapter<CartProductDialogAdapter.MyViewHolder>() {
+    private val TAG = "HomeProductAdapter"
+    private val _position = MutableLiveData<Int>()
+    var listener:AdapterClickListener? = null
+
+    inner class MyViewHolder(binding: HomeItemCartProductBinding): RecyclerView.ViewHolder(binding.root){
+        private val mBinding = binding
+        fun bind(payTypeBean: ShoppingCartBean) {
+            mBinding.run {
+                val valueOf = PayEnum.getEnumByValue(payTypeBean.nameChinese)
+                tvName.setText(UiUtil.getResId(payTypeBean.nameId, R.string::class.java))
+                tvPrice.text = UiUtil.getStringRes(R.string.univalent)+":"+payTypeBean.price
+                homeImageview9.setImageResource(UiUtil.getResId(payTypeBean.imgID, R.drawable::class.java))
+                tvCount.text = payTypeBean.count.toString()
+            }
+        }
+
+
+    }
+
+    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): MyViewHolder {
+        val projectVH = MyViewHolder(
+            HomeItemCartProductBinding.inflate(LayoutInflater.from(parent.context), parent, false)
+        )
+        return projectVH
+    }
+
+    override fun onBindViewHolder(holder: MyViewHolder, position: Int) {
+        holder.bind(productList[position])
+    }
+
+    override fun getItemCount(): Int {
+        return productList.size
+    }
+
+    fun setOnclickListener(listener:AdapterClickListener){
+        this.listener = listener
+    }
+
+    fun setData(productList:List<ShoppingCartBean>){
+        this.productList=productList
+    }
+}

+ 4 - 5
module_home/src/main/java/com/quyunshuo/module/home/adapter/PayChooseDialogAdapter.kt

@@ -32,13 +32,12 @@ class PayChooseDialogAdapter(var productList:HashMap<String, PayTypeBean>): Recy
                 val valueOf = PayEnum.getEnumByValue(payTypeBean.payCode)
                 tvName.text = UiUtil.getStringRes(valueOf.nameId)
                 ivSugar.setImageResource(valueOf.imgId)
-                ivSugar.setOnClickListener {
-                    Log.d(TAG, "layoutPosition ivSugar: $layoutPosition")
-                    adapter?.onClickListener(it,layoutPosition,payTypeBean.payCode)
-                }
+//                ivSugar.setOnClickListener {
+//                    Log.d(TAG, "layoutPosition ivSugar: $layoutPosition")
+//                }
                 clPay.setOnClickListener{
                     Log.d(TAG, "layoutPosition clPay: $layoutPosition")
-
+                    adapter?.onClickListener(it,layoutPosition,payTypeBean.payCode)
                 }
             }
         }

+ 1 - 1
module_home/src/main/java/com/quyunshuo/module/home/dialog/LanguageSelectorDialog.kt

@@ -17,7 +17,7 @@ import com.quyunshuo.sbm10.base.utils.SpUtils
 import java.util.Locale
 
 /**
- * 确定和取消对话框
+ * 切换语言弹窗
  */
 class LanguageSelectorDialog(mContext: Context) : BaseFrameDialog<LanguageSelectorDialogBinding>(mContext),
     LifecycleObserver {

+ 27 - 4
module_home/src/main/java/com/quyunshuo/module/home/dialog/PayChooseDialogFragment.kt

@@ -27,6 +27,7 @@ import com.quyunshuo.sbm10.common.listener.AdapterClickListener
 import com.quyunshuo.sbm10.common.util.UiUtil
 import com.quyunshuo.module.home.enums.PayNavEnum
 import com.quyunshuo.module.home.R
+import com.quyunshuo.module.home.adapter.CartProductDialogAdapter
 import com.quyunshuo.module.home.adapter.PayChooseDialogAdapter
 import com.quyunshuo.module.home.databinding.HomeDialogPayChooseBinding
 import com.quyunshuo.module.home.fragment.vm.HomeFragmentVM
@@ -57,8 +58,10 @@ class PayChooseDialogFragment :
     private val TAG = "PayChooseDialogFragment1"
     private var connectionServerDialoglistener: DialogClickListener? = null
     override val mViewModel: HomeFragmentVM by viewModels()
+
     var arrayListState: HashMap<String, PayTypeBean> = HashMap() //支付方式
     private lateinit var homeProductAdapter: PayChooseDialogAdapter
+    private lateinit var homeCartProductAdapter: CartProductDialogAdapter
     private var promotionCode: String? = null //优惠码
     private lateinit var shoppingTrolleyList: List<ShoppingCartBean> //购物车内容
     private var sumPrice: Double = 0.0//总金额  没有优惠的
@@ -76,11 +79,16 @@ class PayChooseDialogFragment :
             connectionServerDialoglistener?.onClickListener(typeBack, "")
             dismiss()
         }
+        ivCancel.setOnClickListener {
+            connectionServerDialoglistener?.onClickListener(typeBack, "")
+            mBinding.rlPayMessage.visibility = View.GONE
+            mBinding.rlSelectPay.visibility = View.VISIBLE
+        }
         with(rvPay) {
             val gridLayoutManager: GridLayoutManager =
                 GridLayoutManager(
                     this@PayChooseDialogFragment.context,
-                    3,
+                    2,
                     GridLayoutManager.VERTICAL,
                     false
                 )
@@ -104,6 +112,8 @@ class PayChooseDialogFragment :
             homeProductAdapter.setOnclickListener(object : AdapterClickListener {
                 override fun onClickListener(view: View?, position: Int, data: String?) {
                     backTime = CLOSE_TIME
+                    mBinding.rlPayMessage.visibility = View.VISIBLE
+                    mBinding.rlSelectPay.visibility = View.GONE
                     payMentNav(data!!)
 
                 }
@@ -115,6 +125,20 @@ class PayChooseDialogFragment :
             break
 
         }
+        with(rvCartProduct) {
+            val gridLayoutManager =
+                GridLayoutManager(
+                    this@PayChooseDialogFragment.context,
+                    1,
+                    GridLayoutManager.VERTICAL,
+                    false
+                )
+            layoutManager = gridLayoutManager
+            //设置adapter
+            homeCartProductAdapter = CartProductDialogAdapter(shoppingTrolleyList)
+            adapter = homeCartProductAdapter
+        }
+        mBinding.tvPrice.text = UiUtil.getStringRes(R.string.total_amount)+": "+sumPrice+" "+MMKVName.UNIT_DATA[SpUtils.getInt(MMKVName.CURRENCY_UNIT,0)!!]
     }
 
     /**
@@ -135,12 +159,11 @@ class PayChooseDialogFragment :
     }
 
     override fun createVB() = HomeDialogPayChooseBinding.inflate(layoutInflater)
+
     override fun initObserve() {
         lifecycle.addObserver(myHandler)
         lifecycle.addObserver(this)
-
     }
-
     override fun initRequestData() {
 
     }
@@ -206,6 +229,7 @@ class PayChooseDialogFragment :
         startRefreshime()
         super.onStart()
         val dialog = dialog ?: return
+        dialog.setCancelable(false)
         val window = dialog.window
         if (window != null) {
             // 设置对话框宽高和位置
@@ -229,5 +253,4 @@ class PayChooseDialogFragment :
         this.sumPrice = shoppingTrolleySumPrice
     }
 
-
 }

+ 15 - 0
module_home/src/main/java/com/quyunshuo/module/home/fragment/fragment/BuyFragment.kt

@@ -15,6 +15,7 @@ import androidx.lifecycle.Lifecycle
 import androidx.lifecycle.LifecycleObserver
 import androidx.lifecycle.OnLifecycleEvent
 import androidx.navigation.findNavController
+import com.alibaba.android.arouter.launcher.ARouter
 import com.hboxs.serialport.sbc.SBCHeartbeat
 import com.hboxs.serialport.sbc.VBoxMessage
 import com.hboxs.serialport.sbc.VboxSerialPortSendQueue
@@ -25,10 +26,12 @@ import com.quyunshuo.module.home.databinding.HomeFragmentBuyBinding
 import com.quyunshuo.module.home.enums.LogoEnum
 import com.quyunshuo.module.home.fragment.vm.BuyFragmentVM
 import com.quyunshuo.module.home.utils.SimplePlayerUtil
+import com.quyunshuo.sbm10.base.utils.LanguageUtil
 import com.quyunshuo.sbm10.base.utils.RegisterEventBus
 import com.quyunshuo.sbm10.base.utils.SpUtils
 import com.quyunshuo.sbm10.base.utils.XLogUtil
 import com.quyunshuo.sbm10.common.constant.MMKVName
+import com.quyunshuo.sbm10.common.constant.RouteUrl
 import com.quyunshuo.sbm10.common.ui.BaseFragment
 import com.quyunshuo.sbm10.common.util.UiUtil
 import dagger.hilt.android.AndroidEntryPoint
@@ -65,6 +68,18 @@ class BuyFragment : BaseFragment<HomeFragmentBuyBinding, BuyFragmentVM>(),
         MyHandler(this@BuyFragment)
 
     override fun HomeFragmentBuyBinding.initView() {
+        val language = arguments?.getString("language")
+        if (language=="default"){
+            val defaultLanguage = SpUtils.getInt(MMKVName.LANGUAGE_TYPE_DEFAULT,0)!!
+            val nowLanguage=SpUtils.getInt(MMKVName.LANGUAGE_TYPE,0)!!
+            if (nowLanguage!=defaultLanguage){
+                SpUtils.putInt(MMKVName.LANGUAGE_TYPE, defaultLanguage)
+                Log.d(TAG, "initView: 重置语言")
+                LanguageUtil.setLanguage()
+                ARouter.getInstance().build(RouteUrl.Main.MainActivity).navigation()
+                activity?.finish()
+            }
+        }
         startRefreshime()
         clickHand.startAnimation(AnimationUtils.loadAnimation(context, R.anim.home_click_hand))
         val deviceId = XLogUtil.getDeviceId()

+ 6 - 4
module_home/src/main/java/com/quyunshuo/module/home/fragment/fragment/HomeFragment.kt

@@ -247,10 +247,10 @@ class HomeFragment : BaseFragment<HomeFragmentHomeBinding, HomeFragmentVM>(), Vi
      * 定制化、UI显隐等
      */
     private fun initUi() {
-        if (!SpUtils.getBoolean(MMKVName.SHOPPING_TROLLEY, true)!!) {
+        if (!SpUtils.getBoolean(MMKVName.SHOPPING_TROLLEY, false)!!) {
             mBinding.clShoppingCart.setVisible(false)
         }
-        if (!SpUtils.getBoolean(MMKVName.LANGUAGE_SWITCH,true)!!){
+        if (!SpUtils.getBoolean(MMKVName.LANGUAGE_SWITCH,false)!!){
             mBinding.llLanguageSwitch.setVisible(false)
         }
 
@@ -318,7 +318,7 @@ class HomeFragment : BaseFragment<HomeFragmentHomeBinding, HomeFragmentVM>(), Vi
                 return
             }
         }
-//        if (checkToBuy()) return//是否开机
+        if (checkToBuy()) return//是否开机
 //        selectProductDataBean = ProTypeEnum.getEnumByValue(product!!.nameChinese)
         //todo 测试做糖 传递价格等信息过去。
 //        gotoMake(product.nameChinese)
@@ -722,7 +722,9 @@ class HomeFragment : BaseFragment<HomeFragmentHomeBinding, HomeFragmentVM>(), Vi
                 Log.d("backTime", "setTimeDate: " + fragment.backTime)
                 if (fragment.backTime == 0) {
                     val findNavController = fragment.findNavController()
-                    findNavController.navigate(R.id.home_action_home_homefragment_to_home_buyfragment)
+                    val bundle = Bundle()
+                    bundle.putString("language", "default")
+                    findNavController.navigate(R.id.home_action_home_homefragment_to_home_buyfragment,bundle)
                 }
             }
         }

+ 5 - 0
module_home/src/main/java/com/quyunshuo/module/home/service/GlobalService.kt

@@ -122,6 +122,11 @@ class GlobalService : LifecycleService() {
         if (SpUtils.getString(MMKVName.OPEN_DEV, "0") != "0") {
             SpUtils.putString(MMKVName.OPEN_DEV, "0")
         }
+        val defaultLanguage = SpUtils.getInt(MMKVName.LANGUAGE_TYPE_DEFAULT,0)!!
+        val nowLanguage= SpUtils.getInt(MMKVName.LANGUAGE_TYPE,0)!!
+        if (nowLanguage!=defaultLanguage) {
+            SpUtils.putInt(MMKVName.LANGUAGE_TYPE, defaultLanguage)
+        }
         showTipsDialog(UiUtil.getStringRes(R.string.initializing))//是否开机
         observeLiveData(globalServiceViewModel.initIsSuccess, ::initIsSuccess)
         observeLiveData(globalServiceViewModel.alarmType, ::getAlarmType)

+ 1 - 0
module_home/src/main/res/layout/backstage_dialog_warring.xml

@@ -29,6 +29,7 @@
         <TextView
             android:id="@+id/tv_warringtitle"
             android:layout_width="wrap_content"
+            android:maxWidth="500dp"
             android:layout_height="wrap_content"
             android:layout_marginLeft="20dp"
             android:text="温湿度异常"

+ 97 - 35
module_home/src/main/res/layout/home_dialog_pay_choose.xml

@@ -2,7 +2,7 @@
 <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="wrap_content"
-    android:layout_height="wrap_content"
+    android:layout_height="match_parent"
     android:layout_gravity="center">
 
     <androidx.constraintlayout.widget.ConstraintLayout
@@ -14,30 +14,81 @@
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintTop_toTopOf="parent">
+        <RelativeLayout
+            android:id="@+id/rl_cart_product"
+            android:layout_width="wrap_content"
+            android:layout_height="700dp"
+            android:layout_gravity="center"
+            android:visibility="visible"
+            android:background="@drawable/home_rectangle_background"
+            app:layout_constraintTop_toBottomOf="@id/iv_back"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintEnd_toEndOf="@id/home_guideline4">
 
-        <TextView
-            android:id="@+id/tv_title"
+        <androidx.recyclerview.widget.RecyclerView
+            android:id="@+id/rv_cart_product"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginStart="47dp"
-            android:text="@string/home_choosepay_title"
-            android:textColor="#1C1C1D"
-            android:textSize="56sp"
-
-            android:textStyle="bold"
-            app:layout_constraintBottom_toBottomOf="@+id/iv_back"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toTopOf="@+id/iv_back" />
+            android:layout_marginTop="20dp"
+            android:maxWidth="1300dp"
+            android:maxHeight="800dp" />
+
+            <TextView
+                android:id="@+id/tv_price"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginBottom="20dp"
+                android:layout_marginStart="20dp"
+                android:text="合计:12:00"
+                android:textColor="#576478"
+                android:textSize="56sp"
+                android:textStyle="bold"
+                android:layout_alignParentBottom="true"/>
+        </RelativeLayout>
+
+        <RelativeLayout
+            android:id="@+id/rl_select_pay"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:visibility="visible"
+            android:background="@drawable/home_rectangle_background"
+            app:layout_constraintTop_toTopOf="parent"
+            android:layout_marginTop="37dp"
+            app:layout_constraintStart_toStartOf="@+id/home_guideline4">
+
+            <TextView
+                android:id="@+id/tv_title"
+                android:layout_width="wrap_content"
+                android:maxWidth="600dp"
+                android:autoSizeTextType="uniform"
+                android:layout_height="wrap_content"
+                android:maxHeight="90dp"
+                android:layout_marginStart="47dp"
+                android:text="@string/home_choosepay_title"
+                android:textColor="#1C1C1D"
+                android:textSize="56sp"
+                android:textStyle="bold" />
+
+            <androidx.recyclerview.widget.RecyclerView
+                android:id="@+id/rv_pay"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="20dp"
+                android:maxWidth="1500dp"
+                android:layout_marginStart="60dp"
+                android:layout_below="@id/tv_title"/>
+
+        </RelativeLayout>
 
         <TextView
             android:id="@+id/iv_back"
-            android:layout_width="250dp"
-            android:layout_height="120dp"
+            android:layout_width="100dp"
+            android:layout_height="100dp"
             android:layout_marginTop="37dp"
             android:layout_marginEnd="47dp"
-            android:background="@drawable/btn_back_background"
+            android:background="@drawable/icon_cancel"
             android:gravity="center"
-            android:text="@string/home_cancle"
             android:textColor="@color/white"
             android:textSize="42sp"
             app:layout_constraintEnd_toEndOf="parent"
@@ -69,16 +120,6 @@
         <!--            app:layout_constraintStart_toEndOf="@+id/home_textview2" />-->
 
 
-        <androidx.recyclerview.widget.RecyclerView
-            android:id="@+id/rv_pay"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="20dp"
-            android:maxWidth="1500dp"
-            android:maxHeight="800dp"
-            app:layout_constraintStart_toStartOf="@+id/tv_title"
-            app:layout_constraintTop_toBottomOf="@+id/tv_title" />
-
 
         <androidx.constraintlayout.widget.Guideline
             android:id="@+id/home_guideline4"
@@ -112,16 +153,37 @@
             app:layout_constraintStart_toStartOf="@+id/home_guideline4"
             app:layout_constraintTop_toTopOf="parent" />
 
-        <androidx.fragment.app.FragmentContainerView
-            android:id="@+id/fcv_pay"
-            android:name="androidx.navigation.fragment.NavHostFragment"
-            android:layout_width="700dp"
-            android:layout_height="700dp"
-            android:layout_marginBottom="40dp"
-            app:layout_constraintBottom_toBottomOf="parent"
+        <RelativeLayout
+            android:id="@+id/rl_pay_message"
+            android:visibility="gone"
+            android:layout_width="800dp"
+            android:layout_height="800dp"
+            android:layout_marginTop="40dp"
+            app:layout_constraintTop_toTopOf="parent"
             app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintStart_toStartOf="@+id/home_guideline4"
-            app:navGraph="@navigation/home_pay_nav"/>
+            app:layout_constraintStart_toStartOf="@+id/home_guideline4">
+            <androidx.fragment.app.FragmentContainerView
+                android:layout_marginTop="10dp"
+                android:id="@+id/fcv_pay"
+                android:name="androidx.navigation.fragment.NavHostFragment"
+                android:layout_width="700dp"
+                android:layout_centerHorizontal="true"
+                android:layout_height="700dp"
+                android:layout_below="@id/iv_cancel"
+                app:navGraph="@navigation/home_pay_nav"/>
+
+            <TextView
+                android:id="@+id/iv_cancel"
+                android:layout_width="250dp"
+                android:layout_height="120dp"
+                android:layout_centerHorizontal="true"
+                android:background="@drawable/btn_back_background"
+                android:gravity="center"
+                android:text="@string/backstage_back"
+                android:textColor="@color/white"
+                android:textSize="42sp"/>
+        </RelativeLayout>
+
 
 
     </androidx.constraintlayout.widget.ConstraintLayout>

+ 2 - 0
module_home/src/main/res/layout/home_fragment_buy.xml

@@ -66,7 +66,9 @@
         android:minWidth="300dp"
         android:maxWidth="400dp"
         android:layout_height="wrap_content"
+        android:maxHeight="350dp"
         android:layout_marginEnd="5dp"
+        android:autoSizeTextType="uniform"
         android:gravity="center"
         android:text="@string/guide_touch"
         android:letterSpacing="0.2"

+ 7 - 1
module_home/src/main/res/layout/home_fragment_home.xml

@@ -91,7 +91,7 @@
 
     <androidx.constraintlayout.widget.ConstraintLayout
         android:id="@+id/cl_home_time"
-        android:layout_width="wrap_content"
+        android:layout_width="550dp"
         android:layout_height="250dp"
         android:layout_marginTop="20dp"
         app:layout_constraintEnd_toEndOf="parent"
@@ -112,6 +112,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:text="@string/home_dev_id"
+            android:autoSizeTextType="uniform"
             android:textColor="@color/black"
             android:textSize="50sp"
             app:layout_constraintStart_toStartOf="parent"
@@ -122,7 +123,9 @@
         android:id="@+id/btn_cif"
         android:layout_width="200dp"
         android:layout_height="150dp"
+        android:autoSizeTextType="uniform"
         android:layout_marginTop="20dp"
+        android:padding="20dp"
         android:layout_marginRight="100dp"
         android:background="@drawable/home_rectangle_t_blue_background"
         android:gravity="center"
@@ -281,7 +284,10 @@
         <TextView
             android:id="@+id/tv_total"
             android:layout_width="wrap_content"
+            android:maxWidth="300dp"
             android:layout_height="wrap_content"
+            android:maxHeight="100dp"
+            android:autoSizeTextType="uniform"
             android:layout_centerVertical="true"
             android:layout_marginLeft="20dp"
             android:gravity="center_vertical"

+ 2 - 0
module_home/src/main/res/layout/home_fragment_userlogin.xml

@@ -83,6 +83,8 @@
     <TextView
         android:id="@+id/home_return_to_upper_level"
         android:layout_width="wrap_content"
+        android:maxWidth="500dp"
+        android:autoSizeTextType="uniform"
         android:layout_height="160dp"
         android:layout_marginEnd="50dp"
         android:background="@drawable/home_rectangle_blue_background"

+ 78 - 0
module_home/src/main/res/layout/home_item_cart_product.xml

@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="650dp"
+    android:layout_marginTop="20dp"
+    android:layout_marginBottom="10dp"
+    android:background="@drawable/item_price_adapter_background"
+    android:layout_height="210dp"
+    android:layout_gravity="center_horizontal"
+    android:padding="5dp">
+
+        <ImageView
+            android:id="@+id/home_imageview9"
+            android:layout_width="150dp"
+            android:layout_height="150dp"
+            android:layout_marginStart="20dp"
+            android:src="@drawable/product_1"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+
+        <TextView
+            android:id="@+id/tv_name"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="15dp"
+            android:layout_marginStart="20dp"
+            android:text="玫瑰精灵"
+            android:textColor="#966035"
+            android:textSize="40sp"
+            app:layout_constraintStart_toEndOf="@+id/home_imageview9"
+            app:layout_constraintTop_toTopOf="@+id/home_imageview9" />
+
+        <TextView
+            android:id="@+id/tv_price"
+            android:layout_width="250dp"
+            android:layout_height="wrap_content"
+            android:maxHeight="70dp"
+            android:text="单价:1.00"
+            android:layout_marginTop="10dp"
+            android:textColor="@color/price_color"
+            android:autoSizeTextType="uniform"
+            android:layout_marginStart="20dp"
+            android:textStyle="bold"
+            android:textSize="34sp"
+            app:layout_constraintStart_toEndOf="@+id/home_imageview9"
+            app:layout_constraintTop_toBottomOf="@+id/tv_name" />
+
+        <TextView
+            android:id="@+id/tv_add"
+            android:layout_width="100dp"
+            android:layout_height="100dp"
+            android:gravity="center"
+            android:textColor="#576478"
+            android:text="x"
+            android:textSize="60sp"
+            android:textStyle="bold"
+            app:layout_constraintBottom_toBottomOf="@+id/tv_count"
+            app:layout_constraintEnd_toStartOf="@+id/tv_count" />
+
+        <TextView
+            android:id="@+id/tv_count"
+            android:layout_width="100dp"
+            android:layout_height="100dp"
+            android:gravity="center"
+            android:text="1"
+            android:textColor="#576478"
+            android:textSize="60sp"
+            android:textStyle="bold"
+            android:layout_marginTop="40dp"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+
+
+
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 5 - 2
module_home/src/main/res/layout/home_item_home_product.xml

@@ -23,9 +23,12 @@
 
     <TextView
         android:id="@+id/tv_name"
-        android:layout_width="match_parent"
-        android:layout_height="200dp"
+        android:layout_width="wrap_content"
+        android:maxWidth="650dp"
+        android:layout_height="wrap_content"
         android:layout_centerHorizontal="true"
+        android:autoSizeTextType="uniform"
+        android:autoSizeMaxTextSize="70sp"
         android:gravity="center"
         android:maxHeight="150dp"
         android:minHeight="90dp"

+ 1 - 1
module_pay/src/main/java/com/module/pay/common/OtherEnum.kt

@@ -55,7 +55,7 @@ enum class OtherEnum(var nameId:Int,var nameS:String,var category:String,var def
     SLEEP_TEXT(R.string.sleep_text,"休眠中文本","其他","", 7,MMKVName.SLEEP_TEXT),
     LOGO_TEXT(R.string.logo_text,"图标变更","其他","7777", 2,MMKVName.LOGO_TEXT),
     CURRENCY_UNIT(R.string.currency_unit,"货币单位","其他",ArrayList<String>(MMKVName.UNIT_DATA), 3,MMKVName.CURRENCY_UNIT),
-    LANGUAGE_SWITCH(R.string.more_language,"多语言","其他",true, 1,MMKVName.LANGUAGE_SWITCH),
+    LANGUAGE_SWITCH(R.string.more_language,"多语言","其他",false, 1,MMKVName.LANGUAGE_SWITCH),
 
     SHOPPING_TROLLEY(R.string.shopping_trolley,"购物车功能","购物车设置",true, 1,MMKVName.SHOPPING_TROLLEY),
     SHOPPING_CART_SIZE(R.string.shopping_cart_size,"购物车可添加数量","购物车设置","3", 2,MMKVName.SHOPPING_CART_SIZE),