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
762a0474
Commit
762a0474
authored
Jul 09, 2021
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:UI修改
parent
e9316337
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
67 additions
and
48 deletions
+67
-48
MsgViewHolderLingxiAnswerQuestion.java
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderLingxiAnswerQuestion.java
+1
-1
MsgViewHolderLingxiFirstQuestion.java
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderLingxiFirstQuestion.java
+17
-1
YDLMessageFragment.java
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
+7
-5
MessageListPanelEx.java
m-im/src/main/java/com/yidianling/uikit/business/session/module/list/MessageListPanelEx.java
+2
-2
im_nim_lingxi_first_question.xml
m-im/src/main/res/layout/im_nim_lingxi_first_question.xml
+11
-9
im_nim_lingxi_multiple_choice.xml
m-im/src/main/res/layout/im_nim_lingxi_multiple_choice.xml
+29
-30
No files found.
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderLingxiAnswerQuestion.java
View file @
762a0474
...
...
@@ -71,7 +71,7 @@ public class MsgViewHolderLingxiAnswerQuestion extends MsgViewHolderBase {
if
(
others
==
null
){
answer_question
.
setText
(
sb
.
toString
());
}
else
{
SpanUtils
.
with
(
answer_question
).
append
(
sb
).
append
(
"\r\n\
n"
).
setFontSize
(
10
).
append
(
others
).
create
();
SpanUtils
.
with
(
answer_question
).
append
(
sb
).
append
(
"\r\n\
r\n"
).
setFontSize
(
15
).
append
(
others
).
create
();
}
}
}
...
...
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderLingxiFirstQuestion.java
View file @
762a0474
package
com
.
yidianling
.
im
.
session
.
viewholder
;
import
android.view.View
;
import
android.widget.FrameLayout
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
com.ydl.webview.H5Params
;
import
com.ydl.webview.NewH5Activity
;
import
com.ydl.ydl_image.module.GlideApp
;
import
com.yidianling.common.tools.LogUtil
;
import
com.yidianling.im.R
;
import
com.yidianling.im.session.extension.CustomAttachLingxiFirstQuestion
;
import
com.yidianling.nimbase.common.ui.recyclerview.adapter.BaseMultiItemFetchLoadAdapter
;
...
...
@@ -33,18 +37,30 @@ public class MsgViewHolderLingxiFirstQuestion extends MsgViewHolderBase {
@Override
protected
void
bindContentView
()
{
avatarRight
.
setVisibility
(
View
.
INVISIBLE
);
jumpUrl
=((
CustomAttachLingxiFirstQuestion
)
message
.
getAttachment
()).
greetUrl
;
jumpVideo
=((
CustomAttachLingxiFirstQuestion
)
message
.
getAttachment
()).
greetVideo
;
imageUrl
=((
CustomAttachLingxiFirstQuestion
)
message
.
getAttachment
()).
greetImage
;
GlideApp
.
with
(
context
)
.
load
(
imageUrl
)
.
into
(
imageView
);
contentContainer
.
postDelayed
(
new
Runnable
()
{
@Override
public
void
run
()
{
FrameLayout
.
LayoutParams
params
=
new
FrameLayout
.
LayoutParams
(
contentContainer
.
getWidth
(),
(
contentContainer
.
getHeight
()/
15
)*
13
);
imageView
.
setLayoutParams
(
params
);
imageView
.
invalidate
();
imageView
.
requestLayout
();
}
},
200
);
}
@Override
protected
void
onItemClick
()
{
super
.
onItemClick
();
if
(
jumpUrl
.
length
()>
0
&&
jumpUrl
!=
null
){
if
(
jumpUrl
!=
null
&&
jumpUrl
.
length
()>
0
){
//跳转URL
NewH5Activity
.
start
(
context
,
new
H5Params
(
jumpUrl
,
null
));
}
/* else if (jumpVideo!=null&&!jumpVideo.isEmpty()){
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
View file @
762a0474
...
...
@@ -1027,8 +1027,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
messageListPanel
.
onResume
();
NIMClient
.
getService
(
MsgService
.
class
).
setChattingAccount
(
sessionId
,
sessionType
);
getActivity
().
setVolumeControlStream
(
AudioManager
.
STREAM_VOICE_CALL
);
// 默认使用听筒播放
userIsInPage
(
"66"
,
"用户在当前页面"
,
sessionId
,
ImIn
.
INSTANCE
.
getUserInfo
().
getUid
());
messageListPanel
.
scrollToBottom
();
}
...
...
@@ -1046,9 +1045,14 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
if
(
aitManager
!=
null
)
{
aitManager
.
reset
();
}
userIsInPage
(
"67"
,
"用户离开当前页面"
,
sessionId
,
ImIn
.
INSTANCE
.
getUserInfo
().
getUid
());
}
@Override
public
void
onStop
()
{
super
.
onStop
();
userIsInPage
(
"67"
,
"用户离开当前页面"
,
sessionId
,
ImIn
.
INSTANCE
.
getUserInfo
().
getUid
());
}
ArrayList
<
AnswersItem
>
answersItems
=
new
ArrayList
<>();
public
void
onEvent
(
MultipleSelectedEvent
event
){
if
(
event
.
getOthersState
()!=
null
){
...
...
@@ -1212,8 +1216,6 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
if
(
customization
!=
null
)
{
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/list/MessageListPanelEx.java
View file @
762a0474
...
...
@@ -304,7 +304,7 @@ public class MessageListPanelEx {
public
void
run
()
{
messageListView
.
smoothScrollToPosition
(
adapter
.
getBottomDataPosition
());
}
},
2
00
);
},
3
00
);
}
else
if
(
incomingMsgPrompt
!=
null
&&
lastMsg
.
getSessionType
()
!=
SessionTypeEnum
.
ChatRoom
)
{
if
(
lastMsg
.
getAttachment
()
instanceof
CustomAttachLingxiWhichQuestion
){
messageListView
.
postDelayed
(
new
Runnable
()
{
...
...
@@ -312,7 +312,7 @@ public class MessageListPanelEx {
public
void
run
()
{
messageListView
.
smoothScrollToPosition
(
adapter
.
getBottomDataPosition
());
}
},
2
00
);
},
5
00
);
}
else
{
incomingMsgPrompt
.
show
(
lastMsg
);
}
...
...
m-im/src/main/res/layout/im_nim_lingxi_first_question.xml
View file @
762a0474
<?xml version="1.0" encoding="utf-8"?>
<ImageView
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"300dp"
android:layout_height=
"260dp"
android:scaleType=
"fitXY"
android:id=
"@+id/first_question"
>
</ImageView>
\ No newline at end of file
<FrameLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<ImageView
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:id=
"@+id/first_question"
android:scaleType=
"fitXY"
>
</ImageView>
</FrameLayout>
m-im/src/main/res/layout/im_nim_lingxi_multiple_choice.xml
View file @
762a0474
<?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"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/im_custom_message_round_white_6dp_bg"
android:paddingLeft=
"@dimen/platform_dp_12"
android:paddingRight=
"@dimen/platform_dp_12"
android:paddingTop=
"@dimen/platform_dp_12"
>
android:paddingRight=
"@dimen/dp_4"
>
<TextView
android:id=
"@+id/multiple_choice_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:maxWidth=
"263dp"
android:id=
"@+id/multiple_choice_title"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
tools:text=
"请问是发生了什么事情导致的呢?(多选)?"
android:textSize=
"@dimen/im_text_size_17"
android:paddingBottom=
"@dimen/platform_dp_12"
android:includeFontPadding=
"false"
android:lineSpacingExtra=
"3dip"
android:maxWidth=
"263dp"
android:paddingBottom=
"@dimen/platform_dp_12"
android:textColor=
"@color/im_color_242424"
>
</TextView>
android:textSize=
"@dimen/im_text_size_17"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
tools:text=
"请问是发生了什么事情导致的呢?(多选)?"
/>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/multiple_question_rv"
android:layout_marginTop=
"@dimen/dp_4"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
android:minWidth=
"263dp"
android:layout_marginTop=
"@dimen/dp_4"
android:maxWidth=
"263dp"
app:layout_constraintTop_toBottomOf=
"@id/multiple_choice_title"
app:layout_constraintStart_toStartOf=
"@id/multiple_choice_title"
android:minWidth=
"263dp"
android:orientation=
"vertical"
app:layoutManager=
"androidx.recyclerview.widget.GridLayoutManager"
app:layout_constraintEnd_toEndOf=
"parent"
tools:itemCount=
"6"
app:layout_constraintStart_toStartOf=
"@id/multiple_choice_title"
app:layout_constraintTop_toBottomOf=
"@id/multiple_choice_title"
app:spanCount=
"2"
tools:
listitem=
"@layout/im_lingxi_which_question_item
"
app:layoutManager=
"androidx.recyclerview.widget.GridLayoutManager"
/>
tools:
itemCount=
"6
"
tools:listitem=
"@layout/im_lingxi_which_question_item"
/>
<TextView
android:id=
"@+id/confirm_multiple_choice"
android:layout_width=
"110dp"
android:layout_height=
"wrap_content"
app:layout_constraintTop_toBottomOf=
"@id/multiple_question_rv"
android:text=
"确定(0)"
android:layout_marginTop=
"@dimen/platform_dp_8"
android:textSize=
"@dimen/im_text_size_15"
android:enabled=
"false"
app:layout_constraintEnd_toEndOf=
"@id/multiple_question_rv"
android:layout_marginEnd=
"@dimen/platform_dp_12"
android:layout_marginBottom=
"@dimen/platform_dp_16"
android:background=
"@drawable/im_background_18dp_ebebeb"
android:enabled=
"false"
android:gravity=
"center"
android:paddingTop=
"@dimen/platform_dp_8"
android:paddingBottom=
"@dimen/platform_dp_8"
android:text=
"确定(0)"
android:textColor=
"@color/white"
android:gravity=
"center"
android:layout_marginBottom=
"@dimen/platform_dp_16"
android:textSize=
"@dimen/im_text_size_15"
app:layout_constraintBottom_toBottomOf=
"parent"
>
app:layout_constraintEnd_toEndOf=
"@id/multiple_question_rv"
app:layout_constraintTop_toBottomOf=
"@id/multiple_question_rv"
>
</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