Commit a27a2abf by upwork.021

feat: 代码优化

parent 61719190
......@@ -6,7 +6,7 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.49.65",
"m-consultant" : "0.0.60.17",
"m-consultant" : "0.0.60.18",
"m-fm" : "0.0.30.04",
"m-user" : "0.0.62.04",
"m-home" : "0.0.23.17",
......
......@@ -226,18 +226,20 @@ class ExpertSearchAdapter(
holder.tvTeamCertifications.text = itemBean.teamCertifications
//咨询师标签
holder.ll_tags.removeAllViews()
if (itemBean.tagList.isNotEmpty()){
for (tag in itemBean.tagList){
val view = LayoutInflater.from(context).inflate(R.layout.consultant_item_tag, holder.ll_tags, false)
view.tvTag.text = tag.tagName
if (tag.isHigh==1){
view.tvTag.setBackgroundResource(R.drawable.consultant_bg_radius_line_eb892c)
view.tvTag.setTextColor(ContextCompat.getColor(context,R.color.color_EB892C))
}else{
view.tvTag.setBackgroundResource(R.drawable.consultant_bg_radius_line_gray_1)
view.tvTag.setTextColor(ContextCompat.getColor(context,R.color.platform_color_E0E0E0))
itemBean.tagList?.let {
if (it.isNotEmpty()){
for (tag in itemBean.tagList){
val view = LayoutInflater.from(context).inflate(R.layout.consultant_item_tag, holder.ll_tags, false)
view.tvTag.text = tag.tagName
if (tag.isHigh==1){
view.tvTag.setBackgroundResource(R.drawable.consultant_bg_radius_line_eb892c)
view.tvTag.setTextColor(ContextCompat.getColor(context,R.color.color_EB892C))
}else{
view.tvTag.setBackgroundResource(R.drawable.consultant_bg_radius_line_gray_1)
view.tvTag.setTextColor(ContextCompat.getColor(context,R.color.platform_color_E0E0E0))
}
holder.ll_tags.addView(view)
}
holder.ll_tags.addView(view)
}
}
//帮助人数
......
......@@ -135,7 +135,7 @@ data class DoctorServiceItem(
/**
* 新标签分类
*/
val tagList: ArrayList<TagBean>
val tagList: ArrayList<TagBean>?
)
data class TagBean(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment