Commit 353ecc62 by ydl

咨询师列表页增加抗疫标签

parent c011cc87
...@@ -77,7 +77,6 @@ class ExpertSearchAdapter(private val context: Context, private val expertSearch ...@@ -77,7 +77,6 @@ class ExpertSearchAdapter(private val context: Context, private val expertSearch
// holder.tvDesc.text = itemBean.famousRemark // holder.tvDesc.text = itemBean.famousRemark
// } // }
//服务中 //服务中
if (itemBean.inConsult || itemBean.isListening) { if (itemBean.inConsult || itemBean.isListening) {
holder.imgHead_online_server.visibility = View.VISIBLE holder.imgHead_online_server.visibility = View.VISIBLE
...@@ -110,59 +109,81 @@ class ExpertSearchAdapter(private val context: Context, private val expertSearch ...@@ -110,59 +109,81 @@ class ExpertSearchAdapter(private val context: Context, private val expertSearch
}else{ }else{
holder.tvCity.text = "" holder.tvCity.text = ""
} }
//能力等级标签
if (1 == itemBean.abilityLevel){ //公益图标,不与其他图标冲突
//实习 if (1 == itemBean.hasServiceFree) {
holder.imgAbilityLevel.background = context.resources.getDrawable(R.drawable.consultant_expert_search_shixi) if (null != itemBean.tagsIcon && !TextUtils.isEmpty(itemBean.tagsIcon.serviceFreeIcon)) {
holder.imgAbilityLevel.visibility = View.VISIBLE expertSearchView.showImage(
}else if (2 == itemBean.abilityLevel){ itemBean.tagsIcon.serviceFreeIcon,
//新手 holder.imgServiceFree
holder.imgAbilityLevel.background = context.resources.getDrawable(R.drawable.consultant_expert_search_xinshou) )
holder.imgAbilityLevel.visibility = View.VISIBLE } else {
}
// else if (3 == itemBean.abilityLevel){
// //精英
// holder.imgAbilityLevel.background = context.resources.getDrawable(R.drawable.consultant_expert_search_jingying)
// holder.imgAbilityLevel.visibility = View.VISIBLE
// }
else{
holder.imgAbilityLevel.visibility = View.GONE
}
//活动图标
if (!TextUtils.isEmpty(itemBean.activityImg)){
holder.imgActivity.visibility = View.VISIBLE
GlideApp.with(context).load(itemBean.activityImg).into(holder.imgActivity)
// GlideApp.with(context).load("https://video.ydlcdn.com/2019/11/04/abdd3782c98939d0406080a6a80b8ea5.jpg").into(holder.imgActivity)
}else{
holder.imgActivity.visibility = View.GONE
}
//公益图标
if (1 == itemBean.hasServiceFree){
if (null != itemBean.tagsIcon && !TextUtils.isEmpty(itemBean.tagsIcon.serviceFreeIcon)){
expertSearchView.showImage(itemBean.tagsIcon.serviceFreeIcon,holder.imgServiceFree)
}else{
val sp = SimpleImageOpConfiger() val sp = SimpleImageOpConfiger()
sp.loadingPic = R.drawable.consultant_service_free sp.loadingPic = R.drawable.consultant_service_free
sp.errorPic = R.drawable.consultant_service_free sp.errorPic = R.drawable.consultant_service_free
expertSearchView.showImage("",holder.imgServiceFree,sp) expertSearchView.showImage("", holder.imgServiceFree, sp)
} }
holder.imgServiceFree.visibility = View.VISIBLE holder.imgServiceFree.visibility = View.VISIBLE
}else{ } else {
holder.imgServiceFree.visibility = View.GONE holder.imgServiceFree.visibility = View.GONE
} }
//新驻图标 // 展示了抗疫,就不展示其他标签
if (itemBean.isNewEnter){ if (itemBean.fightEpidemicIconShow) {
if (null != itemBean.tagsIcon && !TextUtils.isEmpty(itemBean.tagsIcon.newEnterIcon)){ itemBean.tagsIcon?.fightEpidemicIcon?.let {
expertSearchView.showImage(itemBean.tagsIcon.newEnterIcon,holder.imgNewEnter) GlideApp.with(context).load(itemBean.tagsIcon?.fightEpidemicIcon)
}else{ .into(holder.imgFightEpidemicIcon)
val sp = SimpleImageOpConfiger() holder.imgFightEpidemicIcon.visibility = View.VISIBLE
sp.loadingPic = R.drawable.consultant_new_enter
sp.errorPic = R.drawable.consultant_new_enter
expertSearchView.showImage("",holder.imgNewEnter,sp)
} }
holder.imgNewEnter.visibility = View.VISIBLE //影藏其余所有标签(除公益)
}else{ holder.imgAbilityLevel.visibility = View.GONE
holder.imgActivity.visibility = View.GONE
holder.imgNewEnter.visibility = View.GONE holder.imgNewEnter.visibility = View.GONE
} else {
//能力等级标签
if (1 == itemBean.abilityLevel) {
//实习
holder.imgAbilityLevel.background =
context.resources.getDrawable(R.drawable.consultant_expert_search_shixi)
holder.imgAbilityLevel.visibility = View.VISIBLE
} else if (2 == itemBean.abilityLevel) {
//新手
holder.imgAbilityLevel.background =
context.resources.getDrawable(R.drawable.consultant_expert_search_xinshou)
holder.imgAbilityLevel.visibility = View.VISIBLE
}
// else if (3 == itemBean.abilityLevel){
// //精英
// holder.imgAbilityLevel.background = context.resources.getDrawable(R.drawable.consultant_expert_search_jingying)
// holder.imgAbilityLevel.visibility = View.VISIBLE
// }
else {
holder.imgAbilityLevel.visibility = View.GONE
}
//活动图标
if (!TextUtils.isEmpty(itemBean.activityImg)) {
holder.imgActivity.visibility = View.VISIBLE
GlideApp.with(context).load(itemBean.activityImg).into(holder.imgActivity)
// GlideApp.with(context).load("https://video.ydlcdn.com/2019/11/04/abdd3782c98939d0406080a6a80b8ea5.jpg").into(holder.imgActivity)
} else {
holder.imgActivity.visibility = View.GONE
}
//新驻图标
if (itemBean.isNewEnter) {
if (null != itemBean.tagsIcon && !TextUtils.isEmpty(itemBean.tagsIcon.newEnterIcon)) {
expertSearchView.showImage(
itemBean.tagsIcon.newEnterIcon,
holder.imgNewEnter
)
} else {
val sp = SimpleImageOpConfiger()
sp.loadingPic = R.drawable.consultant_new_enter
sp.errorPic = R.drawable.consultant_new_enter
expertSearchView.showImage("", holder.imgNewEnter, sp)
}
holder.imgNewEnter.visibility = View.VISIBLE
} else {
holder.imgNewEnter.visibility = View.GONE
}
} }
holder.ll_feedbackRate.removeAllViews() holder.ll_feedbackRate.removeAllViews()
for (num in 1..5){ for (num in 1..5){
...@@ -330,6 +351,8 @@ class ExpertSearchAdapter(private val context: Context, private val expertSearch ...@@ -330,6 +351,8 @@ class ExpertSearchAdapter(private val context: Context, private val expertSearch
val imgHead_online_server = itemView.imgHead_online_server!! val imgHead_online_server = itemView.imgHead_online_server!!
//多少人在问询 //多少人在问询
val chat_people_in_question = itemView.people_in_question!! val chat_people_in_question = itemView.people_in_question!!
// 抗疫先锋图标
val imgFightEpidemicIcon = itemView.img_fightEpidemicIcon
init { init {
itemView.setOnClickListener { itemView.setOnClickListener {
......
...@@ -19,4 +19,8 @@ data class ExpertSearchTagsIconBean( ...@@ -19,4 +19,8 @@ data class ExpertSearchTagsIconBean(
/** /**
* 新入驻图标 * 新入驻图标
*/ */
val newEnterIcon : String?) val newEnterIcon : String?,
\ No newline at end of file /**
* 抗疫先锋图标地址
*/
var fightEpidemicIcon: String? = null)
\ No newline at end of file
...@@ -60,6 +60,10 @@ data class DoctorServiceItem( ...@@ -60,6 +60,10 @@ data class DoctorServiceItem(
*/ */
var feedbackRate: Float = 0f, var feedbackRate: Float = 0f,
/** /**
* 是否抗疫先锋图标
*/
var fightEpidemicIconShow: Boolean = false,
/**
* 评价数(咨询订单数) * 评价数(咨询订单数)
*/ */
var zixunOrderNum: Int = 0, var zixunOrderNum: Int = 0,
......
...@@ -75,18 +75,24 @@ ...@@ -75,18 +75,24 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingLeft="10dp" android:paddingLeft="8dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:layout_alignTop="@+id/tvName" android:layout_alignTop="@+id/tvName"
android:layout_alignBottom="@+id/tvName" android:layout_alignBottom="@+id/tvName"
android:layout_toEndOf="@+id/tvName" android:layout_toEndOf="@+id/tvName"
android:layout_marginStart="@dimen/platform_dp_2"> android:layout_marginStart="@dimen/platform_dp_2">
<ImageView
android:id="@+id/img_fightEpidemicIcon"
android:layout_width="53dp"
android:layout_height="@dimen/platform_dp_17"
android:layout_marginRight="4dp"
android:scaleType="centerCrop"
android:visibility="gone"/>
<!--活动图标--> <!--活动图标-->
<ImageView <ImageView
android:id="@+id/img_activity" android:id="@+id/img_activity"
android:layout_width="42dp" android:layout_width="42dp"
android:layout_height="12dp" android:layout_height="12dp"
android:layout_marginStart="@dimen/platform_dp_4"
android:layout_marginRight="4dp" android:layout_marginRight="4dp"
android:visibility="gone"/> android:visibility="gone"/>
<!--公益图标--> <!--公益图标-->
......
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