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
6f22f2b4
Commit
6f22f2b4
authored
Apr 22, 2020
by
ydl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改私聊消息样式
parent
c60419b9
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
95 additions
and
19 deletions
+95
-19
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+2
-0
MainActivity.kt
app/src/main/java/com/ydl/component/MainActivity.kt
+4
-1
PlatformTempCommonRouteImpl.kt
app/src/main/java/com/ydl/component/route/PlatformTempCommonRouteImpl.kt
+38
-0
NimApplication.java
m-im/src/main/java/com/yidianling/im/config/NimApplication.java
+2
-2
MsgViewHolderConsultCallStatus.java
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderConsultCallStatus.java
+6
-5
MsgViewHolderAudio.java
m-im/src/main/java/com/yidianling/uikit/business/session/viewholder/MsgViewHolderAudio.java
+2
-2
MsgViewHolderBase.java
m-im/src/main/java/com/yidianling/uikit/business/session/viewholder/MsgViewHolderBase.java
+5
-0
MsgViewHolderText.java
m-im/src/main/java/com/yidianling/uikit/business/session/viewholder/MsgViewHolderText.java
+2
-2
im_message_receive_content_bg.xml
m-im/src/main/res/drawable/im_message_receive_content_bg.xml
+0
-0
im_message_receive_content_tip_bg.xml
m-im/src/main/res/drawable/im_message_receive_content_tip_bg.xml
+0
-0
im_message_send_content_bg.xml
m-im/src/main/res/drawable/im_message_send_content_bg.xml
+0
-0
im_message_send_content_tip_bg.xml
m-im/src/main/res/drawable/im_message_send_content_tip_bg.xml
+0
-0
im_nim_confide_left_tip_bg.xml
m-im/src/main/res/drawable/im_nim_confide_left_tip_bg.xml
+10
-0
im_nim_confide_right_tip_bg.xml
m-im/src/main/res/drawable/im_nim_confide_right_tip_bg.xml
+10
-0
im_ui_message_custom_consult_call_status.xml
m-im/src/main/res/layout/im_ui_message_custom_consult_call_status.xml
+5
-3
im_nim_message_item_avchat.xml
m-im/src/main/res_avchat/layout/im_nim_message_item_avchat.xml
+3
-2
im_nim_message_item.xml
m-im/src/main/res_uikit/layout/im_nim_message_item.xml
+2
-2
im_nim_message_item_audio.xml
m-im/src/main/res_uikit/layout/im_nim_message_item_audio.xml
+1
-0
im_nim_message_item_text.xml
m-im/src/main/res_uikit/layout/im_nim_message_item_text.xml
+1
-0
im_nim_read_recipt_layout.xml
m-im/src/main/res_uikit/layout/im_nim_read_recipt_layout.xml
+2
-0
No files found.
app/src/main/AndroidManifest.xml
View file @
6f22f2b4
...
...
@@ -3,6 +3,8 @@
xmlns:tools=
"http://schemas.android.com/tools"
package=
"com.ydl.component"
>
<permission
android:name=
"android.permission.WRITE_SETTINGS"
/>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.WRITE_EXTERNAL_STORAGE"
/>
<uses-permission
android:name=
"android.permission.READ_EXTERNAL_STORAGE"
/>
...
...
app/src/main/java/com/ydl/component/MainActivity.kt
View file @
6f22f2b4
...
...
@@ -39,7 +39,8 @@ import com.alibaba.fastjson.serializer.AwtCodec.support
import
android.support.v4.app.SupportActivity
import
android.support.v4.app.SupportActivity.ExtraData
import
com.ydl.component.mvp.DemoContract
import
com.ydl.component.route.PlatformTempCommonRouteImpl
import
com.ydl.ydlcommon.router.YdlCommonRouterManager
/**
...
...
@@ -78,6 +79,8 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
// YDLavManager.instances.init(this, "3387e9b251f3491e9221a9877e8f7830")
YdlCommonRouterManager
.
initYdlCommonRoute
(
PlatformTempCommonRouteImpl
())
bindService
()
reLoadData
()
requestPermission
()
...
...
app/src/main/java/com/ydl/component/route/PlatformTempCommonRouteImpl.kt
0 → 100644
View file @
6f22f2b4
package
com.ydl.component.route
import
android.app.Activity
import
android.content.Context
import
com.ydl.ydlcommon.router.IYdlCommonRouter
import
com.ydl.ydlcommon.router.YdlUserInfo
import
com.yidianling.im.bridge.P2PCustomActionHandlerImpl
import
com.yidianling.im.router.ImIn
import
com.yidianling.im.session.SessionHelper
import
com.yidianling.user.ui.login.RegisterAndLoginActivity
class
PlatformTempCommonRouteImpl
:
IYdlCommonRouter
{
override
fun
startMain
(
activity
:
Activity
,
isSplashActivity
:
Boolean
)
{
}
override
fun
startMain
(
context
:
Context
,
selectTab
:
Int
,
trend_tap
:
String
?)
{
}
override
fun
setMoreService
(
context
:
Context
)
{
}
override
fun
getUserInfo
():
YdlUserInfo
?
{
val
userInfo
=
ImIn
.
getUserResponse
()
?:
return
null
return
YdlUserInfo
(
userInfo
.
uid
?:
""
,
userInfo
.
accessToken
?:
""
,
userInfo
.
hxpwd
?:
""
,
userInfo
.
userInfo
!!
.
nick_name
?:
""
,
userInfo
.
userInfo
!!
.
head
?:
""
)
}
override
fun
getUid
():
Int
{
return
ImIn
.
getUserInfo
()
?.
uid
?.
toInt
()
?:
0
}
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/im/config/NimApplication.java
View file @
6f22f2b4
...
...
@@ -92,8 +92,8 @@ public class NimApplication {
//options.buildNimUserCache = true;
options
.
shouldHandleReceipt
=
true
;
options
.
toolBarOptions
=
new
YDLToolBarOptions
();
options
.
messageLeftBackground
=
R
.
drawable
.
message_receive_content_bg
;
options
.
messageRightBackground
=
R
.
drawable
.
message_send_content_bg
;
options
.
messageLeftBackground
=
R
.
drawable
.
im_
message_receive_content_bg
;
options
.
messageRightBackground
=
R
.
drawable
.
im_
message_send_content_bg
;
return
options
;
}
...
...
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderConsultCallStatus.java
View file @
6f22f2b4
package
com
.
yidianling
.
im
.
session
.
viewholder
;
import
android.graphics.Color
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.widget.ImageView
;
...
...
@@ -63,6 +62,8 @@ public class MsgViewHolderConsultCallStatus extends MsgViewHolderBase {
//只有倾诉加角标,咨询不加
if
(!
"true"
.
equals
(
customAttachTipMsg
.
getIsConsultOrder
()))
{
showAudioSmallTip
();
}
else
{
hideAudioSmallTip
();
}
}
...
...
@@ -70,9 +71,9 @@ public class MsgViewHolderConsultCallStatus extends MsgViewHolderBase {
protected
int
leftBackground
()
{
CustomAttachConsultCallStatus
customAttachTipMsg
=
(
CustomAttachConsultCallStatus
)
message
.
getAttachment
();
if
(!
"true"
.
equals
(
customAttachTipMsg
.
getIsConsultOrder
()))
{
return
R
.
drawable
.
message_receive_content_tip_bg
;
return
R
.
drawable
.
im_
message_receive_content_tip_bg
;
}
else
{
return
R
.
drawable
.
message_receive_content_bg
;
return
R
.
drawable
.
im_
message_receive_content_bg
;
}
}
...
...
@@ -80,9 +81,9 @@ public class MsgViewHolderConsultCallStatus extends MsgViewHolderBase {
protected
int
rightBackground
()
{
CustomAttachConsultCallStatus
customAttachTipMsg
=
(
CustomAttachConsultCallStatus
)
message
.
getAttachment
();
if
(!
"true"
.
equals
(
customAttachTipMsg
.
getIsConsultOrder
()))
{
return
R
.
drawable
.
message_send_content_tip_bg
;
return
R
.
drawable
.
im_
message_send_content_tip_bg
;
}
else
{
return
R
.
drawable
.
message_send_content_bg
;
return
R
.
drawable
.
im_
message_send_content_bg
;
}
}
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/viewholder/MsgViewHolderAudio.java
View file @
6f22f2b4
...
...
@@ -95,7 +95,7 @@ public class MsgViewHolderAudio extends MsgViewHolderBase {
setGravity
(
durationLabel
,
Gravity
.
RIGHT
|
Gravity
.
CENTER_VERTICAL
);
containerView
.
setBackgroundResource
(
NimUIKitImpl
.
getOptions
().
messageLeftBackground
);
containerView
.
setPadding
(
ScreenUtil
.
dip2px
(
1
5
),
ScreenUtil
.
dip2px
(
8
),
ScreenUtil
.
dip2px
(
10
),
ScreenUtil
.
dip2px
(
8
));
containerView
.
setPadding
(
ScreenUtil
.
dip2px
(
1
3
),
ScreenUtil
.
dip2px
(
7
),
ScreenUtil
.
dip2px
(
13
),
ScreenUtil
.
dip2px
(
7
));
animationView
.
setBackgroundResource
(
R
.
drawable
.
im_nim_audio_animation_list_left
);
durationLabel
.
setTextColor
(
Color
.
BLACK
);
...
...
@@ -105,7 +105,7 @@ public class MsgViewHolderAudio extends MsgViewHolderBase {
unreadIndicator
.
setVisibility
(
View
.
GONE
);
containerView
.
setBackgroundResource
(
NimUIKitImpl
.
getOptions
().
messageRightBackground
);
containerView
.
setPadding
(
ScreenUtil
.
dip2px
(
1
0
),
ScreenUtil
.
dip2px
(
8
),
ScreenUtil
.
dip2px
(
15
),
ScreenUtil
.
dip2px
(
8
));
containerView
.
setPadding
(
ScreenUtil
.
dip2px
(
1
3
),
ScreenUtil
.
dip2px
(
7
),
ScreenUtil
.
dip2px
(
13
),
ScreenUtil
.
dip2px
(
7
));
animationView
.
setBackgroundResource
(
R
.
drawable
.
im_nim_audio_animation_list_right
);
durationLabel
.
setTextColor
(
Color
.
BLACK
);
}
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/viewholder/MsgViewHolderBase.java
View file @
6f22f2b4
...
...
@@ -453,4 +453,9 @@ public abstract class MsgViewHolderBase extends RecyclerViewHolder<BaseMultiItem
audioLeftSmallTip
.
setVisibility
(
View
.
VISIBLE
);
}
}
protected
void
hideAudioSmallTip
()
{
audioRightSmallTip
.
setVisibility
(
View
.
GONE
);
audioLeftSmallTip
.
setVisibility
(
View
.
GONE
);
}
}
m-im/src/main/java/com/yidianling/uikit/business/session/viewholder/MsgViewHolderText.java
View file @
6f22f2b4
...
...
@@ -52,10 +52,10 @@ public class MsgViewHolderText extends MsgViewHolderBase {
private
void
layoutDirection
()
{
if
(
isReceivedMessage
())
{
bodyTextView
.
setBackgroundResource
(
NimUIKitImpl
.
getOptions
().
messageLeftBackground
);
bodyTextView
.
setPadding
(
ScreenUtil
.
dip2px
(
13
),
ScreenUtil
.
dip2px
(
13
),
ScreenUtil
.
dip2px
(
13
),
ScreenUtil
.
dip2px
(
13
));
bodyTextView
.
setPadding
(
ScreenUtil
.
dip2px
(
13
),
ScreenUtil
.
dip2px
(
7
),
ScreenUtil
.
dip2px
(
13
),
ScreenUtil
.
dip2px
(
7
));
}
else
{
bodyTextView
.
setBackgroundResource
(
NimUIKitImpl
.
getOptions
().
messageRightBackground
);
bodyTextView
.
setPadding
(
ScreenUtil
.
dip2px
(
13
),
ScreenUtil
.
dip2px
(
13
),
ScreenUtil
.
dip2px
(
13
),
ScreenUtil
.
dip2px
(
13
));
bodyTextView
.
setPadding
(
ScreenUtil
.
dip2px
(
13
),
ScreenUtil
.
dip2px
(
7
),
ScreenUtil
.
dip2px
(
13
),
ScreenUtil
.
dip2px
(
7
));
}
int
textWidth
=
RxDeviceTool
.
getScreenWidth
(
context
)
-
RxImageTool
.
dp2px
(
122
f
);
bodyTextView
.
setMaxWidth
(
textWidth
);
...
...
m-im/src/main/res/drawable/message_receive_content_bg.xml
→
m-im/src/main/res/drawable/
im_
message_receive_content_bg.xml
View file @
6f22f2b4
File moved
m-im/src/main/res/drawable/message_receive_content_tip_bg.xml
→
m-im/src/main/res/drawable/
im_
message_receive_content_tip_bg.xml
View file @
6f22f2b4
File moved
m-im/src/main/res/drawable/message_send_content_bg.xml
→
m-im/src/main/res/drawable/
im_
message_send_content_bg.xml
View file @
6f22f2b4
File moved
m-im/src/main/res/drawable/message_send_content_tip_bg.xml
→
m-im/src/main/res/drawable/
im_
message_send_content_tip_bg.xml
View file @
6f22f2b4
File moved
m-im/src/main/res/drawable/im_nim_confide_left_tip_bg.xml
0 → 100644
View file @
6f22f2b4
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"#191DA1F2"
/>
<corners
android:bottomLeftRadius=
"4dp"
android:topLeftRadius=
"4dp"
/>
</shape>
\ No newline at end of file
m-im/src/main/res/drawable/im_nim_confide_right_tip_bg.xml
0 → 100644
View file @
6f22f2b4
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"#191DA1F2"
/>
<corners
android:topRightRadius=
"4dp"
android:bottomRightRadius=
"4dp"
/>
</shape>
\ No newline at end of file
m-im/src/main/res/layout/im_ui_message_custom_consult_call_status.xml
View file @
6f22f2b4
...
...
@@ -5,15 +5,16 @@
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:padding=
"6dp"
android:minHeight=
"40dp"
android:orientation=
"horizontal"
>
<ImageView
android:id=
"@+id/type_img"
android:layout_width=
"
wrap_content
"
android:layout_height=
"
wrap_content
"
android:layout_width=
"
14dp
"
android:layout_height=
"
14dp
"
android:layout_gravity=
"center_vertical"
android:layout_marginLeft=
"3dp"
android:layout_marginRight=
"
8
dp"
android:layout_marginRight=
"
3
dp"
android:contentDescription=
"@string/im_empty"
android:src=
"@drawable/im_avchat_left_type_audio"
/>
...
...
@@ -22,6 +23,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginLeft=
"5dp"
android:layout_marginRight=
"5dp"
android:text=
"无人接听"
android:textColor=
"@color/platform_color_242424"
...
...
m-im/src/main/res_avchat/layout/im_nim_message_item_avchat.xml
View file @
6f22f2b4
...
...
@@ -5,12 +5,13 @@
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:padding=
"6dp"
android:minHeight=
"40dp"
android:orientation=
"horizontal"
>
<ImageView
android:id=
"@+id/message_item_avchat_type_img"
android:layout_width=
"
wrap_content
"
android:layout_height=
"
wrap_content
"
android:layout_width=
"
14dp
"
android:layout_height=
"
14dp
"
android:layout_gravity=
"center_vertical"
android:layout_marginLeft=
"3dp"
android:layout_marginRight=
"8dp"
...
...
m-im/src/main/res_uikit/layout/im_nim_message_item.xml
View file @
6f22f2b4
...
...
@@ -171,7 +171,7 @@
android:textColor=
"#1DA1F2"
android:textSize=
"10dp"
android:visibility=
"gone"
android:background=
"
#191DA1F2
"
/>
android:background=
"
@drawable/im_nim_confide_left_tip_bg
"
/>
<FrameLayout
android:id=
"@+id/message_item_content"
...
...
@@ -189,7 +189,7 @@
android:textColor=
"#1DA1F2"
android:textSize=
"10dp"
android:visibility=
"gone"
android:background=
"
#191DA1F2
"
/>
android:background=
"
@drawable/im_nim_confide_right_tip_bg
"
/>
</LinearLayout>
</FrameLayout>
...
...
m-im/src/main/res_uikit/layout/im_nim_message_item_audio.xml
View file @
6f22f2b4
...
...
@@ -9,6 +9,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:minHeight=
"40dp"
>
<ImageView
...
...
m-im/src/main/res_uikit/layout/im_nim_message_item_text.xml
View file @
6f22f2b4
...
...
@@ -12,6 +12,7 @@
android:gravity=
"center_vertical|left"
android:includeFontPadding=
"false"
android:lineSpacingExtra=
"3dip"
android:minHeight=
"40dp"
android:textColor=
"@color/im_color_242424"
android:textSize=
"17dp"
/>
</LinearLayout>
m-im/src/main/res_uikit/layout/im_nim_read_recipt_layout.xml
View file @
6f22f2b4
...
...
@@ -7,6 +7,8 @@
android:layout_gravity=
"bottom"
android:layout_marginBottom=
"3dip"
android:background=
"@color/im_transparent"
android:layout_marginLeft=
"2dp"
android:layout_marginRight=
"2dp"
android:text=
"@string/im_readed"
android:textColor=
"#666666"
android:textSize=
"12sp"
...
...
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