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
5d3f7619
Commit
5d3f7619
authored
Jun 28, 2021
by
YKai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:自定义跳转倾诉列表云信消息
parent
83595157
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
137 additions
and
4 deletions
+137
-4
CustomAttachLingXiJumpConfideList.java
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachLingXiJumpConfideList.java
+23
-0
CustomAttachParser.java
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachParser.java
+7
-4
CustomAttachmentType.java
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachmentType.java
+1
-0
MsgViewHolderLingXiJumpConfideList.java
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderLingXiJumpConfideList.java
+39
-0
im_nim_lingxi_jump_confide_list.xml
m-im/src/main/res/layout/im_nim_lingxi_jump_confide_list.xml
+67
-0
im_ic_jump_confide.png
m-im/src/main/res/mipmap-xhdpi/im_ic_jump_confide.png
+0
-0
No files found.
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachLingXiJumpConfideList.java
0 → 100644
View file @
5d3f7619
package
com
.
yidianling
.
im
.
session
.
extension
;
import
com.alibaba.fastjson.JSONObject
;
public
class
CustomAttachLingXiJumpConfideList
extends
CustomAttachment
{
public
CustomAttachLingXiJumpConfideList
()
{
super
(
CustomAttachmentType
.
TYPE_LINGXI_JUMP_CONFIDE_LIST
);
}
@Override
protected
void
parseData
(
JSONObject
data
)
{
}
@Override
protected
JSONObject
packData
()
{
return
new
JSONObject
();
}
}
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachParser.java
View file @
5d3f7619
...
@@ -137,16 +137,19 @@ public class CustomAttachParser implements MsgAttachmentParser {
...
@@ -137,16 +137,19 @@ public class CustomAttachParser implements MsgAttachmentParser {
attachment
=
new
CustomAttachmentFilter
();
attachment
=
new
CustomAttachmentFilter
();
break
;
break
;
case
CustomAttachmentType
.
TYPE_CONFIRM_ORDER
:
//38 确认订单消息
case
CustomAttachmentType
.
TYPE_CONFIRM_ORDER
:
//38 确认订单消息
attachment
=
new
CustomAttachmentConfirmOrder
();
attachment
=
new
CustomAttachmentConfirmOrder
();
break
;
break
;
case
CustomAttachmentType
.
TYPE_ORDER_ALREADY_DONE
:
//39 订单已完成
case
CustomAttachmentType
.
TYPE_ORDER_ALREADY_DONE
:
//39 订单已完成
attachment
=
new
CustomAttachmentOrderAlreadyDone
();
attachment
=
new
CustomAttachmentOrderAlreadyDone
();
break
;
break
;
case
CustomAttachmentType
.
TYPE_LINGXI_WHICH_QUESTION
:
//灵犀2.0-您想要咨询下列哪些问题
case
CustomAttachmentType
.
TYPE_LINGXI_WHICH_QUESTION
:
//灵犀2.0-您想要咨询下列哪些问题
attachment
=
new
CustomAttachLingxiWhichQuestion
();
attachment
=
new
CustomAttachLingxiWhichQuestion
();
break
;
break
;
case
CustomAttachmentType
.
TYPE_LINGXI_ANSWER_QUESTION
:
//灵犀2.0-回答问题
case
CustomAttachmentType
.
TYPE_LINGXI_ANSWER_QUESTION
:
//灵犀2.0-回答问题
attachment
=
new
CustomAttachLingxiAnswerQuestion
();
attachment
=
new
CustomAttachLingxiAnswerQuestion
();
break
;
case
CustomAttachmentType
.
TYPE_LINGXI_JUMP_CONFIDE_LIST
:
// 跳转倾诉列表
attachment
=
new
CustomAttachLingXiJumpConfideList
();
break
;
break
;
default
:
default
:
attachment
=
new
DefaultCustomAttachment
();
attachment
=
new
DefaultCustomAttachment
();
...
...
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachmentType.java
View file @
5d3f7619
...
@@ -47,6 +47,7 @@ public interface CustomAttachmentType {
...
@@ -47,6 +47,7 @@ public interface CustomAttachmentType {
int
TYPE_LINGXI_WHICH_QUESTION
=
55
;
//试卷消息
int
TYPE_LINGXI_WHICH_QUESTION
=
55
;
//试卷消息
int
TYPE_LINGXI_ANSWER_QUESTION
=
56
;
//回答消息
int
TYPE_LINGXI_ANSWER_QUESTION
=
56
;
//回答消息
int
TYPE_LINGXI_TEST_QUESTION
=
60
;
//测评结果
int
TYPE_LINGXI_TEST_QUESTION
=
60
;
//测评结果
int
TYPE_LINGXI_JUMP_CONFIDE_LIST
=
73
;
// 跳转倾诉列表
}
}
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderLingXiJumpConfideList.java
0 → 100644
View file @
5d3f7619
package
com
.
yidianling
.
im
.
session
.
viewholder
;
import
android.widget.TextView
;
import
com.ydl.ydl_router.manager.YDLRouterManager
;
import
com.ydl.ydlcommon.router.IYDLRouterConstant
;
import
com.yidianling.im.R
;
import
com.yidianling.im.session.extension.CustomAttachLingXiJumpConfideList
;
import
com.yidianling.nimbase.common.ui.recyclerview.adapter.BaseMultiItemFetchLoadAdapter
;
import
com.yidianling.uikit.business.session.viewholder.MsgViewHolderBase
;
public
class
MsgViewHolderLingXiJumpConfideList
extends
MsgViewHolderBase
{
private
TextView
tvJump
;
CustomAttachLingXiJumpConfideList
customAttachLingXiJumpConfideList
;
public
MsgViewHolderLingXiJumpConfideList
(
BaseMultiItemFetchLoadAdapter
adapter
)
{
super
(
adapter
);
}
@Override
protected
int
getContentResId
()
{
return
R
.
layout
.
im_nim_lingxi_jump_confide_list
;
}
@Override
protected
void
inflateContentView
()
{
tvJump
=
findViewById
(
R
.
id
.
tv_jump_confide_list
);
}
@Override
protected
void
bindContentView
()
{
customAttachLingXiJumpConfideList
=
((
CustomAttachLingXiJumpConfideList
)
message
.
getAttachment
());
tvJump
.
setOnClickListener
(
view
->
{
YDLRouterManager
.
Companion
.
router
(
IYDLRouterConstant
.
ROUTER_CONFIDE_HOME
);
});
}
}
m-im/src/main/res/layout/im_nim_lingxi_jump_confide_list.xml
0 → 100644
View file @
5d3f7619
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"256dp"
android:layout_height=
"wrap_content"
android:background=
"@drawable/im_custom_message_round_white_6dp_bg"
android:paddingLeft=
"@dimen/platform_dp_12"
android:paddingTop=
"@dimen/platform_dp_15"
android:paddingRight=
"@dimen/platform_dp_12"
android:paddingBottom=
"@dimen/platform_dp_12"
tools:ignore=
"MissingConstraints"
>
<ImageView
android:id=
"@+id/iv_jump_confide"
android:layout_width=
"36dp"
android:layout_height=
"36dp"
android:layout_marginTop=
"@dimen/platform_dp_1"
android:src=
"@mipmap/im_ic_jump_confide"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/platform_dp_12"
android:includeFontPadding=
"false"
android:text=
"壹点灵倾诉服务"
android:textColor=
"@color/platform_color_242424"
android:textSize=
"17sp"
app:layout_constraintStart_toEndOf=
"@id/iv_jump_confide"
/>
<TextView
android:id=
"@+id/tv_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_4"
android:includeFontPadding=
"false"
android:text=
"倾听您的声音"
android:textSize=
"@dimen/im_sp_14"
app:layout_constraintStart_toStartOf=
"@id/tv_title"
app:layout_constraintTop_toBottomOf=
"@id/tv_title"
/>
<View
android:id=
"@+id/v_line"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/platform_dp_1"
android:layout_marginTop=
"@dimen/platform_dp_11"
android:background=
"@color/platform_color_EBEBEB"
app:layout_constraintTop_toBottomOf=
"@id/tv_content"
/>
<TextView
android:id=
"@+id/tv_jump_confide_list"
android:layout_width=
"90dp"
android:layout_height=
"32dp"
android:layout_marginTop=
"@dimen/platform_dp_12"
android:background=
"@drawable/im_custom_159cef_22bfff"
android:gravity=
"center"
android:text=
"立即前往"
android:textColor=
"@color/white"
android:textSize=
"@dimen/im_text_size_15"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/v_line"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
m-im/src/main/res/mipmap-xhdpi/im_ic_jump_confide.png
0 → 100755
View file @
5d3f7619
3.21 KB
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