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
11ddfd12
Commit
11ddfd12
authored
Jun 28, 2021
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:im-灵犀2.0-用户显示灵犀的正在输入中
parent
6b09caef
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
57 additions
and
10 deletions
+57
-10
MultipleSelectedEvent.kt
m-im/src/main/java/com/yidianling/im/event/MultipleSelectedEvent.kt
+3
-1
MsgViewHolderLingxiWhichQuestion.java
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderLingxiWhichQuestion.java
+7
-2
YDLP2PMessageActivity.java
m-im/src/main/java/com/yidianling/uikit/business/session/activity/YDLP2PMessageActivity.java
+4
-4
YDLMessageFragment.java
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
+6
-0
InputPanel.java
m-im/src/main/java/com/yidianling/uikit/business/session/module/input/InputPanel.java
+27
-1
TitleBarBottom.java
m-im/src/main/java/com/yidianling/uikit/custom/widget/TitleBarBottom.java
+8
-1
im_ydl_nim_message_fragment.xml
m-im/src/main/res_uikit/layout/im_ydl_nim_message_fragment.xml
+2
-1
No files found.
m-im/src/main/java/com/yidianling/im/event/MultipleSelectedEvent.kt
View file @
11ddfd12
package
com.yidianling.im.event
public
class
MultipleSelectedEvent
(
val
strSelected
:
String
val
strSelected
:
String
,
var
isOthers
:
Boolean
)
\ No newline at end of file
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderLingxiWhichQuestion.java
View file @
11ddfd12
...
...
@@ -117,6 +117,7 @@ public class MsgViewHolderLingxiWhichQuestion extends MsgViewHolderBase implemen
break
;
}
}
questionList
.
get
(
0
).
setName
(
"其他"
);
if
(
customAttachLingxiWhichQuestion
.
type
!=
null
){
switch
(
customAttachLingxiWhichQuestion
.
type
){
case
"radio"
:
//您想要咨询下列哪类的问题?(单选)
...
...
@@ -230,13 +231,17 @@ public class MsgViewHolderLingxiWhichQuestion extends MsgViewHolderBase implemen
}
}
}
confirm_multiple_choice
.
setText
(
selectedStr
.
size
(
));
confirm_multiple_choice
.
setText
(
String
.
format
(
"确定(%d)"
,
selectedStr
.
size
()
));
stringBuffer
.
delete
(
2
,
stringBuffer
.
length
());
for
(
int
i
=
0
;
i
<
selectedStr
.
size
();
i
++){
stringBuffer
.
append
(
"#"
).
append
(
selectedStr
.
get
(
i
));
}
EventBus
.
getDefault
().
post
(
new
MultipleSelectedEvent
(
stringBuffer
.
toString
()));
EventBus
.
getDefault
().
post
(
new
MultipleSelectedEvent
(
stringBuffer
.
toString
()
,
false
));
adapterLingxiMultipleChoice
.
setTagData
(
questionList
);
if
(
questionList
.
get
(
position
).
getName
().
contains
(
"其他"
)){
//唤起输入键盘,隐藏标签、图片等其他布局
EventBus
.
getDefault
().
post
(
new
MultipleSelectedEvent
(
stringBuffer
.
toString
(),
true
));
}
}
private
void
updateLocalMsg
(
Integer
position
)
{
//更新本地消息
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/activity/YDLP2PMessageActivity.java
View file @
11ddfd12
...
...
@@ -223,11 +223,11 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
try
{
JSONObject
json
=
JSON
.
parseObject
(
content
);
int
id
=
json
.
getIntValue
(
"id"
);
String
oldName
=
tb
.
getTitle
();
if
(
id
==
1
)
{
// 正在输入
ToastUtil
.
toastShort
(
this
,
"对方正在输入..."
);
}
else
{
// ToastUtil.toastShort(this, "command: " + content);
tb
.
setTitle
(
"对方正在输入..."
);
}
else
if
(
id
==
2
){
tb
.
setTitle
(
oldName
);
}
}
catch
(
Exception
e
)
{
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
View file @
11ddfd12
...
...
@@ -1079,8 +1079,13 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
}
public
void
onEvent
(
MultipleSelectedEvent
event
){
if
(
event
.
isOthers
()){
//用户点击了其他事件
inputPanel
.
onlyShowTextStart
();
}
else
{
question_multiple
.
setText
(
event
.
getStrSelected
());
}
}
public
boolean
onBackPressed
()
{
return
inputPanel
.
collapse
(
true
)
||
messageListPanel
.
onBackPressed
()
||
openOrCloseCommonQuestionLayout
(
false
);
}
...
...
@@ -1129,6 +1134,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
messageListPanel
.
setChattingBackground
(
customization
.
backgroundUri
,
customization
.
backgroundColor
);
}
userIsInPage
(
"66"
,
"用户在当前页面"
,
sessionId
,
ImIn
.
INSTANCE
.
getUserInfo
().
getUid
());
}
private
void
initAitManager
()
{
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/module/input/InputPanel.java
View file @
11ddfd12
...
...
@@ -144,6 +144,8 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
private
String
sendText
=
""
;
private
Boolean
onlyShowInputTest
=
false
;
/***设置输入框内容*/
public
void
setInputContent
(
String
content
)
{
messageEditText
.
setText
(
content
==
null
?
""
:
content
);
...
...
@@ -654,6 +656,29 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
imm
.
hideSoftInputFromWindow
(
messageEditText
.
getWindowToken
(),
0
);
messageEditText
.
clearFocus
();
}
/**
* 灵犀-点击其他时候-只显示输入框,不显示其他选项
*/
public
void
onlyShowTextStart
()
{
showInputMethod
(
messageEditText
);
onlyShowInputTest
=
true
;
//隐藏左边语音布局
textAudioSwitchLayout
.
setVisibility
(
View
.
INVISIBLE
);
//隐藏右边表情和加号布局
emojiButtonInInputBar
.
setVisibility
(
View
.
GONE
);
moreFuntionButtonInInputBar
.
setVisibility
(
View
.
GONE
);
}
/**
* 灵犀-点击其他时候-只显示输入框,不显示其他选项
*/
public
void
onlyShowTextEnd
()
{
onlyShowInputTest
=
false
;
//隐藏左边语音布局
textAudioSwitchLayout
.
setVisibility
(
View
.
VISIBLE
);
//隐藏右边表情和加号布局
emojiButtonInInputBar
.
setVisibility
(
View
.
VISIBLE
);
moreFuntionButtonInInputBar
.
setVisibility
(
View
.
VISIBLE
);
}
/**
* 隐藏语音布局
...
...
@@ -713,7 +738,6 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
container
.
proxy
.
onInputPanelExpand
();
}
/**
* 显示更多布局
*/
...
...
@@ -766,9 +790,11 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
sendMessageButtonInInputBar
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
sendMessageButtonInInputBar
.
setVisibility
(
View
.
GONE
);
if
(!
onlyShowInputTest
){
moreFuntionButtonInInputBar
.
setVisibility
(
View
.
VISIBLE
);
}
}
}
/**
* *************** IEmojiSelectedListener ***************
...
...
m-im/src/main/java/com/yidianling/uikit/custom/widget/TitleBarBottom.java
View file @
11ddfd12
...
...
@@ -146,7 +146,14 @@ public class TitleBarBottom extends RelativeLayout {
setmMinTitleVisiable
(
GONE
);
}
}
/**
* 获得头部的内容
*
*
*/
public
String
getTitle
(
)
{
return
tv_center_title
.
getText
().
toString
();
}
/**
* 设置小标题文字
*/
...
...
m-im/src/main/res_uikit/layout/im_ydl_nim_message_fragment.xml
View file @
11ddfd12
...
...
@@ -614,6 +614,7 @@
android:visibility=
"gone"
/>
<include
layout=
"@layout/im_nim_message_activity_bottom_layout"
/>
<include
layout=
"@layout/im_nim_message_activity_bottom_layout"
/>
</LinearLayout>
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