Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
353ecc62
Commit
353ecc62
authored
Feb 17, 2020
by
ydl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
咨询师列表页增加抗疫标签
parent
c011cc87
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
69 additions
and
32 deletions
+69
-32
ExpertSearchAdapter.kt
m-consultant/src/main/java/com/yidianling/consultant/adapter/ExpertSearchAdapter.kt
+51
-28
ExpertSearchTagsIconBean.kt
m-consultant/src/main/java/com/yidianling/consultant/bean/ExpertSearchTagsIconBean.kt
+6
-2
DoctorServiceItem.kt
m-consultant/src/main/java/com/yidianling/consultant/model/bean/DoctorServiceItem.kt
+4
-0
consultant_expert_search_item_view.xml
m-consultant/src/main/res/layout/consultant_expert_search_item_view.xml
+8
-2
No files found.
m-consultant/src/main/java/com/yidianling/consultant/adapter/ExpertSearchAdapter.kt
View file @
353ecc62
...
...
@@ -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
{
...
...
m-consultant/src/main/java/com/yidianling/consultant/bean/ExpertSearchTagsIconBean.kt
View file @
353ecc62
...
...
@@ -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
m-consultant/src/main/java/com/yidianling/consultant/model/bean/DoctorServiceItem.kt
View file @
353ecc62
...
...
@@ -60,6 +60,10 @@ data class DoctorServiceItem(
*/
var
feedbackRate
:
Float
=
0f
,
/**
* 是否抗疫先锋图标
*/
var
fightEpidemicIconShow
:
Boolean
=
false
,
/**
* 评价数(咨询订单数)
*/
var
zixunOrderNum
:
Int
=
0
,
...
...
m-consultant/src/main/res/layout/consultant_expert_search_item_view.xml
View file @
353ecc62
...
...
@@ -75,18 +75,24 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:paddingLeft=
"
10
dp"
android:paddingLeft=
"
8
dp"
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"
/>
<!--公益图标-->
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment