Browse Source

月子中心门口机界面优化

weizhengliang 1 year ago
parent
commit
4340fbbc2a

+ 49 - 3
android_door/src/main/h10_3128/java/com/wdkl/app/ncs/callingdoor/fragment/YzMainFragment.kt

@@ -3,7 +3,6 @@ package com.wdkl.app.ncs.callingdoor.fragment
 import androidx.recyclerview.widget.GridLayoutManager
 import androidx.recyclerview.widget.GridLayoutManager
 import com.enation.javashop.net.engine.model.NetState
 import com.enation.javashop.net.engine.model.NetState
 import com.google.gson.JsonObject
 import com.google.gson.JsonObject
-import com.wdkl.app.ncs.callingdoor.BuildConfig
 import com.wdkl.app.ncs.callingdoor.R
 import com.wdkl.app.ncs.callingdoor.R
 import com.wdkl.app.ncs.callingdoor.activity.CallingdoorActivity
 import com.wdkl.app.ncs.callingdoor.activity.CallingdoorActivity
 import com.wdkl.app.ncs.callingdoor.adapter.BabyItemAdapter
 import com.wdkl.app.ncs.callingdoor.adapter.BabyItemAdapter
@@ -88,16 +87,63 @@ class YzMainFragment: BaseFragment<MainFragmentPresenter, MainViewLayoutBinding>
                     Constant.babyGirl = true
                     Constant.babyGirl = true
                     //红色主题
                     //红色主题
                     rl_date_view.setBackgroundResource(R.drawable.shape_bottom_bg_red)
                     rl_date_view.setBackgroundResource(R.drawable.shape_bottom_bg_red)
-                    yz_main_view.setBackgroundResource(R.mipmap.main_bg_double)
+                    yz_main_view.setBackgroundResource(R.mipmap.main_bg_girls)
                     tv_in_date.setTextColor(Constant.colorGirl)
                     tv_in_date.setTextColor(Constant.colorGirl)
                     tv_out_date.setTextColor(Constant.colorGirl)
                     tv_out_date.setTextColor(Constant.colorGirl)
                     tv_mother_name.setTextColor(Constant.colorGirl)
                     tv_mother_name.setTextColor(Constant.colorGirl)
                     tv_desc.setBackgroundResource(R.drawable.shape_desc_bg_red)
                     tv_desc.setBackgroundResource(R.drawable.shape_desc_bg_red)
                     img_nurse_icon.setImageResource(R.mipmap.ic_nurse_2)
                     img_nurse_icon.setImageResource(R.mipmap.ic_nurse_2)
                     tv_nurse_name.setTextColor(Constant.colorGirl)
                     tv_nurse_name.setTextColor(Constant.colorGirl)
+
+                    /*var babyBoy = 0
+                    for (relative in bedVO.frameBedRelativeVos) {
+                        if (relative.relativeSex != null && relative.relativeSex == 1) {
+                            //男孩
+                            babyBoy++
+                        }
+                    }
+
+                    //多胞胎
+                    if (babyBoy == bedVO.frameBedRelativeVos.size) {
+                        //都是男孩
+                        Constant.babyGirl = false
+                        //蓝色主题
+                        rl_date_view.setBackgroundResource(R.drawable.shape_bottom_bg_blue)
+                        yz_main_view.setBackgroundResource(R.mipmap.main_bg_boys)
+                        tv_in_date.setTextColor(Constant.colorBoy)
+                        tv_out_date.setTextColor(Constant.colorBoy)
+                        tv_mother_name.setTextColor(Constant.colorBoy)
+                        tv_desc.setBackgroundResource(R.drawable.shape_desc_bg_blue)
+                        img_nurse_icon.setImageResource(R.mipmap.ic_nurse_1)
+                        tv_nurse_name.setTextColor(Constant.colorBoy)
+                    } else if (babyBoy == 0) {
+                        //都是女孩
+                        Constant.babyGirl = true
+                        //红色主题
+                        rl_date_view.setBackgroundResource(R.drawable.shape_bottom_bg_red)
+                        yz_main_view.setBackgroundResource(R.mipmap.main_bg_girls)
+                        tv_in_date.setTextColor(Constant.colorGirl)
+                        tv_out_date.setTextColor(Constant.colorGirl)
+                        tv_mother_name.setTextColor(Constant.colorGirl)
+                        tv_desc.setBackgroundResource(R.drawable.shape_desc_bg_red)
+                        img_nurse_icon.setImageResource(R.mipmap.ic_nurse_2)
+                        tv_nurse_name.setTextColor(Constant.colorGirl)
+                    } else {
+                        //男孩女孩都有
+                        Constant.babyGirl = true
+                        //红色主题
+                        rl_date_view.setBackgroundResource(R.drawable.shape_bottom_bg_red)
+                        yz_main_view.setBackgroundResource(R.mipmap.main_bg_boy_girl)
+                        tv_in_date.setTextColor(Constant.colorGirl)
+                        tv_out_date.setTextColor(Constant.colorGirl)
+                        tv_mother_name.setTextColor(Constant.colorGirl)
+                        tv_desc.setBackgroundResource(R.drawable.shape_desc_bg_red)
+                        img_nurse_icon.setImageResource(R.mipmap.ic_nurse_2)
+                        tv_nurse_name.setTextColor(Constant.colorGirl)
+                    }*/
                 } else {
                 } else {
                     //单胎
                     //单胎
-                    if (bedVO.frameBedRelativeVos[0].relativeSex == 1) {
+                    if (bedVO.frameBedRelativeVos[0].relativeSex != null && bedVO.frameBedRelativeVos[0].relativeSex == 1) {
                         //男孩
                         //男孩
                         Constant.babyGirl = false
                         Constant.babyGirl = false
                         //蓝色主题
                         //蓝色主题

BIN
android_door/src/main/h10_3128/res/mipmap-mdpi/main_bg_boy_girl.png


BIN
android_door/src/main/h10_3128/res/mipmap-mdpi/main_bg_boys.png


android_door/src/main/h10_3128/res/mipmap-mdpi/main_bg_double.png → android_door/src/main/h10_3128/res/mipmap-mdpi/main_bg_girls.png