|
@@ -3,7 +3,6 @@ package com.wdkl.app.ncs.callingdoor.fragment
|
|
|
import androidx.recyclerview.widget.GridLayoutManager
|
|
|
import com.enation.javashop.net.engine.model.NetState
|
|
|
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.activity.CallingdoorActivity
|
|
|
import com.wdkl.app.ncs.callingdoor.adapter.BabyItemAdapter
|
|
@@ -88,16 +87,63 @@ class YzMainFragment: BaseFragment<MainFragmentPresenter, MainViewLayoutBinding>
|
|
|
Constant.babyGirl = true
|
|
|
//红色主题
|
|
|
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_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)
|
|
|
+
|
|
|
+ /*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 {
|
|
|
//单胎
|
|
|
- if (bedVO.frameBedRelativeVos[0].relativeSex == 1) {
|
|
|
+ if (bedVO.frameBedRelativeVos[0].relativeSex != null && bedVO.frameBedRelativeVos[0].relativeSex == 1) {
|
|
|
//男孩
|
|
|
Constant.babyGirl = false
|
|
|
//蓝色主题
|