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
5d070de9
Commit
5d070de9
authored
Jun 24, 2021
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:im-灵犀2.0-更新本地消息
parent
a358fcc2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
126 additions
and
28 deletions
+126
-28
CustomAttachLingxiWhichQuestion.java
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachLingxiWhichQuestion.java
+3
-0
MsgViewHolderLingxiWhichQuestion.java
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderLingxiWhichQuestion.java
+115
-20
AdapterLingxiMultipleChoice.kt
m-im/src/main/java/com/yidianling/im/session/viewholder/adapter/AdapterLingxiMultipleChoice.kt
+1
-1
AdapterLingxiWhichQuestion.kt
m-im/src/main/java/com/yidianling/im/session/viewholder/adapter/AdapterLingxiWhichQuestion.kt
+5
-6
LingxiWhichQuestionBean.kt
m-im/src/main/java/com/yidianling/im/session/viewholder/bean/LingxiWhichQuestionBean.kt
+2
-1
No files found.
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachLingxiWhichQuestion.java
View file @
5d070de9
...
@@ -2,6 +2,7 @@ package com.yidianling.im.session.extension;
...
@@ -2,6 +2,7 @@ package com.yidianling.im.session.extension;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yidianling.common.tools.LogUtil
;
import
com.yidianling.im.session.viewholder.bean.LingxiWhichQuestionBean
;
import
com.yidianling.im.session.viewholder.bean.LingxiWhichQuestionBean
;
import
com.yidianling.im.session.viewholder.bean.QuestionItemBean
;
import
com.yidianling.im.session.viewholder.bean.QuestionItemBean
;
import
com.yidianling.uikit.custom.http.response.RecommendExpertBean
;
import
com.yidianling.uikit.custom.http.response.RecommendExpertBean
;
...
@@ -36,6 +37,7 @@ public class CustomAttachLingxiWhichQuestion extends CustomAttachment {
...
@@ -36,6 +37,7 @@ public class CustomAttachLingxiWhichQuestion extends CustomAttachment {
this
.
questionId
=
data
.
getString
(
QUESTIONID
);
this
.
questionId
=
data
.
getString
(
QUESTIONID
);
this
.
questionTitle
=
data
.
getString
(
QUESTIONTITLE
);
this
.
questionTitle
=
data
.
getString
(
QUESTIONTITLE
);
this
.
selectType
=
data
.
getString
(
SELECTTYPE
);
this
.
selectType
=
data
.
getString
(
SELECTTYPE
);
LogUtil
.
e
(
"aaaaa"
+
data
.
getString
(
SELECTVALS
));
this
.
selectVals
=(
ArrayList
<
QuestionItemBean
>)
JSON
.
parseArray
(
data
.
getString
(
SELECTVALS
),
QuestionItemBean
.
class
);
this
.
selectVals
=(
ArrayList
<
QuestionItemBean
>)
JSON
.
parseArray
(
data
.
getString
(
SELECTVALS
),
QuestionItemBean
.
class
);
}
}
...
@@ -51,4 +53,5 @@ public class CustomAttachLingxiWhichQuestion extends CustomAttachment {
...
@@ -51,4 +53,5 @@ public class CustomAttachLingxiWhichQuestion extends CustomAttachment {
data
.
put
(
SELECTVALS
,
selectVals
);
data
.
put
(
SELECTVALS
,
selectVals
);
return
data
;
return
data
;
}
}
}
}
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderLingxiWhichQuestion.java
View file @
5d070de9
This diff is collapsed.
Click to expand it.
m-im/src/main/java/com/yidianling/im/session/viewholder/adapter/AdapterLingxiMultipleChoice.kt
View file @
5d070de9
...
@@ -41,7 +41,7 @@ class AdapterLingxiMultipleChoice : RecyclerView.Adapter<AdapterLingxiMultipleCh
...
@@ -41,7 +41,7 @@ class AdapterLingxiMultipleChoice : RecyclerView.Adapter<AdapterLingxiMultipleCh
}
}
override
fun
onBindViewHolder
(
holder
:
ViewHolder
,
position
:
Int
)
{
override
fun
onBindViewHolder
(
holder
:
ViewHolder
,
position
:
Int
)
{
holder
.
tvWhichQuestion
.
text
=
tagList
[
position
].
nam
e
holder
.
tvWhichQuestion
.
text
=
tagList
[
position
].
valu
e
holder
.
tvWhichQuestion
.
setOnClickListener
{
holder
.
tvWhichQuestion
.
setOnClickListener
{
onItemClickListener
?.
onMultipleItemClick
(
onItemClickListener
?.
onMultipleItemClick
(
tagList
[
position
],
position
tagList
[
position
],
position
...
...
m-im/src/main/java/com/yidianling/im/session/viewholder/adapter/AdapterLingxiWhichQuestion.kt
View file @
5d070de9
...
@@ -23,7 +23,6 @@ import kotlin.properties.Delegates
...
@@ -23,7 +23,6 @@ import kotlin.properties.Delegates
class
AdapterLingxiWhichQuestion
:
RecyclerView
.
Adapter
<
AdapterLingxiWhichQuestion
.
ViewHolder
>()
{
class
AdapterLingxiWhichQuestion
:
RecyclerView
.
Adapter
<
AdapterLingxiWhichQuestion
.
ViewHolder
>()
{
private
lateinit
var
tagList
:
List
<
QuestionItemBean
>
private
lateinit
var
tagList
:
List
<
QuestionItemBean
>
private
var
isSingleOrMultiple
by
Delegates
.
notNull
<
Boolean
>()
private
var
isSingleOrMultiple
by
Delegates
.
notNull
<
Boolean
>()
private
var
onItemClickListener
:
OnQuestionlItemClickListener
?
=
null
private
var
onItemClickListener
:
OnQuestionlItemClickListener
?
=
null
class
ViewHolder
(
itemView
:
View
)
:
class
ViewHolder
(
itemView
:
View
)
:
...
@@ -46,7 +45,7 @@ class AdapterLingxiWhichQuestion : RecyclerView.Adapter<AdapterLingxiWhichQuesti
...
@@ -46,7 +45,7 @@ class AdapterLingxiWhichQuestion : RecyclerView.Adapter<AdapterLingxiWhichQuesti
}
}
override
fun
onBindViewHolder
(
holder
:
ViewHolder
,
position
:
Int
)
{
override
fun
onBindViewHolder
(
holder
:
ViewHolder
,
position
:
Int
)
{
holder
.
tvWhichQuestion
.
text
=
tagList
[
position
].
nam
e
holder
.
tvWhichQuestion
.
text
=
tagList
[
position
].
valu
e
if
(
tagList
[
position
].
isSelected
!!
){
if
(
tagList
[
position
].
isSelected
!!
){
holder
.
tvWhichQuestion
.
background
=
ContextCompat
.
getDrawable
(
holder
.
itemView
.
context
,
R
.
drawable
.
im_background_18dp_1da1f2
)
holder
.
tvWhichQuestion
.
background
=
ContextCompat
.
getDrawable
(
holder
.
itemView
.
context
,
R
.
drawable
.
im_background_18dp_1da1f2
)
holder
.
tvWhichQuestion
.
setTextColor
(
ContextCompat
.
getColor
(
holder
.
itemView
.
context
,
R
.
color
.
white
))
holder
.
tvWhichQuestion
.
setTextColor
(
ContextCompat
.
getColor
(
holder
.
itemView
.
context
,
R
.
color
.
white
))
...
@@ -54,10 +53,10 @@ class AdapterLingxiWhichQuestion : RecyclerView.Adapter<AdapterLingxiWhichQuesti
...
@@ -54,10 +53,10 @@ class AdapterLingxiWhichQuestion : RecyclerView.Adapter<AdapterLingxiWhichQuesti
holder
.
tvWhichQuestion
.
background
=
ContextCompat
.
getDrawable
(
holder
.
itemView
.
context
,
R
.
drawable
.
im_background_18dp_e8f5fe
)
holder
.
tvWhichQuestion
.
background
=
ContextCompat
.
getDrawable
(
holder
.
itemView
.
context
,
R
.
drawable
.
im_background_18dp_e8f5fe
)
holder
.
tvWhichQuestion
.
setTextColor
(
ContextCompat
.
getColor
(
holder
.
itemView
.
context
,
R
.
color
.
platform_color_1DA1F2
))
holder
.
tvWhichQuestion
.
setTextColor
(
ContextCompat
.
getColor
(
holder
.
itemView
.
context
,
R
.
color
.
platform_color_1DA1F2
))
}
}
holder
.
tvWhichQuestion
.
setOnClickListener
{
holder
.
tvWhichQuestion
.
setOnClickListener
{
onItemClickListener
?.
onItemClick
(
onItemClickListener
?.
onItemClick
(
tagList
[
position
],
position
)
tagList
[
position
],
position
)
}
}
if
(
isSingleOrMultiple
){
if
(
isSingleOrMultiple
){
holder
.
tvWhichQuestion
.
setPadding
(
RxImageTool
.
dip2px
(
62f
),
RxImageTool
.
dp2px
(
8f
),
RxImageTool
.
dip2px
(
62f
),
RxImageTool
.
dp2px
(
8f
))
holder
.
tvWhichQuestion
.
setPadding
(
RxImageTool
.
dip2px
(
62f
),
RxImageTool
.
dp2px
(
8f
),
RxImageTool
.
dip2px
(
62f
),
RxImageTool
.
dp2px
(
8f
))
}
}
...
...
m-im/src/main/java/com/yidianling/im/session/viewholder/bean/LingxiWhichQuestionBean.kt
View file @
5d070de9
...
@@ -13,6 +13,6 @@ data class LingxiWhichQuestionBean(
...
@@ -13,6 +13,6 @@ data class LingxiWhichQuestionBean(
)
)
data class
QuestionItemBean
(
data class
QuestionItemBean
(
var
id
:
String
?,
var
id
:
String
?,
var
nam
e
:
String
?,
var
valu
e
:
String
?,
var
isSelected
:
Boolean
?=
false
var
isSelected
:
Boolean
?=
false
)
)
\ No newline at end of file
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