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
4c9868f1
Commit
4c9868f1
authored
Dec 13, 2019
by
konghaorui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善私聊模块
parent
777cc9ba
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
225 additions
and
134 deletions
+225
-134
AndroidManifest.xml
m-im/src/main/AndroidManifest.xml
+6
-2
NimApplication.java
m-im/src/main/java/com/yidianling/im/config/NimApplication.java
+2
-0
NimSDKOptionConfig.java
m-im/src/main/java/com/yidianling/im/config/NimSDKOptionConfig.java
+1
-1
ImIn.kt
m-im/src/main/java/com/yidianling/im/router/ImIn.kt
+5
-1
SessionHelper.java
m-im/src/main/java/com/yidianling/im/session/SessionHelper.java
+1
-1
OtherMsgDetailActivity.java
m-im/src/main/java/com/yidianling/im/ui/activity/OtherMsgDetailActivity.java
+6
-0
SystemMsgDetailActivity.java
m-im/src/main/java/com/yidianling/im/ui/activity/SystemMsgDetailActivity.java
+6
-1
ChatFragment.kt
m-im/src/main/java/com/yidianling/im/ui/page/fragment/ChatFragment.kt
+3
-3
TitleBarBottom.java
m-im/src/main/java/com/yidianling/uikit/custom/widget/TitleBarBottom.java
+1
-2
im_chat_model_selected_bg.xml
m-im/src/main/res/drawable/im_chat_model_selected_bg.xml
+3
-2
im_chat_unusual_view_btn_bg.xml
m-im/src/main/res/drawable/im_chat_unusual_view_btn_bg.xml
+2
-2
im_custom_indicator_bg.xml
m-im/src/main/res/drawable/im_custom_indicator_bg.xml
+3
-3
im_customer_card_send_dialog_line.xml
m-im/src/main/res/drawable/im_customer_card_send_dialog_line.xml
+2
-2
im_message_chat_setting_sure_btn_bg.xml
m-im/src/main/res/drawable/im_message_chat_setting_sure_btn_bg.xml
+2
-2
im_activity_other_msg_detail.xml
m-im/src/main/res/layout/im_activity_other_msg_detail.xml
+2
-1
im_activity_system_msg_detail.xml
m-im/src/main/res/layout/im_activity_system_msg_detail.xml
+3
-2
im_chat_unusual_view.xml
m-im/src/main/res/layout/im_chat_unusual_view.xml
+3
-2
im_message_chat_setting.xml
m-im/src/main/res/layout/im_message_chat_setting.xml
+1
-1
im_nim_ui_title_bar_bottom.xml
m-im/src/main/res_uikit/layout/im_nim_ui_title_bar_bottom.xml
+47
-29
im_ydl_nim_message_activity.xml
m-im/src/main/res_uikit/layout/im_ydl_nim_message_activity.xml
+1
-1
colors.xml
m-im/src/xlzx/res/values/colors.xml
+23
-0
colors.xml
m-im/src/ydl/res/values/colors.xml
+23
-0
platform_common_back.png
ydl-platform/src/main/res/drawable-xhdpi/platform_common_back.png
+0
-0
platform_common_more.png
ydl-platform/src/main/res/drawable-xhdpi/platform_common_more.png
+0
-0
platform_common_notice_more_en.png
ydl-platform/src/main/res/drawable-xhdpi/platform_common_notice_more_en.png
+0
-0
platform_common_notice_more_un.png
ydl-platform/src/main/res/drawable-xhdpi/platform_common_notice_more_un.png
+0
-0
platform_common_share.png
ydl-platform/src/main/res/drawable-xhdpi/platform_common_share.png
+0
-0
platform_ui_title_bar.xml
ydl-platform/src/main/res/layout/platform_ui_title_bar.xml
+73
-70
NewH5Activity.java
ydl-webview/src/main/java/com/ydl/webview/NewH5Activity.java
+6
-6
No files found.
m-im/src/main/AndroidManifest.xml
View file @
4c9868f1
...
...
@@ -44,10 +44,14 @@
<activity
android:name=
".ui.activity.SystemMsgDetailActivity"
android:screenOrientation=
"portrait"
/>
android:screenOrientation=
"portrait"
android:theme=
"@style/platform_NoTitleTheme"
/>
<activity
android:name=
".ui.activity.OtherMsgDetailActivity"
android:screenOrientation=
"portrait"
/>
android:screenOrientation=
"portrait"
android:theme=
"@style/platform_NoTitleTheme"
/>
<!-- 云信 集成配置 -->
<!-- 声明云信后台服务 -->
...
...
m-im/src/main/java/com/yidianling/im/config/NimApplication.java
View file @
4c9868f1
...
...
@@ -92,6 +92,8 @@ public class NimApplication {
//options.buildNimUserCache = true;
options
.
shouldHandleReceipt
=
true
;
options
.
toolBarOptions
=
new
YDLToolBarOptions
();
options
.
messageLeftBackground
=
R
.
drawable
.
im_nim_message_item_left_selector
;
options
.
messageRightBackground
=
R
.
drawable
.
im_nim_message_item_right_selector
;
return
options
;
}
...
...
m-im/src/main/java/com/yidianling/im/config/NimSDKOptionConfig.java
View file @
4c9868f1
...
...
@@ -17,6 +17,7 @@ import com.yidianling.im.R;
import
com.yidianling.im.config.constants.UserPreferences
;
import
com.yidianling.im.config.provider.CustomUserInfoProvider
;
import
com.yidianling.im.preference.IMCache
;
import
com.yidianling.uikit.api.NimUIKitImpl
;
import
com.yidianling.uikit.api.wrapper.MessageRevokeTip
;
import
com.yidianling.uikit.business.session.viewholder.MsgViewHolderThumbBase
;
...
...
@@ -101,7 +102,6 @@ class NimSDKOptionConfig {
options
.
shouldConsiderRevokedMessageUnreadCount
=
true
;
options
.
mixPushConfig
=
buildMixPushConfig
();
return
options
;
}
...
...
m-im/src/main/java/com/yidianling/im/router/ImIn.kt
View file @
4c9868f1
...
...
@@ -79,11 +79,12 @@ object ImIn {
}
fun
membersIntent
(
activity
:
Activity
,
userId
:
String
):
Intent
?
{
// TODO: 2019-12-12 待替换 by:HaoRui
return
RouterManager
.
getDynamicRouter
()
?.
membersIntent
(
activity
,
userId
)
}
fun
replayInfoIntent
(
activity
:
Activity
,
replyId
:
String
,
aid
:
String
):
Intent
?
{
// TODO: 2019-12-12 待替换 by:HaoRui
return
RouterManager
.
getDynamicRouter
()
?.
replyInfoIntent
(
activity
,
replyId
,
aid
)
}
...
...
@@ -93,14 +94,17 @@ object ImIn {
}
fun
trendsDetailIntent
(
activity
:
Activity
,
trendId
:
Int
):
Intent
?
{
// TODO: 2019-12-12 待替换 by:HaoRui
return
RouterManager
.
getDynamicRouter
()
?.
trendsDetailIntent
(
activity
,
trendId
)
}
fun
trendsDetailIntent
(
activity
:
Activity
,
trendId
:
Int
,
isScrollToZan
:
Boolean
):
Intent
?
{
// TODO: 2019-12-12 待替换 by:HaoRui
return
RouterManager
.
getDynamicRouter
()
?.
trendsDetailIntent
(
activity
,
trendId
,
isScrollToZan
)
}
fun
trendsDetailIntent
(
activity
:
Activity
,
trendId
:
Int
,
isScrollToZan
:
Boolean
,
lastId
:
Int
):
Intent
?
{
// TODO: 2019-12-12 待替换 by:HaoRui
return
RouterManager
.
getDynamicRouter
()
?.
trendsDetailIntent
(
activity
,
trendId
,
isScrollToZan
,
lastId
)
}
...
...
m-im/src/main/java/com/yidianling/im/session/SessionHelper.java
View file @
4c9868f1
...
...
@@ -260,7 +260,7 @@ public class SessionHelper {
}
}
};
infoButton
.
iconId
=
R
.
drawable
.
im_more12x
;
infoButton
.
iconId
=
R
.
drawable
.
platform_common_more
;
buttons
.
add
(
infoButton
);
p2pCustomization
.
buttons
=
buttons
;
...
...
m-im/src/main/java/com/yidianling/im/ui/activity/OtherMsgDetailActivity.java
View file @
4c9868f1
...
...
@@ -6,6 +6,7 @@ import android.widget.ListView;
import
com.alibaba.android.arouter.launcher.ARouter
;
import
com.ydl.ydlcommon.base.BaseActivity
;
import
com.ydl.ydlcommon.bean.StatusBarOptions
;
import
com.ydl.ydlcommon.data.http.RxUtils
;
import
com.ydl.ydlcommon.data.http.ThrowableConsumer
;
import
com.ydl.ydlcommon.utils.remind.ToastHelper
;
...
...
@@ -70,6 +71,11 @@ public class OtherMsgDetailActivity extends BaseActivity implements PtrHandler {
init
();
}
@NotNull
@Override
public
StatusBarOptions
getStatusViewOptions
()
{
return
new
StatusBarOptions
(
true
,
true
);
}
void
init
()
{
if
(
title
!=
null
&&
!
title
.
equals
(
""
))
{
...
...
m-im/src/main/java/com/yidianling/im/ui/activity/SystemMsgDetailActivity.java
View file @
4c9868f1
...
...
@@ -4,6 +4,7 @@ import android.view.View;
import
android.widget.ListView
;
import
com.ydl.ydlcommon.base.BaseActivity
;
import
com.ydl.ydlcommon.bean.StatusBarOptions
;
import
com.ydl.ydlcommon.data.http.RxUtils
;
import
com.ydl.ydlcommon.data.http.ThrowableConsumer
;
import
com.ydl.ydlcommon.utils.remind.ToastHelper
;
...
...
@@ -59,10 +60,14 @@ public class SystemMsgDetailActivity extends BaseActivity implements PtrHandler
titlebar
=
findViewById
(
R
.
id
.
title_bar
);
type
=
getIntent
().
getIntExtra
(
"type"
,
0
);
title
=
getIntent
().
getStringExtra
(
"title"
);
init
();
}
@NotNull
@Override
public
StatusBarOptions
getStatusViewOptions
()
{
return
new
StatusBarOptions
(
true
,
true
);
}
void
init
()
{
titlebar
.
setTitle
(
title
);
...
...
m-im/src/main/java/com/yidianling/im/ui/page/fragment/ChatFragment.kt
View file @
4c9868f1
...
...
@@ -305,13 +305,13 @@ class ChatFragment : BaseFragment(), XRecyclerView.LoadingListener {
chat_serviced_message
.
setTextColor
(
Color
.
parseColor
(
"#666666"
))
if
(
modelType
==
ChatModelType
.
ALL
)
{
chat_all_message
.
setTextColor
(
Color
.
parseColor
(
"#1DA1F2"
))
chat_all_message
.
setTextColor
(
resources
.
getColor
(
R
.
color
.
im_but_text_color
))
chat_all_message
.
setBackgroundResource
(
R
.
drawable
.
im_chat_model_selected_bg
)
}
else
if
(
modelType
==
ChatModelType
.
SERVICING
)
{
chat_servicing_message
.
setTextColor
(
Color
.
parseColor
(
"#1DA1F2"
))
chat_servicing_message
.
setTextColor
(
resources
.
getColor
(
R
.
color
.
im_but_text_color
))
chat_servicing_message
.
setBackgroundResource
(
R
.
drawable
.
im_chat_model_selected_bg
)
}
else
if
(
modelType
==
ChatModelType
.
SERVICED
)
{
chat_serviced_message
.
setTextColor
(
Color
.
parseColor
(
"#1DA1F2"
))
chat_serviced_message
.
setTextColor
(
resources
.
getColor
(
R
.
color
.
im_but_text_color
))
chat_serviced_message
.
setBackgroundResource
(
R
.
drawable
.
im_chat_model_selected_bg
)
}
}
...
...
m-im/src/main/java/com/yidianling/uikit/custom/widget/TitleBarBottom.java
View file @
4c9868f1
...
...
@@ -58,8 +58,7 @@ public class TitleBarBottom extends RelativeLayout {
tv_right_text
=
(
TextView
)
root
.
findViewById
(
R
.
id
.
tv_right_text
);
iv_title_divide
=
(
ImageView
)
root
.
findViewById
(
R
.
id
.
iv_title_divide
);
image
=
(
ImageView
)
root
.
findViewById
(
R
.
id
.
image
);
rightImage
=
(
ImageView
)
root
.
findViewById
(
R
.
id
.
rightImage
);
rightImage
=
(
ImageView
)
root
.
findViewById
(
R
.
id
.
iv_right
);
setupView
();
}
...
...
m-im/src/main/res/drawable/im_chat_model_selected_bg.xml
View file @
4c9868f1
...
...
@@ -2,12 +2,12 @@
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"
#E8F6FF
"
/>
<solid
android:color=
"
@color/im_main_theme_bright
"
/>
<corners
android:radius=
"11dp"
/>
<stroke
android:width=
"0.5dp"
android:color=
"
#1DA1F2
"
/>
android:color=
"
@color/im_main_theme
"
/>
</shape>
\ No newline at end of file
m-im/src/main/res/drawable/im_chat_unusual_view_btn_bg.xml
View file @
4c9868f1
...
...
@@ -3,8 +3,8 @@
android:shape=
"rectangle"
>
<gradient
android:endColor=
"
#1DA1F2
"
android:startColor=
"
#23B2FA
"
/>
android:endColor=
"
@color/im_main_theme
"
android:startColor=
"
@color/im_main_theme_light
"
/>
<corners
android:radius=
"14dp"
/>
...
...
m-im/src/main/res/drawable/im_custom_indicator_bg.xml
View file @
4c9868f1
...
...
@@ -3,7 +3,6 @@
android:shape=
"rectangle"
>
<gradient
android:startColor=
"#1DA1F2"
android:endColor=
"#5CC8F7"
/>
android:startColor=
"@color/im_main_theme"
android:endColor=
"@color/im_main_theme_light"
/>
</shape>
\ No newline at end of file
m-im/src/main/res/drawable/im_customer_card_send_dialog_line.xml
View file @
4c9868f1
...
...
@@ -4,7 +4,7 @@
<solid
android:color=
"@color/platform_color_D8D8D8"
/>
<gradient
android:endColor=
"
#1DA1F2
"
android:startColor=
"
#23B2FA
"
/>
android:endColor=
"
@color/im_main_theme
"
android:startColor=
"
@color/im_main_theme_light
"
/>
<corners
android:bottomRightRadius=
"8dp"
/>
</shape>
m-im/src/main/res/drawable/im_message_chat_setting_sure_btn_bg.xml
View file @
4c9868f1
...
...
@@ -3,8 +3,8 @@
android:shape=
"rectangle"
>
<gradient
android:endColor=
"
#1DA1F2
"
android:startColor=
"
#23B2FA
"
/>
android:endColor=
"
@color/im_main_theme
"
android:startColor=
"
@color/im_main_theme_light
"
/>
<corners
android:bottomRightRadius=
"8dp"
/>
...
...
m-im/src/main/res/layout/im_activity_other_msg_detail.xml
View file @
4c9868f1
...
...
@@ -10,9 +10,10 @@
<com.ydl.ydlcommon.view.TitleBar
android:id=
"@+id/title_bar"
app:pa_title_text=
"消息"
app:pa_left_start_icon=
"@drawable/platform_
toolbar
_back"
app:pa_left_start_icon=
"@drawable/platform_
common
_back"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/title_bar_height"
android:background=
"@color/platform_white"
app:pa_right_text=
"全部已读"
/>
<in.srain.cube.views.ptr.PtrFrameLayout
...
...
m-im/src/main/res/layout/im_activity_system_msg_detail.xml
View file @
4c9868f1
...
...
@@ -10,8 +10,9 @@
android:id=
"@+id/title_bar"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/title_bar_height"
app:pa_left_start_icon=
"@drawable/platform_toolbar_back"
app:pa_title_text=
"@string/im_app_name"
/>
app:pa_left_start_icon=
"@drawable/platform_common_back"
android:background=
"@color/platform_white"
/>
<in.srain.cube.views.ptr.PtrFrameLayout
android:id=
"@+id/store_house_ptr_frame"
...
...
m-im/src/main/res/layout/im_chat_unusual_view.xml
View file @
4c9868f1
...
...
@@ -29,8 +29,9 @@
android:paddingRight=
"22dp"
android:text=
"去咨询"
android:textSize=
"12dp"
android:textColor=
"
#ffffff
"
android:textColor=
"
@color/im_but_text_color
"
android:layout_marginTop=
"20dp"
android:background=
"@drawable/im_chat_unusual_view_btn_bg"
/>
android:background=
"@drawable/im_chat_unusual_view_btn_bg"
/>
</LinearLayout>
m-im/src/main/res/layout/im_message_chat_setting.xml
View file @
4c9868f1
...
...
@@ -57,7 +57,7 @@
android:gravity=
"center"
android:text=
"全部已读"
android:textSize=
"16dp"
android:textColor=
"
#ffffff
"
android:textColor=
"
@color/im_sel_but_text_color
"
android:background=
"@drawable/im_message_chat_setting_sure_btn_bg"
/>
</LinearLayout>
...
...
m-im/src/main/res_uikit/layout/im_nim_ui_title_bar_bottom.xml
View file @
4c9868f1
...
...
@@ -4,24 +4,30 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<ImageView
android:id=
"@+id/image"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"5dp"
android:gravity=
"center_vertical"
/>
android:id=
"@+id/image"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:background=
"?android:attr/selectableItemBackground"
android:contentDescription=
"@null"
android:gravity=
"center_vertical"
/>
<TextView
android:id=
"@+id/tv_left_text"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:drawablePadding=
"@dimen/im_default_dis_size_small"
android:gravity=
"center_vertical"
android:paddingLeft=
"@dimen/im_default_dis_size"
android:paddingRight=
"@dimen/im_default_dis_size"
android:textColor=
"@android:color/white"
android:textSize=
"@dimen/im_default_text_size_big"
/>
android:id=
"@+id/tv_left_text"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_toEndOf=
"@id/image"
android:layout_toRightOf=
"@id/image"
android:background=
"?android:attr/selectableItemBackground"
android:drawablePadding=
"8dp"
android:gravity=
"center_vertical"
android:paddingLeft=
"10dp"
android:paddingRight=
"10dp"
android:textColor=
"@android:color/white"
android:textSize=
"@dimen/platform_default_text_size_big"
tools:text=
"关闭"
tools:textColor=
"@color/platform_black"
/>
<LinearLayout
android:layout_width=
"wrap_content"
...
...
@@ -65,22 +71,34 @@
</LinearLayout>
<ImageView
android:id=
"@+id/rightImage"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_toLeftOf=
"@+id/tv_right_text"
/>
android:id=
"@+id/iv_right"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_alignParentEnd=
"true"
android:layout_alignParentRight=
"true"
android:layout_alignParentTop=
"true"
android:layout_marginEnd=
"8dp"
android:layout_marginRight=
"10dp"
android:background=
"?android:attr/selectableItemBackground"
android:contentDescription=
"@null"
android:gravity=
"center_vertical"
tools:src=
"@drawable/platform_more_green"
/>
<TextView
android:id=
"@+id/tv_right_text"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_alignParentRight=
"true"
android:drawablePadding=
"@dimen/im_default_dis_size_small"
android:gravity=
"center_vertical"
android:paddingLeft=
"@dimen/im_default_dis_size"
android:paddingRight=
"@dimen/im_default_dis_size"
android:textColor=
"@color/im_default_button_bg"
android:textSize=
"@dimen/im_default_text_size_big"
/>
android:id=
"@+id/tv_right_text"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_toLeftOf=
"@id/iv_right"
android:layout_toStartOf=
"@id/iv_right"
android:background=
"?android:attr/selectableItemBackground"
android:gravity=
"center_vertical"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:textColor=
"@color/platform_default_button_bg"
android:textSize=
"@dimen/platform_default_text_size_big"
android:drawablePadding=
"5dp"
tools:drawableLeft=
"@drawable/platform_share"
tools:ignore=
"RelativeOverlap"
/>
<ImageView
android:id=
"@+id/iv_title_divide"
...
...
m-im/src/main/res_uikit/layout/im_ydl_nim_message_activity.xml
View file @
4c9868f1
...
...
@@ -10,6 +10,6 @@
android:id=
"@+id/chat_tb"
android:layout_width=
"match_parent"
android:layout_height=
"44dp"
app:left_start_icon=
"@drawable/
im_titlebar
_back"
/>
app:left_start_icon=
"@drawable/
platform_common
_back"
/>
</LinearLayout>
m-im/src/xlzx/res/values/colors.xml
0 → 100644
View file @
4c9868f1
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--主题色-->
<color
name=
"im_main_theme"
>
#fdbd00
</color>
<!--主题浅色-->
<color
name=
"im_main_theme_light"
>
#FFEC8C
</color>
<!--主题亮色-->
<color
name=
"im_main_theme_bright"
>
#fffae0
</color>
<!--确认按钮背景颜色-->
<color
name=
"im_confirm_bg_color"
>
#FFDD33
</color>
<!--按钮文字颜色-->
<color
name=
"im_but_text_color"
>
#242424
</color>
<!--选择按钮文字颜色-->
<color
name=
"im_sel_but_text_color"
>
#242424
</color>
<!--确认按钮提示字体颜色-->
<color
name=
"im_confirm_text_hint_color"
>
#666666
</color>
<!--筛选条件选择框字体颜色-->
<color
name=
"im_filter_content_text_color_en"
>
#242424
</color>
<color
name=
"im_filter_content_text_color_un"
>
#555555
</color>
<!--私聊按钮背景颜色-->
<color
name=
"im_chat_start_color"
>
#ffd814
</color>
<color
name=
"im_chat_end_color"
>
#ffdb26
</color>
</resources>
m-im/src/ydl/res/values/colors.xml
0 → 100644
View file @
4c9868f1
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--主题色-->
<color
name=
"im_main_theme"
>
#1da1f2
</color>
<!--主题浅色-->
<color
name=
"im_main_theme_light"
>
#60BDF5
</color>
<!--主题亮色-->
<color
name=
"im_main_theme_bright"
>
#E8F6FF
</color>
<!--确认按钮背景颜色-->
<color
name=
"im_confirm_bg_color"
>
#1da1f2
</color>
<!--按钮文字颜色-->
<color
name=
"im_but_text_color"
>
#ffffff
</color>
<!--选择按钮文字颜色-->
<color
name=
"im_sel_but_text_color"
>
#1da1f2
</color>
<!--确认提示颜色-->
<color
name=
"im_confirm_text_hint_color"
>
#60ffffff
</color>
<!--筛选条件选择框字体颜色-->
<color
name=
"im_filter_content_text_color_en"
>
#1da1f2
</color>
<color
name=
"im_filter_content_text_color_un"
>
#242424
</color>
<!--私聊按钮背景颜色-->
<color
name=
"im_chat_start_color"
>
#23B2FA
</color>
<color
name=
"im_chat_end_color"
>
#1DA1F2
</color>
</resources>
ydl-platform/src/main/res/drawable-xhdpi/platform_common_back.png
0 → 100644
View file @
4c9868f1
17 KB
ydl-platform/src/main/res/drawable-xhdpi/platform_common_more.png
0 → 100644
View file @
4c9868f1
416 Bytes
ydl-platform/src/main/res/drawable-xhdpi/platform_common_notice_more_en.png
0 → 100644
View file @
4c9868f1
17.5 KB
ydl-platform/src/main/res/drawable-xhdpi/platform_common_notice_more_un.png
0 → 100644
View file @
4c9868f1
16.9 KB
ydl-platform/src/main/res/drawable-xhdpi/platform_common_share.png
0 → 100644
View file @
4c9868f1
17.5 KB
ydl-platform/src/main/res/layout/platform_ui_title_bar.xml
View file @
4c9868f1
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<ImageView
android:id=
"@+id/image"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:background=
"?android:attr/selectableItemBackground"
android:contentDescription=
"@null"
android:gravity=
"center_vertical"
/>
android:id=
"@+id/image"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"10dp"
android:background=
"?android:attr/selectableItemBackground"
android:contentDescription=
"@null"
android:gravity=
"center_vertical"
/>
<TextView
android:id=
"@+id/tv_left_text"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_toEndOf=
"@id/image"
android:layout_toRightOf=
"@id/image"
android:background=
"?android:attr/selectableItemBackground"
android:drawablePadding=
"8dp"
android:gravity=
"center_vertical"
android:paddingLeft=
"10dp"
android:paddingRight=
"10dp"
android:textColor=
"@android:color/white"
android:textSize=
"@dimen/platform_default_text_size_big"
tools:text=
"关闭"
tools:textColor=
"@color/platform_black"
/>
android:id=
"@+id/tv_left_text"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_toEndOf=
"@id/image"
android:layout_toRightOf=
"@id/image"
android:background=
"?android:attr/selectableItemBackground"
android:drawablePadding=
"8dp"
android:gravity=
"center_vertical"
android:paddingLeft=
"10dp"
android:paddingRight=
"10dp"
android:textColor=
"@android:color/white"
android:textSize=
"@dimen/platform_default_text_size_big"
tools:text=
"关闭"
tools:textColor=
"@color/platform_black"
/>
<TextView
android:id=
"@+id/tv_center_title"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_centerHorizontal=
"true"
android:layout_marginLeft=
"200dp"
android:drawablePadding=
"10dp"
android:ellipsize=
"end"
android:gravity=
"center"
android:lines=
"1"
android:maxEms=
"10"
android:paddingLeft=
"5dp"
android:paddingRight=
"5dp"
android:singleLine=
"true"
android:textColor=
"@color/platform_default_text_color"
android:textSize=
"@dimen/platform_default_text_size_large"
tools:text=
"我是标题我是标题我是标题"
/>
android:id=
"@+id/tv_center_title"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_centerHorizontal=
"true"
android:layout_marginLeft=
"200dp"
android:drawablePadding=
"10dp"
android:ellipsize=
"end"
android:gravity=
"center"
android:lines=
"1"
android:maxEms=
"10"
android:paddingLeft=
"5dp"
android:paddingRight=
"5dp"
android:singleLine=
"true"
android:textColor=
"@color/platform_default_text_color"
android:textSize=
"@dimen/platform_default_text_size_large"
tools:text=
"我是标题我是标题我是标题"
/>
<ImageView
android:id=
"@+id/iv_right"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_alignParentEnd
=
"true"
android:layout_alignParentRight
=
"true"
android:layout_alignParentTop
=
"true"
android:layout_marginEnd=
"8
dp"
android:layout_marginRight=
"10dp"
android:background=
"?android:attr/selectableItemBackground"
android:contentDescription=
"@null"
android:gravity=
"center_vertical"
tools:src=
"@drawable/platform_more_green"
/>
android:id=
"@+id/iv_right"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_alignParentTop
=
"true"
android:layout_alignParentEnd
=
"true"
android:layout_alignParentRight
=
"true"
android:layout_marginEnd=
"10
dp"
android:layout_marginRight=
"10dp"
android:background=
"?android:attr/selectableItemBackground"
android:contentDescription=
"@null"
android:gravity=
"center_vertical"
tools:src=
"@drawable/platform_common_notice_more_un"
/>
<TextView
android:id=
"@+id/tv_right_text"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_toLeftOf=
"@id/iv_right
"
android:layout_toStartOf=
"@id/iv_right
"
android:background=
"?android:attr/selectableItemBackground
"
android:gravity=
"center_vertical
"
android:layout_marginLeft=
"10dp
"
android:layout_marginRight=
"10
dp"
android:textColor=
"@color/platform_default_button_bg
"
android:textSize=
"@dimen/platform_default_text_size_bi
g"
android:drawablePadding=
"5dp
"
tools:drawableLeft=
"@drawable/platform
_share"
tools:ignore=
"RelativeOverlap"
/>
android:id=
"@+id/tv_right_text"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"10dp
"
android:layout_marginRight=
"10dp
"
android:layout_toStartOf=
"@id/iv_right
"
android:layout_toLeftOf=
"@id/iv_right
"
android:background=
"?android:attr/selectableItemBackground
"
android:drawablePadding=
"5
dp"
android:gravity=
"center_vertical
"
android:textColor=
"@color/platform_default_button_b
g"
android:textSize=
"@dimen/platform_default_text_size_big
"
tools:drawableLeft=
"@drawable/platform_common
_share"
tools:ignore=
"RelativeOverlap"
/>
<View
android:id=
"@+id/iv_title_divide"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/divide_line_stroke_width"
android:layout_alignParentBottom=
"true"
android:background=
"@color/platform_divide_color"
/>
android:id=
"@+id/iv_title_divide"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/divide_line_stroke_width"
android:layout_alignParentBottom=
"true"
android:background=
"@color/platform_divide_color"
/>
</RelativeLayout>
\ No newline at end of file
ydl-webview/src/main/java/com/ydl/webview/NewH5Activity.java
View file @
4c9868f1
...
...
@@ -477,7 +477,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
private
void
initView
()
{
tb_title
=
(
TitleBar
)
findViewById
(
R
.
id
.
tb_title
);
tb_title
.
setPaddingLeft
(
2
0
);
tb_title
.
setPaddingLeft
(
1
0
);
wv_content
=
(
ProgressWebView
)
findViewById
(
R
.
id
.
wv_content
);
backgroundView
=
findViewById
(
R
.
id
.
iv_background
);
store_house_ptr_frame
=
(
PtrFrameLayout
)
findViewById
(
R
.
id
.
store_house_ptr_frame
);
...
...
@@ -532,7 +532,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
if
(!
TextUtils
.
isEmpty
(
h5Params
.
getTitle
())
&&
!
h5Params
.
getShowUrlTitle
())
{
tb_title
.
setTitle
(
h5Params
.
getTitle
());
}
tb_title
.
setImage
(
getResources
().
getDrawable
(
YDLConstants
.
FROM_YDL
.
equals
(
appFrom
)?
R
.
drawable
.
platform_toolbar_back
:
R
.
drawable
.
platform_toolbar_back_yellow
));
tb_title
.
setImage
(
getResources
().
getDrawable
(
R
.
drawable
.
platform_common_back
));
WebSettings
setting
=
wv_content
.
getSettings
();
setting
.
setJavaScriptEnabled
(
true
);
//支持js
...
...
@@ -897,7 +897,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
}
private
void
initShareMenu
()
{
tb_title
.
setRightIcon
(
getResources
().
getDrawable
(
YDLConstants
.
FROM_YDL
.
equals
(
appFrom
)?
R
.
drawable
.
platform_share
:
R
.
drawable
.
platform_share_yellow
));
tb_title
.
setRightIcon
(
getResources
().
getDrawable
(
R
.
drawable
.
platform_common_share
));
tb_title
.
setOnRightTextClick
((
view
,
isActive
)
->
{
share
(
null
,
null
);
});
...
...
@@ -1040,7 +1040,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
tb_title
.
setImageVis
(
1
);
}
}
else
{
tb_title
.
setImage
(
getResources
().
getDrawable
(
YDLConstants
.
FROM_YDL
.
equals
(
appFrom
)?
R
.
drawable
.
platform_toolbar_back
:
R
.
drawable
.
platform_toolbar_back_yellow
));
tb_title
.
setImage
(
getResources
().
getDrawable
(
R
.
drawable
.
platform_common_back
));
tb_title
.
setmLeftText
(
""
);
if
(
"top"
.
equals
(
type
))
{
setTitle
(
wv_content
.
getTitle
());
...
...
@@ -1195,9 +1195,9 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
}
if
(
h5Params
.
isShowMenu
())
{
if
(
YdlCommonRouterManager
.
INSTANCE
.
getYdlCommonRoute
().
isHasUnread
())
{
tb_title
.
setImage_right
(
getResources
().
getDrawable
(
YDLConstants
.
FROM_YDL
.
equals
(
appFrom
)?
R
.
drawable
.
platform_more12r
:
R
.
drawable
.
platform_more12r_yellow
));
tb_title
.
setImage_right
(
getResources
().
getDrawable
(
R
.
drawable
.
platform_common_notice_more_en
));
}
else
{
tb_title
.
setImage_right
(
getResources
().
getDrawable
(
YDLConstants
.
FROM_YDL
.
equals
(
appFrom
)?
R
.
drawable
.
platform_more12x
:
R
.
drawable
.
platform_more12x_yellow
));
tb_title
.
setImage_right
(
getResources
().
getDrawable
(
R
.
drawable
.
platform_common_notice_more_un
));
}
}
if
(
backgroundView
.
getVisibility
()
==
View
.
VISIBLE
)
{
...
...
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