|
@@ -13,6 +13,8 @@ import android.view.ViewGroup
|
|
import android.widget.ImageView
|
|
import android.widget.ImageView
|
|
import android.widget.LinearLayout
|
|
import android.widget.LinearLayout
|
|
import android.widget.TextView
|
|
import android.widget.TextView
|
|
|
|
+import com.bumptech.glide.Glide
|
|
|
|
+import com.bumptech.glide.load.engine.DiskCacheStrategy
|
|
import com.wdkl.app.ncs.callingdoor.R
|
|
import com.wdkl.app.ncs.callingdoor.R
|
|
import com.wdkl.ncs.android.middleware.common.Constant
|
|
import com.wdkl.ncs.android.middleware.common.Constant
|
|
import com.wdkl.ncs.android.middleware.model.dto.NurseConfigDto
|
|
import com.wdkl.ncs.android.middleware.model.dto.NurseConfigDto
|
|
@@ -36,63 +38,36 @@ class FrameRoomAdapter : RecyclerView.Adapter<FrameRoomAdapter.BedViewHolder> {
|
|
this.context = context
|
|
this.context = context
|
|
this.data = data
|
|
this.data = data
|
|
|
|
|
|
- if ("rk3288".equals(Build.MODEL)) {
|
|
|
|
- drawableEmpty = context.resources.getDrawable(R.mipmap.ic_custom_empty2)
|
|
|
|
- drawableEmpty.setBounds(0, 0, drawableEmpty.minimumWidth, drawableEmpty.minimumHeight)
|
|
|
|
- drawableMale = context.resources.getDrawable(R.mipmap.ic_custom_male2)
|
|
|
|
- drawableMale.setBounds(0, 0, drawableMale.minimumWidth, drawableMale.minimumHeight)
|
|
|
|
- drawableFemale = context.resources.getDrawable(R.mipmap.ic_custom_female2)
|
|
|
|
- drawableFemale.setBounds(0, 0, drawableFemale.minimumWidth, drawableFemale.minimumHeight)
|
|
|
|
- iconMale = context.resources.getDrawable(R.mipmap.ic_gender_male2)
|
|
|
|
- iconMale.setBounds(0, 0, iconMale.minimumWidth, iconMale.minimumHeight)
|
|
|
|
- iconFemale = context.resources.getDrawable(R.mipmap.ic_gender_female2)
|
|
|
|
- iconFemale.setBounds(0, 0, iconFemale.minimumWidth, iconFemale.minimumHeight)
|
|
|
|
- } else {
|
|
|
|
- drawableEmpty = context.resources.getDrawable(R.mipmap.ic_custom_empty)
|
|
|
|
- drawableEmpty.setBounds(0, 0, drawableEmpty.minimumWidth, drawableEmpty.minimumHeight)
|
|
|
|
- drawableMale = context.resources.getDrawable(R.mipmap.ic_custom_male)
|
|
|
|
- drawableMale.setBounds(0, 0, drawableMale.minimumWidth, drawableMale.minimumHeight)
|
|
|
|
- drawableFemale = context.resources.getDrawable(R.mipmap.ic_custom_female)
|
|
|
|
- drawableFemale.setBounds(0, 0, drawableFemale.minimumWidth, drawableFemale.minimumHeight)
|
|
|
|
- iconMale = context.resources.getDrawable(R.mipmap.ic_gender_male)
|
|
|
|
- iconMale.setBounds(0, 0, iconMale.minimumWidth, iconMale.minimumHeight)
|
|
|
|
- iconFemale = context.resources.getDrawable(R.mipmap.ic_gender_female)
|
|
|
|
- iconFemale.setBounds(0, 0, iconFemale.minimumWidth, iconFemale.minimumHeight)
|
|
|
|
- }
|
|
|
|
|
|
+ drawableEmpty = context.resources.getDrawable(R.mipmap.ic_custom_empty)
|
|
|
|
+ drawableEmpty.setBounds(0, 0, drawableEmpty.minimumWidth, drawableEmpty.minimumHeight)
|
|
|
|
+ drawableMale = context.resources.getDrawable(R.mipmap.ic_custom_male)
|
|
|
|
+ drawableMale.setBounds(0, 0, drawableMale.minimumWidth, drawableMale.minimumHeight)
|
|
|
|
+ drawableFemale = context.resources.getDrawable(R.mipmap.ic_custom_female)
|
|
|
|
+ drawableFemale.setBounds(0, 0, drawableFemale.minimumWidth, drawableFemale.minimumHeight)
|
|
|
|
+ iconMale = context.resources.getDrawable(R.mipmap.ic_gender_male)
|
|
|
|
+ iconMale.setBounds(0, 0, iconMale.minimumWidth, iconMale.minimumHeight)
|
|
|
|
+ iconFemale = context.resources.getDrawable(R.mipmap.ic_gender_female)
|
|
|
|
+ iconFemale.setBounds(0, 0, iconFemale.minimumWidth, iconFemale.minimumHeight)
|
|
}
|
|
}
|
|
|
|
|
|
override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): BedViewHolder {
|
|
override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): BedViewHolder {
|
|
- if ("rk3288".equals(Build.MODEL)) {
|
|
|
|
- if (Constant.DEVICE_HEIGHT == 1280 && Constant.DEVICE_WIDTH == 800) {
|
|
|
|
- val view = LayoutInflater.from(parent?.context).inflate(R.layout.item_bed_rk3288_800, parent, false)
|
|
|
|
- return BedViewHolder(view)
|
|
|
|
- } else {
|
|
|
|
- val view = LayoutInflater.from(parent?.context).inflate(R.layout.item_bed_rk3288, parent, false)
|
|
|
|
- return BedViewHolder(view)
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- val view = LayoutInflater.from(parent?.context).inflate(R.layout.item_bed, parent, false)
|
|
|
|
- return BedViewHolder(view)
|
|
|
|
- }
|
|
|
|
|
|
+ val view = LayoutInflater.from(parent?.context).inflate(R.layout.item_bed, parent, false)
|
|
|
|
+ return BedViewHolder(view)
|
|
}
|
|
}
|
|
|
|
|
|
override fun onBindViewHolder(holder: BedViewHolder, position: Int) {
|
|
override fun onBindViewHolder(holder: BedViewHolder, position: Int) {
|
|
try {
|
|
try {
|
|
- initDefaultNursingConfigs()
|
|
|
|
|
|
+ //initDefaultNursingConfigs()
|
|
val pos = position % data.size
|
|
val pos = position % data.size
|
|
|
|
|
|
- if ("rk3288".equals(Build.MODEL)) {
|
|
|
|
- showBedInfoRk3288(holder, data.get(pos))
|
|
|
|
- } else {
|
|
|
|
- showBedInfo(holder, data.get(pos))
|
|
|
|
- }
|
|
|
|
|
|
+ showBedInfo(holder, data.get(pos))
|
|
} catch (e: Exception) {
|
|
} catch (e: Exception) {
|
|
e.printStackTrace()
|
|
e.printStackTrace()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
override fun getItemCount(): Int {
|
|
override fun getItemCount(): Int {
|
|
- if (data.size <= 3) {
|
|
|
|
|
|
+ if (data.size <= 2) {
|
|
return data.size
|
|
return data.size
|
|
} else {
|
|
} else {
|
|
return Int.MAX_VALUE
|
|
return Int.MAX_VALUE
|
|
@@ -118,162 +93,39 @@ class FrameRoomAdapter : RecyclerView.Adapter<FrameRoomAdapter.BedViewHolder> {
|
|
|
|
|
|
private fun showBedInfo(holder: BedViewHolder, bedVO: FrameBedVO) {
|
|
private fun showBedInfo(holder: BedViewHolder, bedVO: FrameBedVO) {
|
|
holder.bedName.text = CommonUtils.subStringAfter(bedVO.frameBed.fullName, "-")
|
|
holder.bedName.text = CommonUtils.subStringAfter(bedVO.frameBed.fullName, "-")
|
|
- if (TextUtils.isEmpty(bedVO.cardNo)) {
|
|
|
|
|
|
+ /*if (TextUtils.isEmpty(bedVO.cardNo)) {
|
|
holder.cardNo.text = ""
|
|
holder.cardNo.text = ""
|
|
} else {
|
|
} else {
|
|
holder.cardNo.text = StringUtil.getResString(R.string.card_no) + bedVO.cardNo
|
|
holder.cardNo.text = StringUtil.getResString(R.string.card_no) + bedVO.cardNo
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
|
|
|
|
if (TextUtils.isEmpty(bedVO.customerName)) {
|
|
if (TextUtils.isEmpty(bedVO.customerName)) {
|
|
//空床位
|
|
//空床位
|
|
holder.customName.setText(R.string.str_empty)
|
|
holder.customName.setText(R.string.str_empty)
|
|
- holder.customName.setCompoundDrawables(null, drawableEmpty, null, null)
|
|
|
|
- holder.customAge.visibility = View.GONE
|
|
|
|
- holder.doctorIcon.visibility = View.GONE
|
|
|
|
- holder.doctorTitle.visibility = View.GONE
|
|
|
|
- holder.doctorName.visibility = View.GONE
|
|
|
|
- holder.nurseIcon.visibility = View.GONE
|
|
|
|
- holder.nurseTitle.visibility = View.GONE
|
|
|
|
- holder.nurseName.visibility = View.GONE
|
|
|
|
- } else {
|
|
|
|
- //有入住
|
|
|
|
- holder.customName.text = bedVO.customerName
|
|
|
|
- holder.customName.setCompoundDrawables(null, drawableEmpty, null, null)
|
|
|
|
- holder.customAge.visibility = View.VISIBLE
|
|
|
|
- holder.customAge.text = "" + bedVO.customerAge + bedVO.customerAgeUnit
|
|
|
|
- if (bedVO.customerSex == 0) {
|
|
|
|
- holder.customName.setCompoundDrawables(null, drawableFemale, null, null)
|
|
|
|
- holder.customAge.setCompoundDrawables(iconFemale, null, null, null)
|
|
|
|
- } else if (bedVO.customerSex == 1) {
|
|
|
|
- holder.customName.setCompoundDrawables(null, drawableMale, null, null)
|
|
|
|
- holder.customAge.setCompoundDrawables(iconMale, null, null, null)
|
|
|
|
- } else {
|
|
|
|
- holder.customName.setCompoundDrawables(null, drawableEmpty, null, null)
|
|
|
|
- holder.customAge.setCompoundDrawables(null, null, null, null)
|
|
|
|
- }
|
|
|
|
- holder.doctorName.text = bedVO.doctorName
|
|
|
|
- holder.nurseName.text = bedVO.nurseName
|
|
|
|
-
|
|
|
|
- if (!TextUtils.isEmpty(Constant.doctorTitle)) {
|
|
|
|
- holder.doctorTitle.text = Constant.doctorTitle
|
|
|
|
- } else {
|
|
|
|
- holder.doctorTitle.setText(R.string.doctor_title)
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (!TextUtils.isEmpty(Constant.nurseTitle)) {
|
|
|
|
- holder.nurseTitle.text = Constant.nurseTitle
|
|
|
|
- } else {
|
|
|
|
- holder.nurseTitle.setText(R.string.nurse_title)
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (Constant.doctorValid == 1) {
|
|
|
|
- holder.doctorIcon.visibility = View.VISIBLE
|
|
|
|
- holder.doctorTitle.visibility = View.VISIBLE
|
|
|
|
- holder.doctorName.visibility = View.VISIBLE
|
|
|
|
- } else {
|
|
|
|
- holder.doctorIcon.visibility = View.GONE
|
|
|
|
- holder.doctorTitle.visibility = View.GONE
|
|
|
|
- holder.doctorName.visibility = View.GONE
|
|
|
|
- }
|
|
|
|
|
|
+ holder.customAge.visibility = View.INVISIBLE
|
|
|
|
+ holder.doctorName.setText(R.string.str_empty)
|
|
|
|
+ holder.nurseName.setText(R.string.str_empty)
|
|
|
|
|
|
- if (Constant.nurseValid == 1) {
|
|
|
|
- holder.nurseIcon.visibility = View.VISIBLE
|
|
|
|
- holder.nurseTitle.visibility = View.VISIBLE
|
|
|
|
- holder.nurseName.visibility = View.VISIBLE
|
|
|
|
- } else {
|
|
|
|
- holder.nurseIcon.visibility = View.GONE
|
|
|
|
- holder.nurseTitle.visibility = View.GONE
|
|
|
|
- holder.nurseName.visibility = View.GONE
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- val nursingConfigs = bedVO.nurseConfigDtos
|
|
|
|
- if (nursingConfigs != null && nursingConfigs.size > 0) {
|
|
|
|
- for ((index, e) in nursingConfigs.withIndex()) {
|
|
|
|
- if (index < configList.size) {
|
|
|
|
- configList.set(index, e)
|
|
|
|
- } else {
|
|
|
|
- configList.add(e)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- if (StringUtil.notEmpty(configList[0].nurseColorRbg)) {
|
|
|
|
- holder.nursingColor1.setBackgroundColor(Color.parseColor("#" + configList[0].nurseColorRbg))
|
|
|
|
- } else {
|
|
|
|
- holder.nursingColor1.setBackgroundColor(Color.parseColor("#D7D7D7"))
|
|
|
|
- }
|
|
|
|
- holder.nursingName1.setText(configList[0].nurseConfigName)
|
|
|
|
- holder.nursingValue1.setText(configList[0].nurseOptionName)
|
|
|
|
-
|
|
|
|
- if (StringUtil.notEmpty(configList[1].nurseColorRbg)) {
|
|
|
|
- holder.nursingColor2.setBackgroundColor(Color.parseColor("#" + configList[1].nurseColorRbg))
|
|
|
|
- } else {
|
|
|
|
- holder.nursingColor2.setBackgroundColor(Color.parseColor("#D7D7D7"))
|
|
|
|
- }
|
|
|
|
- holder.nursingName2.setText(configList[1].nurseConfigName)
|
|
|
|
- holder.nursingValue2.setText(configList[1].nurseOptionName)
|
|
|
|
-
|
|
|
|
- if (StringUtil.notEmpty(configList[2].nurseColorRbg)) {
|
|
|
|
- holder.nursingColor3.setBackgroundColor(Color.parseColor("#" + configList[2].nurseColorRbg))
|
|
|
|
- } else {
|
|
|
|
- holder.nursingColor3.setBackgroundColor(Color.parseColor("#D7D7D7"))
|
|
|
|
- }
|
|
|
|
- holder.nursingName3.setText(configList[2].nurseConfigName)
|
|
|
|
- holder.nursingValue3.setText(configList[2].nurseOptionName)
|
|
|
|
-
|
|
|
|
- if (StringUtil.notEmpty(configList[3].nurseColorRbg)) {
|
|
|
|
- holder.nursingColor4.setBackgroundColor(Color.parseColor("#" + configList[3].nurseColorRbg))
|
|
|
|
- } else {
|
|
|
|
- holder.nursingColor4.setBackgroundColor(Color.parseColor("#D7D7D7"))
|
|
|
|
- }
|
|
|
|
- holder.nursingName4.setText(configList[3].nurseConfigName)
|
|
|
|
- holder.nursingValue4.setText(configList[3].nurseOptionName)
|
|
|
|
-
|
|
|
|
- if (StringUtil.notEmpty(configList[4].nurseColorRbg)) {
|
|
|
|
- holder.nursingColor5.setBackgroundColor(Color.parseColor("#" + configList[4].nurseColorRbg))
|
|
|
|
- } else {
|
|
|
|
- holder.nursingColor5.setBackgroundColor(Color.parseColor("#D7D7D7"))
|
|
|
|
- }
|
|
|
|
- holder.nursingName5.setText(configList[4].nurseConfigName)
|
|
|
|
- holder.nursingValue5.setText(configList[4].nurseOptionName)
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- private fun showBedInfoRk3288(holder: BedViewHolder, bedVO: FrameBedVO) {
|
|
|
|
- holder.bedName.text = CommonUtils.subStringAfter(bedVO.frameBed.fullName, "-")
|
|
|
|
- if (TextUtils.isEmpty(bedVO.cardNo)) {
|
|
|
|
- holder.cardNo.text = ""
|
|
|
|
- } else {
|
|
|
|
- holder.cardNo.text = StringUtil.getResString(R.string.card_no) + bedVO.cardNo
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (TextUtils.isEmpty(bedVO.customerName)) {
|
|
|
|
- //空床位
|
|
|
|
- holder.customName.setText(R.string.str_empty)
|
|
|
|
- holder.customName.setCompoundDrawables(drawableEmpty, null, null, null)
|
|
|
|
- holder.customAge.visibility = View.GONE
|
|
|
|
- holder.doctorIcon.visibility = View.GONE
|
|
|
|
- holder.doctorTitle.visibility = View.GONE
|
|
|
|
- holder.doctorName.visibility = View.GONE
|
|
|
|
- holder.nurseIcon.visibility = View.GONE
|
|
|
|
- holder.nurseTitle.visibility = View.GONE
|
|
|
|
- holder.nurseName.visibility = View.GONE
|
|
|
|
|
|
+ //holder.doctorIcon.visibility = View.GONE
|
|
|
|
+ //holder.doctorTitle.visibility = View.GONE
|
|
|
|
+ //holder.doctorName.visibility = View.GONE
|
|
|
|
+ //holder.nurseIcon.visibility = View.GONE
|
|
|
|
+ //holder.nurseTitle.visibility = View.GONE
|
|
|
|
+ //holder.nurseName.visibility = View.GONE
|
|
} else {
|
|
} else {
|
|
//有入住
|
|
//有入住
|
|
holder.customName.text = bedVO.customerName
|
|
holder.customName.text = bedVO.customerName
|
|
- holder.customName.setCompoundDrawables(null, drawableEmpty, null, null)
|
|
|
|
holder.customAge.visibility = View.VISIBLE
|
|
holder.customAge.visibility = View.VISIBLE
|
|
- holder.customAge.text = "" + bedVO.customerAge + bedVO.customerAgeUnit
|
|
|
|
|
|
+ //holder.customAge.text = "" + bedVO.customerAge + bedVO.customerAgeUnit
|
|
if (bedVO.customerSex == 0) {
|
|
if (bedVO.customerSex == 0) {
|
|
- holder.customName.setCompoundDrawables(drawableFemale, null, null, null)
|
|
|
|
- holder.customAge.setCompoundDrawables(iconFemale, null, null, null)
|
|
|
|
|
|
+ //holder.customAge.setCompoundDrawables(iconFemale, null, null, null)
|
|
|
|
+ holder.customAge.text = "女 " + bedVO.customerAge + bedVO.customerAgeUnit
|
|
} else if (bedVO.customerSex == 1) {
|
|
} else if (bedVO.customerSex == 1) {
|
|
- holder.customName.setCompoundDrawables(drawableMale, null, null, null)
|
|
|
|
- holder.customAge.setCompoundDrawables(iconMale, null, null, null)
|
|
|
|
|
|
+ //holder.customAge.setCompoundDrawables(iconMale, null, null, null)
|
|
|
|
+ holder.customAge.text = "男 " + bedVO.customerAge + bedVO.customerAgeUnit
|
|
} else {
|
|
} else {
|
|
- holder.customName.setCompoundDrawables(drawableEmpty, null, null, null)
|
|
|
|
- holder.customAge.setCompoundDrawables(null, null, null, null)
|
|
|
|
|
|
+ //holder.customAge.setCompoundDrawables(null, null, null, null)
|
|
|
|
+ holder.customAge.text = "" + bedVO.customerAge + bedVO.customerAgeUnit
|
|
}
|
|
}
|
|
holder.doctorName.text = bedVO.doctorName
|
|
holder.doctorName.text = bedVO.doctorName
|
|
holder.nurseName.text = bedVO.nurseName
|
|
holder.nurseName.text = bedVO.nurseName
|
|
@@ -294,6 +146,13 @@ class FrameRoomAdapter : RecyclerView.Adapter<FrameRoomAdapter.BedViewHolder> {
|
|
holder.doctorIcon.visibility = View.VISIBLE
|
|
holder.doctorIcon.visibility = View.VISIBLE
|
|
holder.doctorTitle.visibility = View.VISIBLE
|
|
holder.doctorTitle.visibility = View.VISIBLE
|
|
holder.doctorName.visibility = View.VISIBLE
|
|
holder.doctorName.visibility = View.VISIBLE
|
|
|
|
+
|
|
|
|
+ Glide.with(context)
|
|
|
|
+ .load(bedVO.doctorFace)
|
|
|
|
+ //.skipMemoryCache(true)
|
|
|
|
+ .diskCacheStrategy(DiskCacheStrategy.NONE)
|
|
|
|
+ .placeholder(R.mipmap.doctor_default)//占位图
|
|
|
|
+ .into(holder.doctorIcon)
|
|
} else {
|
|
} else {
|
|
holder.doctorIcon.visibility = View.GONE
|
|
holder.doctorIcon.visibility = View.GONE
|
|
holder.doctorTitle.visibility = View.GONE
|
|
holder.doctorTitle.visibility = View.GONE
|
|
@@ -304,6 +163,13 @@ class FrameRoomAdapter : RecyclerView.Adapter<FrameRoomAdapter.BedViewHolder> {
|
|
holder.nurseIcon.visibility = View.VISIBLE
|
|
holder.nurseIcon.visibility = View.VISIBLE
|
|
holder.nurseTitle.visibility = View.VISIBLE
|
|
holder.nurseTitle.visibility = View.VISIBLE
|
|
holder.nurseName.visibility = View.VISIBLE
|
|
holder.nurseName.visibility = View.VISIBLE
|
|
|
|
+
|
|
|
|
+ Glide.with(context)
|
|
|
|
+ .load(bedVO.nurseFace)
|
|
|
|
+ //.skipMemoryCache(true)
|
|
|
|
+ .diskCacheStrategy(DiskCacheStrategy.NONE)
|
|
|
|
+ .placeholder(R.mipmap.nurse_default)//占位图
|
|
|
|
+ .into(holder.nurseIcon)
|
|
} else {
|
|
} else {
|
|
holder.nurseIcon.visibility = View.GONE
|
|
holder.nurseIcon.visibility = View.GONE
|
|
holder.nurseTitle.visibility = View.GONE
|
|
holder.nurseTitle.visibility = View.GONE
|
|
@@ -322,68 +188,20 @@ class FrameRoomAdapter : RecyclerView.Adapter<FrameRoomAdapter.BedViewHolder> {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
- if (StringUtil.notEmpty(configList[0].nurseColorRbg)) {
|
|
|
|
- holder.nursingColor1.setBackgroundColor(Color.parseColor("#" + configList[0].nurseColorRbg))
|
|
|
|
- } else {
|
|
|
|
- holder.nursingColor1.setBackgroundColor(Color.parseColor("#D7D7D7"))
|
|
|
|
- }
|
|
|
|
- holder.nursingName1.setText(configList[0].nurseConfigName)
|
|
|
|
- holder.nursingValue1.setText(configList[0].nurseOptionName)
|
|
|
|
-
|
|
|
|
- if (StringUtil.notEmpty(configList[1].nurseColorRbg)) {
|
|
|
|
- holder.nursingColor2.setBackgroundColor(Color.parseColor("#" + configList[1].nurseColorRbg))
|
|
|
|
- } else {
|
|
|
|
- holder.nursingColor2.setBackgroundColor(Color.parseColor("#D7D7D7"))
|
|
|
|
- }
|
|
|
|
- holder.nursingName2.setText(configList[1].nurseConfigName)
|
|
|
|
- holder.nursingValue2.setText(configList[1].nurseOptionName)
|
|
|
|
-
|
|
|
|
- if (StringUtil.notEmpty(configList[2].nurseColorRbg)) {
|
|
|
|
- holder.nursingColor3.setBackgroundColor(Color.parseColor("#" + configList[2].nurseColorRbg))
|
|
|
|
- } else {
|
|
|
|
- holder.nursingColor3.setBackgroundColor(Color.parseColor("#D7D7D7"))
|
|
|
|
- }
|
|
|
|
- holder.nursingName3.setText(configList[2].nurseConfigName)
|
|
|
|
- holder.nursingValue3.setText(configList[2].nurseOptionName)
|
|
|
|
-
|
|
|
|
- if (StringUtil.notEmpty(configList[3].nurseColorRbg)) {
|
|
|
|
- holder.nursingColor4.setBackgroundColor(Color.parseColor("#" + configList[3].nurseColorRbg))
|
|
|
|
- } else {
|
|
|
|
- holder.nursingColor4.setBackgroundColor(Color.parseColor("#D7D7D7"))
|
|
|
|
- }
|
|
|
|
- holder.nursingName4.setText(configList[3].nurseConfigName)
|
|
|
|
- holder.nursingValue4.setText(configList[3].nurseOptionName)
|
|
|
|
-
|
|
|
|
- if (StringUtil.notEmpty(configList[4].nurseColorRbg)) {
|
|
|
|
- holder.nursingColor5.setBackgroundColor(Color.parseColor("#" + configList[4].nurseColorRbg))
|
|
|
|
- } else {
|
|
|
|
- holder.nursingColor5.setBackgroundColor(Color.parseColor("#D7D7D7"))
|
|
|
|
|
|
+ override fun onViewRecycled(holder: BedViewHolder?) {
|
|
|
|
+ if (holder != null) {
|
|
|
|
+ Glide.clear(holder.doctorIcon)
|
|
|
|
+ Glide.clear(holder.nurseIcon)
|
|
}
|
|
}
|
|
- holder.nursingName5.setText(configList[4].nurseConfigName)
|
|
|
|
- holder.nursingValue5.setText(configList[4].nurseOptionName)
|
|
|
|
|
|
+ super.onViewRecycled(holder)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
class BedViewHolder: RecyclerView.ViewHolder {
|
|
class BedViewHolder: RecyclerView.ViewHolder {
|
|
var bedName : TextView
|
|
var bedName : TextView
|
|
var cardNo : TextView
|
|
var cardNo : TextView
|
|
- var nursingColor1 : View
|
|
|
|
- var nursingName1 : TextView
|
|
|
|
- var nursingValue1 : TextView
|
|
|
|
- var nursingColor2 : View
|
|
|
|
- var nursingName2 : TextView
|
|
|
|
- var nursingValue2 : TextView
|
|
|
|
- var nursingColor3 : View
|
|
|
|
- var nursingName3 : TextView
|
|
|
|
- var nursingValue3 : TextView
|
|
|
|
- var nursingColor4 : View
|
|
|
|
- var nursingName4 : TextView
|
|
|
|
- var nursingValue4 : TextView
|
|
|
|
- var nursingColor5 : View
|
|
|
|
- var nursingName5 : TextView
|
|
|
|
- var nursingValue5 : TextView
|
|
|
|
- var nursingView : LinearLayout
|
|
|
|
-
|
|
|
|
|
|
|
|
var customName : TextView
|
|
var customName : TextView
|
|
var customAge : TextView
|
|
var customAge : TextView
|
|
@@ -397,22 +215,6 @@ class FrameRoomAdapter : RecyclerView.Adapter<FrameRoomAdapter.BedViewHolder> {
|
|
constructor(itemView: View): super(itemView) {
|
|
constructor(itemView: View): super(itemView) {
|
|
bedName = itemView.findViewById(R.id.tv_bed_name_title)
|
|
bedName = itemView.findViewById(R.id.tv_bed_name_title)
|
|
cardNo = itemView.findViewById(R.id.tv_bed_card_no)
|
|
cardNo = itemView.findViewById(R.id.tv_bed_card_no)
|
|
- nursingColor1 = itemView.findViewById(R.id.nurse_config_item_color1)
|
|
|
|
- nursingName1 = itemView.findViewById(R.id.nurse_config_item_name1)
|
|
|
|
- nursingValue1 = itemView.findViewById(R.id.nurse_config_item_value1)
|
|
|
|
- nursingColor2 = itemView.findViewById(R.id.nurse_config_item_color2)
|
|
|
|
- nursingName2 = itemView.findViewById(R.id.nurse_config_item_name2)
|
|
|
|
- nursingValue2 = itemView.findViewById(R.id.nurse_config_item_value2)
|
|
|
|
- nursingColor3 = itemView.findViewById(R.id.nurse_config_item_color3)
|
|
|
|
- nursingName3 = itemView.findViewById(R.id.nurse_config_item_name3)
|
|
|
|
- nursingValue3 = itemView.findViewById(R.id.nurse_config_item_value3)
|
|
|
|
- nursingColor4 = itemView.findViewById(R.id.nurse_config_item_color4)
|
|
|
|
- nursingName4 = itemView.findViewById(R.id.nurse_config_item_name4)
|
|
|
|
- nursingValue4 = itemView.findViewById(R.id.nurse_config_item_value4)
|
|
|
|
- nursingColor5 = itemView.findViewById(R.id.nurse_config_item_color5)
|
|
|
|
- nursingName5 = itemView.findViewById(R.id.nurse_config_item_name5)
|
|
|
|
- nursingValue5 = itemView.findViewById(R.id.nurse_config_item_value5)
|
|
|
|
- nursingView = itemView.findViewById(R.id.ll_nurse_configs)
|
|
|
|
|
|
|
|
customName = itemView.findViewById(R.id.bed_customer_name)
|
|
customName = itemView.findViewById(R.id.bed_customer_name)
|
|
customAge = itemView.findViewById(R.id.bed_customer_age)
|
|
customAge = itemView.findViewById(R.id.bed_customer_age)
|