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
9d2467ed
Commit
9d2467ed
authored
Jul 03, 2021
by
刘鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/4.2.60' into 4.2.60
parents
8de7acb0
9b1cb0a9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
84 deletions
+33
-84
MsgViewHolderLingxiAnswerQuestion.java
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderLingxiAnswerQuestion.java
+1
-1
MsgViewHolderLingxiWhichQuestion.java
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderLingxiWhichQuestion.java
+31
-19
YDLMessageFragment.java
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
+1
-0
im_female_icon.webp
m-im/src/main/res/drawable-xhdpi/im_female_icon.webp
+0
-0
im_male_icon.webp
m-im/src/main/res/drawable-xhdpi/im_male_icon.webp
+0
-0
im_nim_lingxi_men_female.xml
m-im/src/main/res/layout/im_nim_lingxi_men_female.xml
+0
-64
No files found.
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderLingxiAnswerQuestion.java
View file @
9d2467ed
...
...
@@ -51,7 +51,7 @@ public class MsgViewHolderLingxiAnswerQuestion extends MsgViewHolderBase {
}
}
if
(
itemBeans
.
size
()==
1
){
if
(
itemBeans
.
size
()==
1
&&!
itemBeans
.
get
(
0
).
getName
().
contains
(
"其他"
)
){
answer_question
.
setText
(
itemBeans
.
get
(
0
).
getName
());
}
else
{
answer_question
.
setText
(
sb
.
toString
());
...
...
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderLingxiWhichQuestion.java
View file @
9d2467ed
...
...
@@ -67,7 +67,6 @@ public class MsgViewHolderLingxiWhichQuestion extends MsgViewHolderBase implemen
private
String
questionPaperId
;
private
String
questionId
;
private
ArrayList
<
AnswersItem
>
answersItems
=
new
ArrayList
<>();
private
ArrayList
<
String
>
answersItemsMap
=
new
ArrayList
<>();
private
ArrayList
<
String
>
multipleAnswers
=
new
ArrayList
<>();
public
MsgViewHolderLingxiWhichQuestion
(
BaseMultiItemFetchLoadAdapter
adapter
)
{
...
...
@@ -83,8 +82,6 @@ public class MsgViewHolderLingxiWhichQuestion extends MsgViewHolderBase implemen
return
R
.
layout
.
im_nim_lingxi_which_question
;
case
"check"
:
//请问是发生了什么事情导致的呢?(多选)
return
R
.
layout
.
im_nim_lingxi_multiple_choice
;
case
"3"
:
//您是先生还是女生
return
R
.
layout
.
im_nim_lingxi_men_female
;
default
:
return
R
.
layout
.
im_nim_lingxi_which_question
;
}
...
...
@@ -121,7 +118,6 @@ public class MsgViewHolderLingxiWhichQuestion extends MsgViewHolderBase implemen
questionList
.
get
(
i
).
setSelected
(
false
);
if
(
questionList
.
get
(
i
).
getName
().
length
()
>
5
)
{
isSingleChoice
=
true
;
break
;
}
}
if
(
customAttachLingxiWhichQuestion
.
type
!=
null
)
{
...
...
@@ -138,10 +134,7 @@ public class MsgViewHolderLingxiWhichQuestion extends MsgViewHolderBase implemen
break
;
}
}
UpdateFromLocalExtention
();
}
private
void
UpdateFromLocalExtention
()
{
...
...
@@ -201,12 +194,6 @@ public class MsgViewHolderLingxiWhichQuestion extends MsgViewHolderBase implemen
EventBus
.
getDefault
().
post
(
new
MultipleSelectedEvent
(
null
,
null
,
new
MultipleAnswerBean
(
examId
,
questionPaperId
,
ImIn
.
INSTANCE
.
getUserInfo
().
getUid
(),
questionId
,
answersItems
,
message
.
getFromAccount
()),
false
));
/* for (int i=0;i<answersItems.size();i++){
answersItemsMap.add(answersItems.get(i).getName());
}
updateLocalMsg(null,answersItemsMap);*/
});
multiple_choice_title
.
setText
(
customAttachLingxiWhichQuestion
.
name
);
adapterLingxiMultipleChoice
=
new
AdapterLingxiMultipleChoice
();
...
...
@@ -236,17 +223,42 @@ public class MsgViewHolderLingxiWhichQuestion extends MsgViewHolderBase implemen
public
void
onItemClick
(
@NotNull
QuestionItemBean
itemBean
,
int
position
)
{
if
(
isClickable
)
{
for
(
int
i
=
0
;
i
<
questionList
.
size
();
i
++)
{
if
(
questionList
.
get
(
i
).
isSelected
())
{
if
(
i
==
position
)
{
if
(
questionList
.
get
(
i
).
getName
().
contains
(
"其他"
)){
isClickable
=
true
;
questionList
.
get
(
i
).
setSelected
(
false
);
selectedStr
.
remove
(
questionList
.
get
(
i
).
getName
());
break
;
}
}
}
else
{
if
(
i
==
position
)
{
questionList
.
get
(
i
).
setSelected
(
true
);
selectedStr
.
add
(
questionList
.
get
(
i
).
getName
());
}
}
questionList
.
get
(
i
).
setSelected
(
i
==
position
);
}
adapterLingxiWhichQuestion
.
setTagData
(
questionList
,
isSingleChoice
);
isClickable
=
false
;
answersItems
.
add
(
new
AnswersItem
(
questionList
.
get
(
position
).
getId
(),
questionList
.
get
(
position
).
getName
(),
""
,
questionList
.
get
(
position
).
getRelates
()));
//请求接口发送所选题目
answerLingxiQuestion
(
examId
,
questionPaperId
,
ImIn
.
INSTANCE
.
getUserInfo
().
getUid
().
toString
(),
questionId
,
answersItems
);
//更新本地消息
updateLocalMsg
(
position
,
null
);
stringBuffer
.
delete
(
2
,
stringBuffer
.
length
());
for
(
int
i
=
0
;
i
<
selectedStr
.
size
();
i
++)
{
stringBuffer
.
append
(
"#"
).
append
(
selectedStr
.
get
(
i
));
}
isOthers
=
questionList
.
get
(
position
).
getName
().
contains
(
"其他"
);
if
(!
isOthers
){
isClickable
=
false
;
//请求接口发送所选题目
answerLingxiQuestion
(
examId
,
questionPaperId
,
ImIn
.
INSTANCE
.
getUserInfo
().
getUid
().
toString
(),
questionId
,
answersItems
);
//更新本地消息
updateLocalMsg
(
position
,
null
);
}
else
{
EventBus
.
getDefault
().
post
(
new
MultipleSelectedEvent
(
stringBuffer
.
toString
(),
new
OthersState
(
isOthers
,
questionList
.
get
(
position
).
isSelected
()),
new
MultipleAnswerBean
(
examId
,
questionPaperId
,
ImIn
.
INSTANCE
.
getUserInfo
().
getUid
(),
questionId
,
answersItems
,
message
.
getFromAccount
()),
false
));
}
}
}
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
View file @
9d2467ed
...
...
@@ -1071,6 +1071,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
isOthers
=
event
.
getOthersState
().
getOthersSelect
();
inputPanel
.
onlyShowTextEnd
();
}
question_multiple
.
setText
(
event
.
getStrSelected
());
}
else
{
question_multiple
.
setText
(
event
.
getStrSelected
());
}
...
...
m-im/src/main/res/drawable-xhdpi/im_female_icon.webp
deleted
100644 → 0
View file @
8de7acb0
File deleted
m-im/src/main/res/drawable-xhdpi/im_male_icon.webp
deleted
100644 → 0
View file @
8de7acb0
File deleted
m-im/src/main/res/layout/im_nim_lingxi_men_female.xml
deleted
100644 → 0
View file @
8de7acb0
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:orientation=
"horizontal"
android:background=
"@drawable/im_custom_message_round_white_6dp_bg"
android:paddingStart=
"@dimen/platform_dp_12"
android:paddingEnd=
"@dimen/platform_dp_12"
android:paddingBottom=
"@dimen/platform_dp_12"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"您是先生还是女生呢?"
android:textSize=
"@dimen/im_text_size_17"
android:textColor=
"@color/im_color_242424"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
android:id=
"@+id/men_female_title"
>
</TextView>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"先生"
android:textColor=
"@color/white"
android:gravity=
"center"
android:background=
"@drawable/im_background_18dp_1da1f2"
android:paddingTop=
"@dimen/platform_dp_8"
android:paddingBottom=
"@dimen/platform_dp_8"
app:layout_constraintTop_toBottomOf=
"@id/men_female_title"
android:layout_marginTop=
"@dimen/platform_dp_16"
app:layout_constraintStart_toStartOf=
"@id/men_female_title"
android:id=
"@+id/tv_men"
android:drawableStart=
"@drawable/im_male_icon"
android:paddingStart=
"@dimen/platform_dp_28"
android:paddingEnd=
"@dimen/platform_dp_28"
android:drawablePadding=
"@dimen/platform_dp_5"
>
</TextView>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"女生"
android:textColor=
"@color/white"
android:gravity=
"center"
android:background=
"@drawable/im_background_18dp_1da1f2"
android:paddingTop=
"@dimen/platform_dp_8"
android:paddingBottom=
"@dimen/platform_dp_8"
app:layout_constraintStart_toEndOf=
"@id/tv_men"
app:layout_constraintTop_toTopOf=
"@id/tv_men"
app:layout_constraintBottom_toBottomOf=
"@id/tv_men"
android:layout_marginStart=
"@dimen/platform_dp_20"
android:id=
"@+id/tv_female"
android:drawableStart=
"@drawable/im_female_icon"
android:paddingStart=
"@dimen/platform_dp_28"
android:paddingEnd=
"@dimen/platform_dp_28"
android:drawablePadding=
"@dimen/platform_dp_5"
>
</TextView>
</androidx.constraintlayout.widget.ConstraintLayout>
\ 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