Commit 353ecc62 by ydl

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

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