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
deddb032
Commit
deddb032
authored
May 22, 2022
by
范玉宾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
H5 debug done
parent
a3ad4cce
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
1469 additions
and
202 deletions
+1469
-202
WVClickAbstractListener.java
app/src/main/java/com/ydl/component/service/web/WVClickAbstractListener.java
+25
-1
WebJavascriptHandler.kt
app/src/main/java/com/ydl/component/service/web/WebJavascriptHandler.kt
+33
-0
WebViewClientClickListener.java
app/src/main/java/com/ydl/component/service/web/WebViewClientClickListener.java
+8
-0
config.gradle
config.gradle
+4
-4
MeditationTypeAdapter.kt
m-home/src/main/java/com/yidianling/home/MeditationTypeAdapter.kt
+43
-14
MeditationViewPagerAdapter.kt
m-home/src/main/java/com/yidianling/home/MeditationViewPagerAdapter.kt
+7
-4
MeditationModuleBean.kt
m-home/src/main/java/com/yidianling/home/model/bean/MeditationModuleBean.kt
+14
-3
HomeMuseView.kt
m-home/src/ydl/java/com/yidianling/home/ui/view/HomeMuseView.kt
+47
-24
build.gradle
m-muse/build.gradle
+4
-1
PlayMeditationActivity.kt
m-muse/src/main/java/com/yidianling/muse/activity/PlayMeditationActivity.kt
+0
-0
MeditationModule.kt
m-muse/src/main/java/com/yidianling/muse/bean/MeditationModule.kt
+10
-21
MeditationPlayModuleBean.kt
m-muse/src/main/java/com/yidianling/muse/bean/MeditationPlayModuleBean.kt
+12
-12
MediaPlayerManager.java
m-muse/src/main/java/com/yidianling/muse/helper/MediaPlayerManager.java
+0
-94
MediaPlayerManager.kt
m-muse/src/main/java/com/yidianling/muse/helper/MediaPlayerManager.kt
+88
-0
MeditationFloatWindow.kt
m-muse/src/main/java/com/yidianling/muse/helper/MeditationFloatWindow.kt
+0
-0
MeditationPlayWindowController.kt
m-muse/src/main/java/com/yidianling/muse/helper/MeditationPlayWindowController.kt
+224
-0
MuseHttp.kt
m-muse/src/main/java/com/yidianling/muse/http/MuseHttp.kt
+26
-10
MusePagerApi.kt
m-muse/src/main/java/com/yidianling/muse/http/MusePagerApi.kt
+4
-4
ShareMeditationDialog.kt
m-muse/src/main/java/com/yidianling/muse/widget/ShareMeditationDialog.kt
+1
-1
bg_play_meditation_float_view.xml
m-muse/src/main/res/drawable/bg_play_meditation_float_view.xml
+9
-0
icon_close_meditation_play_float_view.xml
m-muse/src/main/res/drawable/icon_close_meditation_play_float_view.xml
+22
-0
activity_play_meditation.xml
m-muse/src/main/res/layout/activity_play_meditation.xml
+1
-0
layout_meditation_play_float_view.xml
m-muse/src/main/res/layout/layout_meditation_play_float_view.xml
+87
-0
user_mine_ic_my_meditation.xml
m-user/src/main/res/drawable/user_mine_ic_my_meditation.xml
+69
-0
user_mine_fragment_mine.xml
m-user/src/main/res/layout/user_mine_fragment_mine.xml
+1
-1
ShareData.kt
ydl-platform/src/main/java/com/ydl/ydlcommon/bean/ShareData.kt
+4
-0
MeditationEvent.kt
ydl-platform/src/main/java/com/ydl/ydlcommon/event/MeditationEvent.kt
+20
-0
build.gradle
ydl-webview/build.gradle
+1
-0
ShareMeditationDialog.kt
ydl-webview/src/main/java/com/ydl/view/ShareMeditationDialog.kt
+212
-0
H5JsBean.kt
ydl-webview/src/main/java/com/ydl/webview/H5JsBean.kt
+25
-0
NewH5Activity.java
ydl-webview/src/main/java/com/ydl/webview/NewH5Activity.java
+39
-8
bg_share_play_meditation_bottom.xml
ydl-webview/src/main/res/drawable/bg_share_play_meditation_bottom.xml
+9
-0
bg_share_play_meditation_bottom_dark.xml
ydl-webview/src/main/res/drawable/bg_share_play_meditation_bottom_dark.xml
+9
-0
ic_icon_friends.xml
ydl-webview/src/main/res/drawable/ic_icon_friends.xml
+19
-0
ic_icon_qq.xml
ydl-webview/src/main/res/drawable/ic_icon_qq.xml
+19
-0
ic_icon_qqzone.xml
ydl-webview/src/main/res/drawable/ic_icon_qqzone.xml
+19
-0
ic_icon_weixin.xml
ydl-webview/src/main/res/drawable/ic_icon_weixin.xml
+19
-0
icon_meditation_share_friends.xml
ydl-webview/src/main/res/drawable/icon_meditation_share_friends.xml
+30
-0
icon_meditation_share_qq.xml
ydl-webview/src/main/res/drawable/icon_meditation_share_qq.xml
+30
-0
icon_meditation_share_qqzone.xml
ydl-webview/src/main/res/drawable/icon_meditation_share_qqzone.xml
+30
-0
icon_meditation_share_save.xml
ydl-webview/src/main/res/drawable/icon_meditation_share_save.xml
+24
-0
icon_meditation_share_wechat.xml
ydl-webview/src/main/res/drawable/icon_meditation_share_wechat.xml
+30
-0
layout_share_meditation_dialog.xml
ydl-webview/src/main/res/layout/layout_share_meditation_dialog.xml
+178
-0
styles.xml
ydl-webview/src/main/res/values/styles.xml
+13
-0
No files found.
app/src/main/java/com/ydl/component/service/web/WVClickAbstractListener.java
View file @
deddb032
...
...
@@ -2,6 +2,7 @@ package com.ydl.component.service.web;
import
android.app.Activity
;
import
android.content.Intent
;
import
com.alibaba.android.arouter.launcher.ARouter
;
import
com.ydl.confide.api.IConfideService
;
...
...
@@ -405,7 +406,9 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
@Override
public
void
closeWebKit
()
{
if
(
mContext
instanceof
NewH5Activity
)
{
((
NewH5Activity
)
mContext
).
finish
();
}
}
@Override
...
...
@@ -446,5 +449,26 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
}
}
@Override
public
void
playMeditation
(
int
mediaId
,
long
meditationId
,
int
meditationType
,
String
mediaCoverUrl
)
{
if
(
mContext
instanceof
NewH5Activity
)
{
ARouter
.
getInstance
().
build
(
"/muse/play"
)
.
withLong
(
"MEDITATION_ID"
,
meditationId
)
.
withLong
(
"MEDIA_ID"
,
mediaId
)
.
withInt
(
"MEDITATION_TYPE"
,
meditationType
)
.
withString
(
"MEDIA_COVER_URL"
,
mediaCoverUrl
)
.
navigation
();
}
}
@Override
public
void
switchSound
(
int
mediaId
,
long
meditationId
,
int
meditationType
,
int
businessType
,
String
buried
,
String
mediaUrl
,
String
mediaCoverUrl
,
String
title
,
String
desc
,
int
status
)
{
if
(
mContext
instanceof
NewH5Activity
)
{
((
NewH5Activity
)
mContext
).
switchSound
(
mediaId
,
meditationId
,
meditationType
,
businessType
,
buried
,
mediaUrl
,
mediaCoverUrl
,
title
,
desc
,
status
);
}
}
}
app/src/main/java/com/ydl/component/service/web/WebJavascriptHandler.kt
View file @
deddb032
...
...
@@ -381,6 +381,39 @@ class WebJavascriptHandler : IJavascriptHandler{
wvEnventPro
?.
setSelfPageType
(
it
.
selfPageType
)
}
}
"meditation_play"
->
{
jsData
.
cmd
!!
.
params
?.
let
{
val
mediaId
=
it
.
mediaId
val
meditationId
=
it
.
meditationId
val
meditationType
=
it
.
meditionType
val
mediaCoverUrl
=
it
.
coverImageUrl
if
(
mediaId
!=
null
&&
meditationId
!=
null
&&
meditationType
!=
null
)
{
wvEnventPro
?.
playMeditation
(
mediaId
,
meditationId
.
toLong
(),
meditationType
,
mediaCoverUrl
)
}
}
}
"switch_sound"
->
{
jsData
.
cmd
!!
.
params
?.
let
{
val
mediaId
=
it
.
mediaId
val
meditationId
=
it
.
meditationId
val
meditationType
=
it
.
meditionType
val
businessType
=
it
.
businessType
val
buried
=
it
.
buried
val
mediaUrl
=
it
.
mediaUrl
val
mediaCoverUrl
=
it
.
coverImageUrl
val
title
=
it
.
title
val
desc
=
it
.
desc
val
status
=
it
.
status
if
(
mediaId
!=
null
&&
meditationId
!=
null
&&
meditationType
!=
null
)
{
wvEnventPro
?.
switchSound
(
mediaId
,
meditationType
.
toLong
(),
businessType
!!
,
meditationId
,
buried
,
mediaUrl
,
mediaCoverUrl
,
title
,
desc
,
status
)
}
}
}
}
}
}
app/src/main/java/com/ydl/component/service/web/WebViewClientClickListener.java
View file @
deddb032
...
...
@@ -182,4 +182,12 @@ public interface WebViewClientClickListener {
//设置当前页面类型
void
setSelfPageType
(
int
selfType
);
default
void
playMeditation
(
int
mediaId
,
long
meditationId
,
int
meditationType
,
String
mediaCoverUrl
){}
default
void
switchSound
(
int
mediaId
,
long
meditationId
,
int
meditationType
,
int
businessType
,
String
buried
,
String
mediaUrl
,
String
mediaCoverUrl
,
String
title
,
String
desc
,
int
status
){
}
}
config.gradle
View file @
deddb032
...
...
@@ -35,10 +35,10 @@ ext {
//mdt 组件
"ydl-tuicore"
:
"0.0.22"
,
//第一步
"ydl-platform"
:
"0.0.4
0.96
"
,
"ydl-platform"
:
"0.0.4
1.2
"
,
//第二步 若干
"ydl-webview"
:
"0.0.38.
6
1"
,
"ydl-webview"
:
"0.0.38.
7
1"
,
"ydl-media"
:
"0.0.21.44"
,
"ydl-pay"
:
"0.0.18.19"
,
"m-audioim"
:
"0.0.49.29.85"
,
...
...
@@ -119,10 +119,10 @@ ext {
//mdt组件
"ydl-tuicore"
:
"0.0.22"
,
//第一步
"ydl-platform"
:
"0.0.4
0.96
"
,
"ydl-platform"
:
"0.0.4
1.2
"
,
//第二步 若干
"ydl-webview"
:
"0.0.38.
6
1"
,
"ydl-webview"
:
"0.0.38.
7
1"
,
"ydl-media"
:
"0.0.21.44"
,
"ydl-pay"
:
"0.0.18.19"
,
"m-audioim"
:
"0.0.49.29.85"
,
...
...
m-home/src/main/java/com/yidianling/home/MeditationTypeAdapter.kt
View file @
deddb032
...
...
@@ -11,14 +11,25 @@ import androidx.cardview.widget.CardView
import
androidx.recyclerview.widget.RecyclerView
import
com.alibaba.android.arouter.launcher.ARouter
import
com.bumptech.glide.Glide
import
com.ydl.webview.H5Params
import
com.ydl.webview.NewH5Activity
import
com.ydl.ydl_router.manager.YDLRouterManager
import
com.ydl.ydlcommon.utils.Utils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.home.constants.HomeBIConstants
import
com.yidianling.home.model.bean.MeditationModuleBean
import
com.yidianling.user.ui.login.OneKeyLoginHelp
import
kotlinx.android.synthetic.ydl.home_fragment.*
class
MeditationTypeAdapter
(
private
val
context
:
Context
,
private
val
data
:
List
<
MeditationModuleBean
.
MeditationDetail
>,
private
val
meditationType
:
Int
private
val
moreLink
:
String
,
private
val
homeLink
:
String
?=
null
,
private
val
cateId
:
Long
?=
null
,
private
val
mark
:
Int
?=
null
,
private
val
meditationType
:
Int
)
:
RecyclerView
.
Adapter
<
RecyclerView
.
ViewHolder
>()
{
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
viewType
:
Int
):
RecyclerView
.
ViewHolder
{
...
...
@@ -53,22 +64,40 @@ class MeditationTypeAdapter(
it
.
text
=
data
[
position
].
title
}
holder
.
cvLayout
?.
setOnClickListener
{
if
(!
OneKeyLoginHelp
.
startLoginByStatus
(
context
,
true
))
{
return
@setOnClickListener
if
(
meditationType
==
0
){
if
(!
OneKeyLoginHelp
.
startLoginByStatus
(
context
,
true
))
{
return
@setOnClickListener
}
ARouter
.
getInstance
().
build
(
"/muse/play"
)
.
withLong
(
"MEDITATION_ID"
,
data
[
position
].
meditationId
)
.
withInt
(
"MEDITATION_TYPE"
,
meditationType
)
.
withFloat
(
"MEDIA_DURATION"
,
data
[
position
].
duration
?:
0.0f
)
.
withString
(
"MEDIA_URL"
,
data
[
position
].
mediaIdCoverImageUrl
)
.
withString
(
"MEDIA_COVER_URL"
,
data
[
position
].
mediaIdCoverImageUrl
)
.
navigation
()
}
else
{
if
(
Utils
.
isFastClick
())
{
//防止连击
return
@setOnClickListener
}
val
homeLink
=
"${homeLink}mark=$mark&cateId=$cateId&meditationId=${data[position].meditationId}"
if
(!
homeLink
.
isNullOrBlank
())
{
NewH5Activity
.
start
(
context
,
H5Params
(
homeLink
,
null
))
}
}
ARouter
.
getInstance
().
build
(
"/muse/play"
)
.
withLong
(
"MEDITATION_ID"
,
data
[
position
].
meditationId
)
.
withInt
(
"MEDITATION_TYPE"
,
meditationType
)
.
navigation
()
}
}
is
MeditationTypeMoreViewHolder
->
{
holder
.
llMoreLayout
?.
setOnClickListener
{
ToastUtil
.
toastShort
(
"查看更多类型!"
)
if
(
Utils
.
isFastClick
())
{
//防止连击
return
@setOnClickListener
}
val
moreLink
=
"${moreLink}mark=$mark&cateId=$cateId"
if
(!
moreLink
.
isNullOrBlank
())
{
NewH5Activity
.
start
(
context
,
H5Params
(
moreLink
,
null
))
}
}
}
}
...
...
@@ -76,9 +105,9 @@ class MeditationTypeAdapter(
}
override
fun
getItemCount
():
Int
{
return
if
(
data
.
isNotEmpty
()){
return
if
(
data
.
isNotEmpty
())
{
data
.
size
+
1
}
else
{
}
else
{
data
.
size
}
}
...
...
@@ -94,7 +123,7 @@ class MeditationTypeAdapter(
}
inner
class
MeditationTypeViewHolder
(
itemView
:
View
)
:
RecyclerView
.
ViewHolder
(
itemView
)
{
val
cvLayout
:
CardView
?
=
itemView
.
findViewById
(
R
.
id
.
card_view
)
val
cvLayout
:
CardView
?
=
itemView
.
findViewById
(
R
.
id
.
card_view
)
val
ivType
:
ImageView
?
=
itemView
.
findViewById
(
R
.
id
.
iv_meditation_type
)
val
tvName
:
TextView
?
=
itemView
.
findViewById
(
R
.
id
.
tv_meditation_type
)
}
...
...
m-home/src/main/java/com/yidianling/home/MeditationViewPagerAdapter.kt
View file @
deddb032
...
...
@@ -6,7 +6,6 @@ import android.view.View
import
android.view.ViewGroup
import
androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.RecyclerView
import
com.ydl.ydlcommon.utils.LogUtil
import
com.yidianling.home.model.bean.MeditationModuleBean
class
MeditationViewPagerAdapter
(
private
val
context
:
Context
,
private
val
data
:
...
...
@@ -23,8 +22,13 @@ class MeditationViewPagerAdapter(private val context: Context, private val data:
rv
.
layoutManager
=
LinearLayoutManager
(
context
,
LinearLayoutManager
.
HORIZONTAL
,
false
)
rv
.
adapter
=
data
.
mditationListResponse
?.
get
(
position
)
?.
let
{
MeditationTypeAdapter
(
context
,
it
.
mditationResponseList
,
it
.
meditionType
)
MeditationTypeAdapter
(
context
=
context
,
data
=
it
.
mditationResponseList
,
moreLink
=
it
.
lowerFloorMore
?:
""
,
homeLink
=
it
.
mditationDetailUrl
,
cateId
=
it
.
cateId
,
mark
=
it
.
mark
,
meditationType
=
it
.
meditionType
)
}
}
}
...
...
@@ -35,7 +39,6 @@ class MeditationViewPagerAdapter(private val context: Context, private val data:
inner
class
MeditationViewPagerViewHolder
(
itemView
:
View
):
RecyclerView
.
ViewHolder
(
itemView
){
val
rv
:
RecyclerView
?
=
itemView
.
findViewById
(
R
.
id
.
rv_meditation_type
)
}
}
...
...
m-home/src/main/java/com/yidianling/home/model/bean/MeditationModuleBean.kt
View file @
deddb032
...
...
@@ -15,7 +15,9 @@ class MeditationModuleBean : HomeItemBaseBean {
val
mditationDay
:
Int
=
0
,
val
desc
:
String
?=
null
,
val
videoLink
:
String
?=
null
,
val
uid
:
Int
val
uid
:
Int
,
val
mditationIndexUrl
:
String
?=
null
,
val
upperFloorMore
:
String
?=
null
)
/**
* 冥想数据
...
...
@@ -27,6 +29,10 @@ class MeditationModuleBean : HomeItemBaseBean {
val
comment
:
String
,
val
meditionType
:
Int
,
val
cateId
:
Long
,
val
mark
:
Int
,
val
buried
:
String
?=
null
,
val
lowerFloorMore
:
String
?=
null
,
val
mditationDetailUrl
:
String
?=
null
,
val
mditationResponseList
:
ArrayList
<
MeditationDetail
>
)
...
...
@@ -35,7 +41,11 @@ class MeditationModuleBean : HomeItemBaseBean {
val
meditationId
:
Long
,
val
title
:
String
,
val
coverImageUrl
:
String
,
val
tagId
:
Int
)
val
tagId
:
Int
,
val
mediaUrl
:
String
?=
null
,
val
duration
:
Float
?
=
null
,
val
mediaId
:
Int
,
val
mediaIdCoverImageUrl
:
String
?=
null
)
}
\ No newline at end of file
m-home/src/ydl/java/com/yidianling/home/ui/view/HomeMuseView.kt
View file @
deddb032
...
...
@@ -11,10 +11,14 @@ import android.view.View
import
android.view.ViewGroup
import
android.widget.LinearLayout
import
androidx.recyclerview.widget.RecyclerView
import
com.bumptech.glide.Glide
import
com.google.android.material.tabs.TabLayout
import
com.google.android.material.tabs.TabLayoutMediator
import
com.google.gson.Gson
import
com.ydl.webview.H5Params
import
com.ydl.webview.NewH5Activity
import
com.ydl.ydl_image.module.GlideApp
import
com.ydl.ydlcommon.utils.Utils
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.home.MeditationViewPagerAdapter
import
com.yidianling.home.R
...
...
@@ -55,44 +59,63 @@ class HomeMuseView(private val mContext: Context, private var homeEvent: IHomeEv
if
(
null
!=
bean
)
{
var
dataJson
=
Gson
().
toJson
(
bean
)
val
moreLink
=
bean
.
mditationIndexInfo
?.
upperFloorMore
homeModuleMuseViewHomeCommonTitleView
.
setOnClickListener
{
homeEvent
?.
museMoreClick
(
Gson
().
toJson
(
bean
))
// homeEvent?.museMoreClick(Gson().toJson(bean))
if
(
Utils
.
isFastClick
())
{
//防止连击
return
@setOnClickListener
}
if
(!
moreLink
.
isNullOrBlank
())
{
NewH5Activity
.
start
(
context
,
H5Params
(
moreLink
,
null
))
}
}
val
greeting
=
bean
.
mditationIndexInfo
?.
greetings
?:
"你好"
tv_time
.
text
=
greeting
val
slogan
=
if
(
bean
.
mditationIndexInfo
?.
mditationDay
==
null
){
if
(
bean
.
mditationIndexInfo
?.
desc
.
isNullOrBlank
()
){
"无常的日子里,呼吸间拾起力量"
}
else
{
"已连续冥想${bean?.mditationIndexInfo?.mditationDay}天"
bean
?.
mditationIndexInfo
?.
desc
}
tv_meditation_slogan
.
text
=
slogan
val
videoUrl
=
bean
?.
mditationIndexInfo
?.
videoLink
?:
"http://www.w3school.com.cn/example/html5/mov_bbb.mp4"
GlideApp
.
with
(
this
)
.
load
(
videoUrl
)
.
into
(
iv_video_background
)
video_view
?.
setVideoPath
(
videoUrl
)
video_view
?.
setOnErrorListener
{
mp
,
what
,
extra
->
ToastUtil
.
toastShort
(
"视频播放失败!"
)
true
}
video_view
?.
setOnPreparedListener
{
it
?.
setVideoScalingMode
(
MediaPlayer
.
VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING
)
video_view
?.
setOnInfoListener
{
mp
,
what
,
extra
->
if
(
what
==
MediaPlayer
.
MEDIA_INFO_VIDEO_RENDERING_START
){
iv_video_background
.
visibility
=
GONE
}
val
videoUrl
=
bean
?.
mditationIndexInfo
?.
videoLink
if
(
videoUrl
.
isNullOrBlank
()){
Glide
.
with
(
this
)
.
load
(
bean
.
mditationIndexInfo
?.
mditationIndexUrl
)
.
into
(
iv_video_background
)
}
else
{
GlideApp
.
with
(
this
)
.
load
(
videoUrl
)
.
into
(
iv_video_background
)
video_view
?.
setVideoPath
(
videoUrl
)
video_view
?.
setOnErrorListener
{
mp
,
what
,
extra
->
Glide
.
with
(
this
)
.
load
(
bean
.
mditationIndexInfo
?.
mditationIndexUrl
)
.
into
(
iv_video_background
)
true
}
it
?.
start
()
it
?.
setVolume
(
0.0F
,
0.0F
)
video_view
?.
setOnPreparedListener
{
it
?.
setVideoScalingMode
(
MediaPlayer
.
VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING
)
video_view
?.
setOnInfoListener
{
mp
,
what
,
extra
->
if
(
what
==
MediaPlayer
.
MEDIA_INFO_VIDEO_RENDERING_START
){
iv_video_background
.
visibility
=
GONE
}
true
}
it
?.
start
()
it
?.
setVolume
(
0.0F
,
0.0F
)
}
video_view
?.
setOnCompletionListener
{
video_view
?.
start
()
}
}
video_view
?.
setOnCompletionListener
{
video_view
?.
start
()
}
bean
?.
mditationListResponse
?.
forEach
{
meditationTitles
.
add
(
it
.
comment
)
...
...
m-muse/build.gradle
View file @
deddb032
...
...
@@ -54,6 +54,9 @@ dependencies {
api
fileTree
(
dir:
'libs'
,
include:
[
'*.jar'
,
'*.aar'
])
implementation
'androidx.appcompat:appcompat:1.2.0'
implementation
project
(
path:
':ydl-webview'
)
implementation
project
(
path:
':ydl-platform'
)
implementation
project
(
path:
':ydl-platform'
)
testImplementation
'junit:junit:4.13.2'
androidTestImplementation
'androidx.test.ext:junit:1.1.2'
androidTestImplementation
'androidx.test.espresso:espresso-core:3.3.0'
...
...
@@ -63,7 +66,7 @@ dependencies {
// solve build problem
// cannot access 'androidx.lifecycle.hasdefaultviewmodelproviderfactory'
// Comment out when compiling
implementation
"androidx.lifecycle:lifecycle-extensions:2.2.0"
//
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
implementation
"com.alibaba:arouter-api:$arouter_api"
// 注意此处的依赖方式:kotlin中使用和java中使用方式有不同
...
...
m-muse/src/main/java/com/yidianling/muse/activity/PlayMeditationActivity.kt
View file @
deddb032
This diff is collapsed.
Click to expand it.
m-muse/src/main/java/com/yidianling/muse/bean/MeditationModule.kt
View file @
deddb032
...
...
@@ -2,13 +2,18 @@ package com.yidianling.muse.bean
data class
CollectResultModule
(
val
code
:
String
,
val
data
:
String
?=
null
,
val
msg
:
String
?=
null
,
val
err_msg
:
String
?=
null
)
val
data
:
String
,
val
msg
:
String
,
val
errMsg
:
String
){
override
fun
toString
():
String
{
return
"CollectResultModule(code='$code', data='$data', msg='$msg', errMsg='$errMsg')"
}
}
data class
MeditationCollectRequestModule
(
val
meditationId
:
Long
,
val
mediaId
:
Long
,
val
status
:
Int
,
val
businessType
:
Int
)
...
...
@@ -25,20 +30,5 @@ data class MeditationPlayRecordResponseModule(
val
code
:
String
,
val
data
:
String
?
=
null
,
val
msg
:
String
?
=
null
,
val
err_msg
:
String
?
=
null
)
data class
MeditationShareRequestModule
(
val
meditationId
:
Int
val
errMsg
:
String
?
=
null
)
data class
MeditationShareResponseModule
(
val
code
:
String
,
val
msg
:
String
?,
val
data
:
MeditationShareUrl
?=
null
,
val
err_msg
:
String
?
=
null
)
data class
MeditationShareUrl
(
val
poster
:
String
?
)
\ No newline at end of file
m-muse/src/main/java/com/yidianling/muse/bean/MeditationPlayModuleBean.kt
View file @
deddb032
...
...
@@ -10,25 +10,24 @@ class MeditationPlayModuleBean : HomeItemBaseBean {
var
meditationId
:
Long
?
=
null
var
mediaId
:
Long
?
=
null
var
title
:
String
?=
null
var
dec
:
String
?=
null
var
meditationBackgroundImage
:
String
?=
null
var
duration
:
Int
=
0
var
coverImageUrlIcon
:
String
=
""
var
uid
:
Int
=
0
var
broadcastTime
:
Int
=
0
var
mediaUrl
:
String
=
""
var
mediaType
:
Int
?=
null
var
playDetailUrl
:
String
?
=
null
var
mediaList
:
ArrayList
<
MeditationDetail
>?
=
null
data class
MeditationDetail
(
val
i
d
:
Long
,
val
mediaI
d
:
Long
,
val
title
:
String
,
val
type
:
String
,
val
author
:
String
,
val
coverImageUrl
:
String
,
val
mediaUrl
:
String
,
val
duration
:
Int
)
val
duration
:
Float
?=
null
,
val
status
:
Int
,
val
broadcastTime
:
Int
,
val
businessType
:
Int
,
val
buried
:
String
?=
null
,
val
desc
:
String
?=
null
,
val
coverImageUrlIcon
:
String
)
}
\ No newline at end of file
m-muse/src/main/java/com/yidianling/muse/helper/MediaPlayerManager.java
deleted
100644 → 0
View file @
a3ad4cce
package
com
.
yidianling
.
muse
.
helper
;
import
android.content.Context
;
import
android.media.AudioManager
;
import
android.media.MediaPlayer
;
import
java.io.IOException
;
public
class
MediaPlayerManager
{
private
Context
mContext
;
private
MediaPlayer
mMediaPlayer
;
private
String
mPath
;
private
volatile
static
MediaPlayerManager
instance
;
private
MediaPlayerManager
(
Context
context
){
mContext
=
context
;
mMediaPlayer
=
new
MediaPlayer
();
mMediaPlayer
.
setAudioStreamType
(
AudioManager
.
STREAM_MUSIC
);
}
public
static
MediaPlayerManager
getInstance
(
Context
context
){
if
(
instance
==
null
){
synchronized
(
MediaPlayerManager
.
class
){
if
(
instance
==
null
){
instance
=
new
MediaPlayerManager
(
context
);
}
}
}
return
instance
;
}
public
MediaPlayer
getMediaPlayer
(){
return
mMediaPlayer
;
}
public
void
setPath
(
String
path
)
{
mPath
=
path
;
try
{
if
(
mMediaPlayer
.
isPlaying
()){
mMediaPlayer
.
reset
();
}
mMediaPlayer
.
setDataSource
(
path
);
mMediaPlayer
.
prepare
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
public
void
setNewPath
(
String
path
){
mPath
=
path
;
try
{
mMediaPlayer
.
reset
();
mMediaPlayer
.
setDataSource
(
path
);
mMediaPlayer
.
prepare
();
mMediaPlayer
.
start
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
public
String
getPath
(){
return
mPath
;
}
public
void
play
(){
if
(
mMediaPlayer
.
isPlaying
())
return
;
mMediaPlayer
.
start
();
}
public
void
pause
(){
if
(
mMediaPlayer
.
isPlaying
())
mMediaPlayer
.
pause
();
}
public
void
seekTo
(
int
position
){
mMediaPlayer
.
seekTo
(
position
);
}
public
void
stop
(){
if
(
mMediaPlayer
.
isPlaying
()){
mMediaPlayer
.
reset
();
}
}
public
void
release
(){
if
(
mMediaPlayer
!=
null
)
{
mMediaPlayer
.
reset
();
}
}
}
m-muse/src/main/java/com/yidianling/muse/helper/MediaPlayerManager.kt
0 → 100644
View file @
deddb032
package
com.yidianling.muse.helper
import
android.content.Context
import
android.media.AudioManager
import
android.media.MediaPlayer
import
android.net.Uri
import
java.io.IOException
import
kotlin.properties.Delegates
class
MediaPlayerManager
private
constructor
()
{
private
var
listener
:
OnMediaPlayerManagerListener
?=
null
fun
setAudioPath
(
path
:
String
){
mPath
=
path
if
(
mMediaPlayer
.
isPlaying
)
mMediaPlayer
.
reset
()
mMediaPlayer
.
setDataSource
(
mContext
,
Uri
.
parse
(
path
))
mMediaPlayer
.
prepareAsync
()
mMediaPlayer
.
setOnPreparedListener
{
listener
?.
onPrepared
(
it
)
}
}
fun
getAudioPath
():
String
?
=
mPath
fun
isPlaying
()
=
mMediaPlayer
.
isPlaying
fun
play
()
{
if
(
mMediaPlayer
.
isPlaying
)
return
mMediaPlayer
.
start
()
}
fun
pause
()
{
if
(
mMediaPlayer
.
isPlaying
)
mMediaPlayer
.
pause
()
}
fun
seekTo
(
position
:
Int
)
{
mMediaPlayer
.
seekTo
(
position
)
}
fun
stop
()
{
if
(
mMediaPlayer
!!
.
isPlaying
)
{
mMediaPlayer
.
reset
()
}
}
fun
release
()
{
mMediaPlayer
?.
reset
()
}
fun
setOnPreparedListener
(
listener
:
OnMediaPlayerManagerListener
){
this
.
listener
=
listener
}
companion
object
{
private
var
mContext
:
Context
by
Delegates
.
notNull
()
private
var
mMediaPlayer
:
MediaPlayer
by
Delegates
.
notNull
()
private
var
mPath
:
String
?
=
null
@Volatile
private
var
instance
:
MediaPlayerManager
?
=
null
fun
getInstance
(
context
:
Context
):
MediaPlayerManager
?
{
return
when
{
instance
!=
null
->
instance
else
->
synchronized
(
this
)
{
if
(
instance
==
null
){
mContext
=
context
mMediaPlayer
=
MediaPlayer
()
instance
=
MediaPlayerManager
()
}
instance
}
}
}
}
interface
OnMediaPlayerManagerListener
{
fun
onPrepared
(
mediaPlayer
:
MediaPlayer
)
}
}
\ No newline at end of file
m-muse/src/main/java/com/yidianling/muse/helper/MeditationFloatWindow.kt
0 → 100644
View file @
deddb032
This diff is collapsed.
Click to expand it.
m-muse/src/main/java/com/yidianling/muse/helper/MeditationPlayWindowController.kt
0 → 100644
View file @
deddb032
package
com.yidianling.muse.helper
import
android.annotation.SuppressLint
import
android.content.Context
import
android.content.Intent
import
android.graphics.PixelFormat
import
android.graphics.Point
import
android.os.Bundle
import
android.text.TextUtils
import
android.view.Gravity
import
android.view.View
import
android.view.WindowManager
import
androidx.core.view.ViewCompat
import
com.alibaba.android.arouter.launcher.ARouter
import
com.ydl.media.audio.AudioPlayer
import
com.ydl.media.view.PlayTypeEnum
import
com.yidianling.common.tools.RxImageTool
class
MeditationPlayWindowController
{
companion
object
{
@SuppressLint
(
"StaticFieldLeak"
)
private
var
mPlayerFloatView
:
MeditationFloatWindow
?
=
null
//已添加悬浮窗页面全路径名
private
var
showingPageName
:
String
?
=
null
private
var
wm
:
WindowManager
?
=
null
var
isCanClick
=
true
var
playingType
=
PlayTypeEnum
.
PLAY_TYPE_NONE
var
playTempData
=
hashMapOf
<
String
,
String
>()
/**
* 如果有音频正在播放则显示
*/
fun
showIfPlaying
(
context
:
Context
)
{
if
(
MediaPlayerManager
.
getInstance
(
context
)
?.
isPlaying
()
==
true
)
{
show
(
context
)
mPlayerFloatView
?.
updatePlayState
()
}
else
{
hide
()
}
}
/**
* 显示悬浮控件
*/
fun
show
(
context
:
Context
,
playTypeEnum
:
PlayTypeEnum
=
PlayTypeEnum
.
PLAY_TYPE_NONE
,
playData
:
HashMap
<
String
,
String
>
=
hashMapOf
<
String
,
String
>()
)
{
playingType
=
playTypeEnum
if
(
playData
.
size
>
0
)
{
this
.
playTempData
.
putAll
(
playData
)
}
if
(
mPlayerFloatView
==
null
)
{
mPlayerFloatView
=
MeditationFloatWindow
(
context
)
mPlayerFloatView
?.
addFloatClickListener
(
object
:
MeditationFloatWindow
.
FloatViewPlayListener
{
override
fun
onPauseClick
()
{
}
override
fun
onStartClick
()
{
}
override
fun
onPlayFinish
()
{
}
})
}
if
(
showingPageName
!=
context
::
class
.
qualifiedName
)
{
mPlayerFloatView
?.
resetWm
(
context
)
addFloatToWm
(
context
)
}
mPlayerFloatView
?.
resetView
()
mPlayerFloatView
?.
visibility
=
View
.
VISIBLE
mPlayerFloatView
?.
setPlayingState
()
}
fun
hide
()
{
mPlayerFloatView
?.
visibility
=
View
.
GONE
}
fun
addClickListener
(
listener
:
MeditationFloatWindow
.
FloatViewPlayListener
)
{
mPlayerFloatView
?.
addFloatClickListener
(
listener
)
}
fun
removeClickListener
(
listener
:
MeditationFloatWindow
.
FloatViewPlayListener
)
{
mPlayerFloatView
?.
removeFloatClickListener
(
listener
)
}
fun
isShow
(
context
:
Context
):
Boolean
{
return
!
TextUtils
.
isEmpty
(
showingPageName
)
&&
showingPageName
==
context
::
class
.
qualifiedName
&&
mPlayerFloatView
?.
visibility
==
View
.
VISIBLE
}
fun
removeView
(
context
:
Context
)
{
if
(
TextUtils
.
isEmpty
(
showingPageName
)
||
showingPageName
!=
context
::
class
.
qualifiedName
)
{
return
}
mPlayerFloatView
?.
visibility
=
View
.
GONE
wm
?.
removeViewImmediate
(
mPlayerFloatView
)
showingPageName
=
""
wm
=
null
}
fun
onDestroy
()
{
if
(
mPlayerFloatView
!=
null
)
{
if
(!
TextUtils
.
isEmpty
(
showingPageName
))
{
wm
?.
removeViewImmediate
(
mPlayerFloatView
)
showingPageName
=
""
}
mPlayerFloatView
?.
onDestroy
()
mPlayerFloatView
?.
removeAllViews
()
}
}
fun
setPlayingState
(
context
:
Context
)
{
show
(
context
)
mPlayerFloatView
?.
setPlayingState
()
}
fun
updatePlayState
()
{
mPlayerFloatView
?.
updatePlayState
()
}
private
fun
addFloatToWm
(
context
:
Context
)
{
if
(
wm
!=
null
&&
!
TextUtils
.
isEmpty
(
showingPageName
))
{
if
(
ViewCompat
.
isAttachedToWindow
(
mPlayerFloatView
!!
))
{
// if (context is Activity && !(context.isFinishing)){
// wm?.removeViewImmediate(mPlayerFloatView)
// }
wm
?.
removeViewImmediate
(
mPlayerFloatView
)
}
wm
=
null
}
//获取WindowManager
wm
=
context
.
getSystemService
(
Context
.
WINDOW_SERVICE
)
as
WindowManager
//设置LayoutParams(全局变量)相关参数
val
wmParams
=
mPlayerFloatView
?.
wmParams
wmParams
?.
type
=
WindowManager
.
LayoutParams
.
TYPE_APPLICATION
//设置window type
wmParams
?.
format
=
PixelFormat
.
RGBA_8888
//设置图片格式,效果为背景透明
//设置Window flag
wmParams
?.
flags
=
WindowManager
.
LayoutParams
.
FLAG_NOT_TOUCH_MODAL
or
WindowManager
.
LayoutParams
.
FLAG_NOT_FOCUSABLE
wmParams
?.
gravity
=
Gravity
.
LEFT
or
Gravity
.
TOP
//调整悬浮窗口至左上角
//以屏幕左上角为原点,设置x、y初始值
val
size
=
Point
()
wm
?.
defaultDisplay
?.
getSize
(
size
)
wmParams
?.
x
=
0
wmParams
?.
y
=
size
.
y
*
5
/
6
//设置悬浮窗口长宽数据
wmParams
?.
width
=
WindowManager
.
LayoutParams
.
MATCH_PARENT
wmParams
?.
height
=
RxImageTool
.
dp2px
(
56f
)
//显示myFloatView图像
wm
?.
addView
(
mPlayerFloatView
,
wmParams
)
showingPageName
=
context
::
class
.
qualifiedName
!!
}
/**
* 打开播放中的页面详情
*/
fun
startPlayingActivity
(
context
:
Context
?,
fullScreen
:
Int
=
0
)
{
if
(
playingType
==
PlayTypeEnum
.
PLAY_TYPE_FM
)
{
//FM播放页
startFMPlayActivity
(
context
)
}
else
if
(
playingType
==
PlayTypeEnum
.
PLAY_TYPE_COURSE
)
{
var
url
=
AudioPlayer
.
get
().
playMusic
?.
path
//课程播放页
startCoursePlayActivity
(
context
,
1
,
fullScreen
,
url
,
true
)
}
}
fun
startCoursePlayActivity
(
context
:
Context
?,
from
:
Int
,
fullScreen
:
Int
=
0
,
coursePlayUrl
:
String
?
=
""
,
isFromFloatView
:
Boolean
=
false
)
{
ARouter
.
getInstance
()
.
build
(
"/course/play"
)
.
withInt
(
"course_id"
,
playTempData
[
"course_id"
]
?.
toInt
()
?:
0
)
.
withInt
(
"course_type"
,
0
)
.
withString
(
"coursePlayUrl"
,
coursePlayUrl
)
.
withInt
(
"from"
,
from
)
.
withBoolean
(
"isFromFloatView"
,
isFromFloatView
)
.
withInt
(
"fullScreen"
,
fullScreen
)
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
)
.
navigation
()
}
fun
startFMPlayActivity
(
context
:
Context
?)
{
val
bundle
=
Bundle
()
bundle
.
putInt
(
"id"
,
playTempData
[
"fmId"
]
?.
toInt
()
?:
0
)
ARouter
.
getInstance
().
build
(
"/fm/detail"
)
.
withBundle
(
"bundle"
,
bundle
)
.
navigation
()
}
/**
* 获取FM播放Id
*/
fun
getFmId
():
Int
{
return
playTempData
[
"fmId"
]
?.
toInt
()
?:
0
}
}
}
\ No newline at end of file
m-muse/src/main/java/com/yidianling/muse/http/MuseHttp.kt
View file @
deddb032
...
...
@@ -6,6 +6,7 @@ import com.ydl.ydlcommon.data.http.BaseResponse
import
com.ydl.ydlcommon.data.http.RxUtils
import
com.ydl.ydlnet.YDLHttpUtils
import
com.yidianling.muse.bean.*
import
com.yidianling.muse.http.MusePagerApi
import
io.reactivex.Observable
import
okhttp3.MediaType
import
okhttp3.RequestBody
...
...
@@ -49,7 +50,7 @@ class MuseHttp {
):
Observable
<
BaseAPIResponse
<
MeditationPlayModuleBean
>>
{
return
getMusePagerApi
().
getPureMusicPlayDetail
(
meditionType
=
meditionType
,
mditationId
=
meditationId
m
e
ditationId
=
meditationId
)
}
...
...
@@ -65,8 +66,18 @@ class MuseHttp {
)
}
fun
collectMeditation
(
meditationId
:
Long
,
status
:
Int
):
Observable
<
BaseAPIResponse
<
CollectResultModule
>>
{
val
params
=
MeditationCollectRequestModule
(
meditationId
,
status
,
1
)
fun
collectMeditation
(
meditationId
:
Long
,
mediaId
:
Long
,
status
:
Int
,
businessType
:
Int
):
Observable
<
BaseAPIResponse
<
CollectResultModule
>>
{
val
params
=
MeditationCollectRequestModule
(
meditationId
=
meditationId
,
mediaId
=
mediaId
,
status
=
status
,
businessType
=
businessType
)
var
str
=
Gson
().
toJson
(
params
)
val
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
...
...
@@ -75,18 +86,23 @@ class MuseHttp {
return
RxUtils
.
mapObservable
(
params
).
flatMap
{
getMusePagerApi
().
collectMeditation
(
body
)
}
}
fun
postMeditationPlayRecord
(
meditationId
:
Int
,
isQuit
:
Int
,
mediaId
:
Long
,
playTime
:
Int
,
isComplete
:
Int
):
Observable
<
BaseAPIResponse
<
MeditationPlayRecordResponseModule
>>
{
val
params
=
MeditationPlayRecordRequestModule
(
meditationId
=
meditationId
,
isQuit
=
isQuit
,
mediaId
=
mediaId
,
playTime
=
playTime
,
isComplete
=
isComplete
)
fun
postMeditationPlayRecord
(
meditationId
:
Int
,
isQuit
:
Int
,
mediaId
:
Long
,
playTime
:
Int
,
isComplete
:
Int
):
Observable
<
BaseAPIResponse
<
MeditationPlayRecordResponseModule
>>
{
val
params
=
MeditationPlayRecordRequestModule
(
meditationId
=
meditationId
,
isQuit
=
isQuit
,
mediaId
=
mediaId
,
playTime
=
playTime
,
isComplete
=
isComplete
)
var
str
=
Gson
().
toJson
(
params
)
val
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
str
)
as
RequestBody
return
RxUtils
.
mapObservable
(
params
).
flatMap
{
getMusePagerApi
().
meditationPlayRecord
(
body
)
}
return
RxUtils
.
mapObservable
(
params
)
.
flatMap
{
getMusePagerApi
().
meditationPlayRecord
(
body
)
}
}
...
...
m-muse/src/main/java/com/yidianling/muse/http/MusePagerApi.kt
View file @
deddb032
package
com.yidianling.
hom
e.http
package
com.yidianling.
mus
e.http
import
com.ydl.ydlcommon.base.config.YDL_DOMAIN
import
com.ydl.ydlcommon.base.config.YDL_DOMAIN_JAVA
...
...
@@ -27,17 +27,17 @@ interface MusePagerApi {
/**
* 声音播放详情页
*/
@GET
(
"cms/meditation/m
ditati
PlayDetail"
)
@GET
(
"cms/meditation/m
editation
PlayDetail"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
getPureMusicPlayDetail
(
@Query
(
"meditionType"
)
meditionType
:
Int
=
0
,
@Query
(
"m
ditationId"
)
m
ditationId
:
Long
@Query
(
"m
editationId"
)
me
ditationId
:
Long
):
Observable
<
BaseAPIResponse
<
MeditationPlayModuleBean
>>
/**
* 冥想播放详情页
*/
@GET
(
"cms/meditation/m
ditati
PlayDetail"
)
@GET
(
"cms/meditation/m
editation
PlayDetail"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
getMeditationPlayDetail
(
@Query
(
"meditionType"
)
meditionType
:
Int
=
1
,
...
...
m-muse/src/main/java/com/yidianling/muse/widget/ShareMeditationDialog.kt
View file @
deddb032
...
...
@@ -50,7 +50,7 @@ class ShareMeditationDialog : DialogFragment() {
savedInstanceState
:
Bundle
?
):
View
?
{
val
view
=
inflater
.
inflate
(
R
.
layout
.
layout_share_
play_meditation
,
container
)
val
view
=
inflater
.
inflate
(
R
.
layout
.
layout_share_
meditation_dialog
,
container
)
initView
(
view
)
...
...
m-muse/src/main/res/drawable/bg_play_meditation_float_view.xml
0 → 100644
View file @
deddb032
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<corners
android:radius=
"12dp"
/>
<solid
android:color=
"#33E0E0E0"
/>
</shape>
\ No newline at end of file
m-muse/src/main/res/drawable/icon_close_meditation_play_float_view.xml
0 → 100644
View file @
deddb032
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"18dp"
android:height=
"19dp"
android:viewportWidth=
"18"
android:viewportHeight=
"19"
>
<path
android:pathData=
"M9,18.1384C4.05,18.1384 0,14.1837 0,9.3501C0,7.2629 0.7875,5.1757 2.25,3.5279C2.7,3.0885 3.375,2.9787 3.825,3.4181C4.275,3.8575 4.3875,4.5166 3.9375,4.956C2.8125,6.1644 2.25,7.7023 2.25,9.3501C2.25,12.9753 5.2875,15.9413 9,15.9413C12.7125,15.9413 15.75,12.9753 15.75,9.3501C15.75,7.7023 15.1875,6.1644 14.0625,4.956C13.6125,4.5166 13.725,3.8575 14.175,3.4181C14.625,2.9787 15.3,3.0885 15.75,3.5279C17.2125,5.1757 18,7.1531 18,9.3501C18,14.1837 13.95,18.1384 9,18.1384Z"
android:strokeAlpha=
"0.80471075"
android:strokeWidth=
"1"
android:fillColor=
"#FFFFFF"
android:fillType=
"nonZero"
android:strokeColor=
"#00000000"
android:fillAlpha=
"0.80471075"
/>
<path
android:pathData=
"M10.3477,8.5714C10.3477,9.2857 9.8477,10 9.0977,10C8.3477,10 7.8477,9.4286 7.8477,8.5714L7.8477,1.4286C7.8477,0.7143 8.3477,0 9.0977,0C9.7227,0 10.3477,0.5714 10.3477,1.4286C10.3477,3.6696 10.3477,5.3503 10.3477,6.4708C10.3477,6.9376 10.3477,7.6378 10.3477,8.5714Z"
android:strokeAlpha=
"0.80471075"
android:strokeWidth=
"1"
android:fillColor=
"#FFFFFF"
android:fillType=
"nonZero"
android:strokeColor=
"#00000000"
android:fillAlpha=
"0.80471075"
/>
</vector>
m-muse/src/main/res/layout/activity_play_meditation.xml
View file @
deddb032
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
android:id=
"@+id/root_layout"
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"
...
...
m-muse/src/main/res/layout/layout_meditation_play_float_view.xml
0 → 100644
View file @
deddb032
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
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=
"match_parent"
android:layout_height=
"wrap_content"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/csl_root_layout"
android:layout_width=
"match_parent"
android:layout_height=
"56dp"
tools:background=
"@drawable/play_float_background"
android:background=
"@drawable/bg_play_meditation_float_view"
android:layout_marginHorizontal=
"16dp"
>
<ImageView
android:id=
"@+id/iv_close"
android:layout_width=
"28dp"
android:layout_height=
"29dp"
android:paddingHorizontal=
"5dp"
android:paddingVertical=
"5dp"
android:layout_marginStart=
"15dp"
android:src=
"@drawable/icon_close_meditation_play_float_view"
app:layout_constraintEnd_toStartOf=
"@id/ll_meditation_info"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
/>
<LinearLayout
android:id=
"@+id/ll_meditation_info"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_marginStart=
"20dp"
android:gravity=
"center_vertical"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/iv_close"
>
<ImageView
android:id=
"@+id/iv_cover"
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:src=
"@drawable/platform_loading_logo"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/iv_close"
/>
<TextView
android:id=
"@+id/tv_title"
android:layout_width=
"165dp"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"8dp"
android:maxLines=
"1"
android:ellipsize=
"end"
android:textColor=
"@color/white"
android:textSize=
"16sp"
tools:text=
"睡眠安抚睡眠安抚睡眠安抚睡眠安抚"
/>
</LinearLayout>
<FrameLayout
android:id=
"@+id/fl_layout"
android:layout_width=
"44dp"
android:layout_height=
"44dp"
android:layout_marginEnd=
"10dp"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
>
<ProgressBar
android:id=
"@+id/progress_bar"
android:layout_width=
"24dp"
android:layout_height=
"24dp"
android:layout_gravity=
"center"
/>
<ImageView
android:id=
"@+id/iv_play_status"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
/>
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>
\ No newline at end of file
m-user/src/main/res/drawable/user_mine_ic_my_meditation.xml
0 → 100644
View file @
deddb032
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"25dp"
android:height=
"25dp"
android:viewportWidth=
"25"
android:viewportHeight=
"25"
>
<path
android:pathData=
"M0,0.5h25v24h-25z"
android:strokeWidth=
"1"
android:fillColor=
"#D8D8D8"
android:fillAlpha=
"0"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M2,12.4617a11.5,11.4617 0,1 0,23 0a11.5,11.4617 0,1 0,-23 0z"
android:strokeWidth=
"1"
android:fillColor=
"#E8F5FD"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M0.8,12.4617a10.7,10.6617 0,1 0,21.4 0a10.7,10.6617 0,1 0,-21.4 0z"
android:strokeWidth=
"1.6"
android:fillColor=
"#00000000"
android:strokeColor=
"#1DA1F2"
android:fillType=
"evenOdd"
/>
<path
android:pathData=
"M9.6,8.475a1.8,1.7917 0,1 0,3.6 0a1.8,1.7917 0,1 0,-3.6 0z"
android:strokeWidth=
"1.4"
android:fillColor=
"#00000000"
android:strokeColor=
"#FAA05A"
android:fillType=
"evenOdd"
/>
<path
android:pathData=
"M18.6961,16.24C16.1493,16.729 14.6273,15.6357 14.13,12.96"
android:strokeWidth=
"1.4"
android:fillColor=
"#00000000"
android:strokeColor=
"#1DA1F2"
android:fillType=
"evenOdd"
android:strokeLineCap=
"round"
/>
<path
android:pathData=
"M4.4101,16.4483C6.8394,16.7984 8.3027,15.6357 8.8,12.96"
android:strokeWidth=
"1.4"
android:fillColor=
"#00000000"
android:strokeColor=
"#1DA1F2"
android:fillType=
"evenOdd"
android:strokeLineCap=
"round"
/>
<path
android:pathData=
"M9.47,11.465L13.45,11.465C14.3337,11.465 15.05,12.1813 15.05,13.065L15.05,17.445L15.05,17.445L7.87,17.445L7.87,13.065C7.87,12.1813 8.5863,11.465 9.47,11.465Z"
android:strokeWidth=
"1"
android:fillColor=
"#1DA1F2"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M14.1563,12.96L14.3563,12.96A0.7,0.7 0,0 1,15.0563 13.66L15.0563,18.24A0.7,0.7 0,0 1,14.3563 18.94L14.1563,18.94A0.7,0.7 0,0 1,13.4563 18.24L13.4563,13.66A0.7,0.7 0,0 1,14.1563 12.96z"
android:strokeWidth=
"1"
android:fillColor=
"#1DA1F2"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M8.57,12.96L8.77,12.96A0.7,0.7 0,0 1,9.47 13.66L9.47,18.24A0.7,0.7 0,0 1,8.77 18.94L8.57,18.94A0.7,0.7 0,0 1,7.87 18.24L7.87,13.66A0.7,0.7 0,0 1,8.57 12.96z"
android:strokeWidth=
"1"
android:fillColor=
"#1DA1F2"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M10.4563,12.96L12.4563,12.96C13.0086,12.96 13.4563,13.4077 13.4563,13.96L13.4563,19.9367L13.4563,19.9367L9.4563,19.9367L9.4563,13.96C9.4563,13.4077 9.9041,12.96 10.4563,12.96Z"
android:strokeWidth=
"1"
android:fillColor=
"#E8F5FD"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
/>
</vector>
m-user/src/main/res/layout/user_mine_fragment_mine.xml
View file @
deddb032
...
...
@@ -440,7 +440,7 @@
<ImageView
android:layout_width=
"25dp"
android:layout_height=
"25dp"
android:src=
"@drawable/user_mine_ic_my_
course
"
/>
android:src=
"@drawable/user_mine_ic_my_
meditation
"
/>
<TextView
android:layout_width=
"wrap_content"
...
...
ydl-platform/src/main/java/com/ydl/ydlcommon/bean/ShareData.kt
View file @
deddb032
...
...
@@ -14,6 +14,10 @@ class ShareData : Serializable {
var
cover
:
String
?
=
null
var
desc
:
String
?
=
null
// just for Meditation
var
type
:
String
?
=
null
var
isDarkMode
=
false
//分享到动态url
var
url
:
String
?
=
null
...
...
ydl-platform/src/main/java/com/ydl/ydlcommon/event/MeditationEvent.kt
0 → 100644
View file @
deddb032
package
com.ydl.ydlcommon.event
class
MeditationEvent
(
val
mediaId
:
Int
,
val
meditationId
:
Long
,
val
meditationType
:
Int
,
val
businessType
:
Int
,
val
status
:
Int
,
val
buried
:
String
,
val
mediaUrl
:
String
,
val
mediaCoverUrl
:
String
,
val
title
:
String
,
val
desc
:
String
)
{
override
fun
toString
():
String
{
return
"MeditationEvent(mediaId=$mediaId, meditationId=$meditationId, meditationType=$meditationType, businessType=$businessType, status=$status, buried='$buried', mediaUrl='$mediaUrl', mediaCoverUrl='$mediaCoverUrl', title='$title', desc='$desc')"
}
}
\ No newline at end of file
ydl-webview/build.gradle
View file @
deddb032
...
...
@@ -51,6 +51,7 @@ android {
dependencies
{
implementation
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation
project
(
path:
':ydl-platform'
)
kapt
'com.alibaba:arouter-compiler:1.2.2'
api
rootProject
.
ext
.
dependencies
[
"ydl-user-router"
]
api
fileTree
(
include:
[
'*.jar'
],
dir:
'libs'
)
...
...
ydl-webview/src/main/java/com/ydl/view/ShareMeditationDialog.kt
0 → 100644
View file @
deddb032
package
com.ydl.view
import
android.app.Activity
import
android.graphics.Color
import
android.os.Bundle
import
android.util.DisplayMetrics
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
android.view.ViewGroup.LayoutParams.MATCH_PARENT
import
android.widget.ImageView
import
android.widget.LinearLayout
import
android.widget.TextView
import
androidx.constraintlayout.widget.ConstraintLayout
import
androidx.fragment.app.DialogFragment
import
com.umeng.socialize.bean.SHARE_MEDIA
import
com.ydl.webview.R
import
com.ydl.ydlcommon.actions.share.ShareUtils
class
ShareMeditationDialog
:
DialogFragment
()
{
private
var
llRootLayout
:
ConstraintLayout
?=
null
private
var
llWeChat
:
LinearLayout
?
=
null
private
var
llCircleOfFriends
:
LinearLayout
?
=
null
private
var
llSave
:
LinearLayout
?
=
null
private
var
llQQZone
:
LinearLayout
?
=
null
private
var
llQQFriend
:
LinearLayout
?
=
null
private
var
ivWeChat
:
ImageView
?
=
null
private
var
ivCircleOfFriends
:
ImageView
?
=
null
private
var
ivQQZone
:
ImageView
?
=
null
private
var
ivQQFriend
:
ImageView
?
=
null
private
var
tvWeChat
:
TextView
?
=
null
private
var
tvCircleOfFriends
:
TextView
?
=
null
private
var
tvQQZone
:
TextView
?
=
null
private
var
tvQQFriend
:
TextView
?
=
null
private
var
tvCancel
:
TextView
?
=
null
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
setStyle
(
STYLE_NO_TITLE
,
R
.
style
.
share_meditation_dialog
)
}
override
fun
onStart
()
{
super
.
onStart
()
val
displayMetrics
=
DisplayMetrics
()
activity
?.
windowManager
?.
defaultDisplay
?.
getMetrics
(
displayMetrics
)
val
window
=
dialog
?.
window
window
?.
setLayout
(
MATCH_PARENT
,
MATCH_PARENT
)
}
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?
):
View
?
{
val
view
=
inflater
.
inflate
(
R
.
layout
.
layout_share_meditation_dialog
,
container
)
initView
(
view
)
return
view
}
private
fun
initView
(
view
:
View
?)
{
val
isDarkMode
=
arguments
?.
getBoolean
(
KEY_SHARE_DARK_MODE
)
val
shareUrl
=
arguments
?.
getString
(
KEY_SHARE_URL
)
val
shareTitle
=
arguments
?.
getString
(
KEY_SHARE_TITLE
)
val
shareContent
=
arguments
?.
getString
(
KEY_SHARE_CONTENT
)
val
shareCover
=
arguments
?.
getString
(
KEY_SHARE_COVER
)
llRootLayout
=
view
?.
findViewById
(
R
.
id
.
csl_share_layout
)
llWeChat
=
view
?.
findViewById
(
R
.
id
.
ll_wechat_friend
)
llCircleOfFriends
=
view
?.
findViewById
(
R
.
id
.
ll_wechat_circle_of_friends
)
llSave
=
view
?.
findViewById
(
R
.
id
.
ll_save_picture
)
llQQZone
=
view
?.
findViewById
(
R
.
id
.
ll_qq_zone
)
llQQFriend
=
view
?.
findViewById
(
R
.
id
.
ll_qq_friend
)
ivWeChat
=
view
?.
findViewById
(
R
.
id
.
iv_wechat
)
tvWeChat
=
view
?.
findViewById
(
R
.
id
.
tv_wechat
)
ivCircleOfFriends
=
view
?.
findViewById
(
R
.
id
.
iv_circle
)
tvCircleOfFriends
=
view
?.
findViewById
(
R
.
id
.
tv_circle
)
ivQQZone
=
view
?.
findViewById
(
R
.
id
.
iv_qq_zone
)
tvQQZone
=
view
?.
findViewById
(
R
.
id
.
tv_qq_zone
)
ivQQFriend
=
view
?.
findViewById
(
R
.
id
.
iv_qq
)
tvQQFriend
=
view
?.
findViewById
(
R
.
id
.
tv_qq
)
tvCancel
=
view
?.
findViewById
(
R
.
id
.
tv_cancel_share
)
updateUI
(
isDarkMode
==
true
)
llWeChat
?.
setOnClickListener
{
ShareUtils
.
shareTo
(
SHARE_MEDIA
.
WEIXIN
,
activity
as
Activity
,
shareTitle
!!
,
shareUrl
!!
,
shareContent
!!
,
shareCover
!!
)
dismiss
()
}
llCircleOfFriends
?.
setOnClickListener
{
ShareUtils
.
shareTo
(
SHARE_MEDIA
.
WEIXIN_CIRCLE
,
activity
as
Activity
,
shareTitle
!!
,
shareUrl
!!
,
shareContent
!!
,
shareCover
!!
)
dismiss
()
}
llSave
?.
setOnClickListener
{
dismiss
()
}
llQQZone
?.
setOnClickListener
{
ShareUtils
.
shareTo
(
SHARE_MEDIA
.
QZONE
,
activity
as
Activity
,
shareTitle
!!
,
shareUrl
!!
,
shareContent
!!
,
shareCover
!!
)
dismiss
()
}
llQQFriend
?.
setOnClickListener
{
ShareUtils
.
shareTo
(
SHARE_MEDIA
.
QQ
,
activity
as
Activity
,
shareTitle
!!
,
shareUrl
!!
,
shareContent
!!
,
shareCover
!!
)
dismiss
()
}
tvCancel
?.
setOnClickListener
{
dismiss
()
}
}
private
fun
updateUI
(
isDarkMode
:
Boolean
){
if
(
isDarkMode
){
llRootLayout
?.
setBackgroundResource
(
R
.
drawable
.
bg_share_play_meditation_bottom_dark
)
ivWeChat
?.
setImageResource
(
R
.
drawable
.
ic_icon_weixin
)
ivCircleOfFriends
?.
setImageResource
(
R
.
drawable
.
ic_icon_friends
)
ivQQZone
?.
setImageResource
(
R
.
drawable
.
ic_icon_qqzone
)
ivQQFriend
?.
setImageResource
(
R
.
drawable
.
ic_icon_qq
)
tvWeChat
?.
setTextColor
(
Color
.
parseColor
(
"#FF84AACE"
))
tvCircleOfFriends
?.
setTextColor
(
Color
.
parseColor
(
"#FF84AACE"
))
tvQQZone
?.
setTextColor
(
Color
.
parseColor
(
"#FF84AACE"
))
tvQQFriend
?.
setTextColor
(
Color
.
parseColor
(
"#FF84AACE"
))
tvCancel
?.
setTextColor
(
Color
.
parseColor
(
"#FFFFFFFF"
))
}
else
{
llRootLayout
?.
setBackgroundResource
(
R
.
drawable
.
bg_share_play_meditation_bottom
)
ivWeChat
?.
setImageResource
(
R
.
drawable
.
icon_meditation_share_wechat
)
ivCircleOfFriends
?.
setImageResource
(
R
.
drawable
.
icon_meditation_share_friends
)
ivQQZone
?.
setImageResource
(
R
.
drawable
.
icon_meditation_share_qqzone
)
ivQQFriend
?.
setImageResource
(
R
.
drawable
.
icon_meditation_share_qq
)
tvWeChat
?.
setTextColor
(
Color
.
parseColor
(
"#FF666666"
))
tvCircleOfFriends
?.
setTextColor
(
Color
.
parseColor
(
"#FF666666"
))
tvQQZone
?.
setTextColor
(
Color
.
parseColor
(
"#FF666666"
))
tvQQFriend
?.
setTextColor
(
Color
.
parseColor
(
"#FF666666"
))
tvCancel
?.
setTextColor
(
Color
.
parseColor
(
"#FF242424"
))
}
}
companion
object
{
const
val
TAG
=
"ShareMeditationDialog"
private
const
val
KEY_SHARE_DARK_MODE
=
"key_share_dark_mode"
private
const
val
KEY_SHARE_URL
=
"key_share_url"
private
const
val
KEY_SHARE_TITLE
=
"key_share_title"
private
const
val
KEY_SHARE_CONTENT
=
"key_share_content"
private
const
val
KEY_SHARE_COVER
=
"key_share_cover"
fun
newInstance
(
isDarkMode
:
Boolean
,
shareUrl
:
String
,
shareTitle
:
String
,
shareContent
:
String
,
shareCover
:
String
):
ShareMeditationDialog
{
val
args
=
Bundle
()
args
.
putBoolean
(
KEY_SHARE_DARK_MODE
,
isDarkMode
)
args
.
putString
(
KEY_SHARE_URL
,
shareUrl
)
args
.
putString
(
KEY_SHARE_TITLE
,
shareTitle
)
args
.
putString
(
KEY_SHARE_CONTENT
,
shareContent
)
args
.
putString
(
KEY_SHARE_COVER
,
shareCover
)
val
fragment
=
ShareMeditationDialog
()
fragment
.
arguments
=
args
return
fragment
}
}
}
\ No newline at end of file
ydl-webview/src/main/java/com/ydl/webview/H5JsBean.kt
View file @
deddb032
...
...
@@ -144,6 +144,31 @@ class H5JsBean {
var
merchantType
:
String
=
""
var
day
:
String
=
""
// 预约日期
// meditation start
// {"meditationId":21,"mediaId":15,"meditionType":1,"status":0,
// "coverImageUrl":"https://pic.ydlcdn.com/NsBRkaxNba.png",
// "title":"创建冥想-标题-20",
// "desc":"冥想测试数据基础入门1冥想测试数据基础入门1冥想测试数据基础入门1冥想测试数据基础入门1冥想测试数据基础入门1",
// "duration":250.9845}
var
meditationId
:
Int
?=
null
var
mediaId
:
Int
?=
null
var
meditionType
:
Int
?=
null
var
status
=
0
var
coverImageUrl
:
String
?=
null
var
desc
:
String
?=
null
var
mediaUrl
:
String
?=
null
var
duration
:
Double
?=
null
var
businessType
:
Int
?=
null
var
share_url
:
String
?=
null
var
cover
:
String
?=
null
var
isDarkMode
=
false
var
buried
:
String
?=
null
// meditation end
}
}
}
ydl-webview/src/main/java/com/ydl/webview/NewH5Activity.java
View file @
deddb032
...
...
@@ -37,10 +37,12 @@ import com.umeng.socialize.bean.SHARE_MEDIA;
import
com.ydl.utils.PopUtils
;
import
com.ydl.utils.ProxyCheckUtils
;
import
com.ydl.utils.WebUrlParamsUtils
;
import
com.ydl.view.ShareMeditationDialog
;
import
com.ydl.ydl_router.manager.YDLRouterManager
;
import
com.ydl.ydlcommon.base.BaseActivity
;
import
com.ydl.ydlcommon.base.BaseApp
;
import
com.ydl.ydlcommon.bean.StatusBarOptions
;
import
com.ydl.ydlcommon.event.MeditationEvent
;
import
com.ydl.ydlcommon.modular.ModularServiceManager
;
import
com.ydl.ydlcommon.ui.LogoLoadingView
;
import
com.ydl.ydlcommon.utils.ActivityManager
;
...
...
@@ -116,6 +118,10 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
protected
String
shareDesc
;
private
String
cover
;
private
boolean
isDarkMode
=
false
;
private
ShareMeditationDialog
shareMeditationDialog
;
protected
PopupWindow
popupWindow
;
protected
ValueCallback
<
Uri
>
uploadMessage
;
...
...
@@ -285,6 +291,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
R
.
anim
.
platform_activity_anim_out
);
}
private
void
initTimeOutHandler
()
{
mTimeOutHandler
=
new
Handler
(
msg
->
{
if
(
wv_content
.
getProgress
()
<
100
)
{
...
...
@@ -525,14 +532,29 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
public
void
openShareMenu
(
H5JsBean
.
H5JsCmd
.
Params
params
)
{
if
(
params
.
getShare
()
!=
null
)
{
purl
=
params
.
getShare
().
getUrl
();
shareUrl
=
params
.
getShare
().
getShare_url
();
shareTitle
=
params
.
getShare
().
getTitle
();
shareDesc
=
params
.
getShare
().
getDesc
();
cover
=
params
.
getShare
().
getCover
();
LogUtil
.
d
(
"title: "
+
shareTitle
+
" url: "
+
shareUrl
+
" desc: "
+
shareDesc
+
" cover: "
+
cover
);
String
base64DataStr
=
params
.
getImageBase64
();
share
(
base64DataStr
,
params
);
if
(
params
.
getShare
().
getType
().
equals
(
"Meditation"
)){
shareUrl
=
params
.
getShare
().
getShare_url
();
shareTitle
=
params
.
getShare
().
getTitle
();
shareDesc
=
params
.
getShare
().
getDesc
();
cover
=
params
.
getShare
().
getCover
();
isDarkMode
=
params
.
getShare
().
isDarkMode
();
if
(
shareMeditationDialog
==
null
){
shareMeditationDialog
=
ShareMeditationDialog
.
Companion
.
newInstance
(
isDarkMode
,
shareUrl
,
shareTitle
,
shareDesc
,
cover
);
}
if
(
shareMeditationDialog
!=
null
&&
!
shareMeditationDialog
.
isAdded
()){
shareMeditationDialog
.
show
(
getSupportFragmentManager
(),
"share_meditation"
);
}
}
else
{
purl
=
params
.
getShare
().
getUrl
();
shareUrl
=
params
.
getShare
().
getShare_url
();
shareTitle
=
params
.
getShare
().
getTitle
();
shareDesc
=
params
.
getShare
().
getDesc
();
cover
=
params
.
getShare
().
getCover
();
LogUtil
.
d
(
"title: "
+
shareTitle
+
" url: "
+
shareUrl
+
" desc: "
+
shareDesc
+
" cover: "
+
cover
);
String
base64DataStr
=
params
.
getImageBase64
();
share
(
base64DataStr
,
params
);
}
}
}
...
...
@@ -1483,4 +1505,13 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
this
.
startActivity
(
WebModularServiceUtils
.
Companion
.
getDynamicService
().
publishArticleToTrend
(
NewH5Activity
.
this
,
url
,
cover
,
shareTitle
));
}
public
void
switchSound
(
int
mediaId
,
long
meditationId
,
int
meditationType
,
int
businessType
,
String
buried
,
String
mediaUrl
,
String
mediaCoverUrl
,
String
title
,
String
desc
,
int
status
){
MeditationEvent
event
=
new
MeditationEvent
(
mediaId
,
meditationId
,
meditationType
,
businessType
,
status
,
buried
,
mediaUrl
,
mediaCoverUrl
,
title
,
desc
);
EventBus
.
getDefault
().
post
(
event
);
}
}
ydl-webview/src/main/res/drawable/bg_share_play_meditation_bottom.xml
0 → 100644
View file @
deddb032
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"#FFFFFFFF"
/>
<corners
android:radius=
"20dp"
/>
</shape>
\ No newline at end of file
ydl-webview/src/main/res/drawable/bg_share_play_meditation_bottom_dark.xml
0 → 100644
View file @
deddb032
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"#FF2B5C8E"
/>
<corners
android:radius=
"20dp"
/>
</shape>
\ No newline at end of file
ydl-webview/src/main/res/drawable/ic_icon_friends.xml
0 → 100644
View file @
deddb032
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"40dp"
android:height=
"40dp"
android:viewportWidth=
"40"
android:viewportHeight=
"40"
>
<path
android:pathData=
"M20,20m-20,0a20,20 0,1 1,40 0a20,20 0,1 1,-40 0"
android:strokeWidth=
"1"
android:fillColor=
"#282E3F"
android:fillAlpha=
"0.29826814"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M23.1313,12.621C23.7797,12.8952 24.4004,13.2595 24.9725,13.7126C25.2067,13.8971 25.4335,14.0965 25.6498,14.3121C26.1557,14.8156 26.5758,15.3732 26.9174,15.9625C27.0029,16.1105 27.0848,16.2612 27.1599,16.4128L23.1313,20.4269C23.171,20.1853 23.1313,12.621 23.1313,12.621L23.1313,12.621ZM19.1074,12.0532C19.4038,12.0184 19.705,12 20.0115,12C20.727,12 21.421,12.0967 22.0804,12.2733C22.246,12.319 22.4103,12.3682 22.5713,12.4229L22.5713,18.0988C22.4275,17.901 17.0299,12.5784 17.0299,12.5784C17.6844,12.3162 18.3808,12.1353 19.1074,12.0531L19.1074,12.0532ZM13.7248,15.0349C13.9107,14.8029 14.1092,14.5764 14.3268,14.3604C14.8324,13.8569 15.3909,13.4371 15.9839,13.0973C16.1316,13.0121 16.2833,12.9321 16.4366,12.8557L20.4648,16.8695C20.2223,16.8308 12.629,16.871 12.629,16.871C12.9048,16.2234 13.27,15.6052 13.7249,15.0349L13.7248,15.0349ZM12.0542,20.8909C12.0194,20.5958 12,20.2943 12,19.9902C12,19.2768 12.0969,18.5869 12.2745,17.9294C12.3197,17.7641 12.3693,17.5995 12.4237,17.4401L18.1214,17.4401C17.9217,17.5829 12.5819,22.9605 12.5819,22.9605C12.3163,22.3096 12.1363,21.6155 12.0541,20.8909L12.0542,20.8909ZM15.0223,26.2485C14.7881,26.0636 14.5607,25.8652 14.3452,25.6501C13.8387,25.1457 13.4174,24.5888 13.0771,23.9983C12.9915,23.8506 12.91,23.7008 12.8346,23.547L16.8619,19.5332C16.8228,19.7757 16.8643,27.3403 16.8643,27.3403C16.2141,27.0658 15.5956,26.7021 15.0223,26.2485L15.0223,26.2485ZM20.892,27.9468C20.5959,27.9807 20.294,28 19.9885,28C19.2724,28 18.58,27.9033 17.9199,27.7257C17.7546,27.6816 17.5906,27.6315 17.4287,27.5771L17.4287,21.9006C17.5724,22.0996 22.9698,27.4204 22.9692,27.4204C22.3149,27.6838 21.6182,27.8641 20.892,27.9469L20.892,27.9468ZM26.2358,24.9953C26.0496,25.2285 25.8502,25.455 25.6351,25.6701C25.1285,26.1748 24.5694,26.5943 23.9779,26.9335C23.8287,27.0193 23.6785,27.0993 23.5249,27.1748L19.4964,23.1616C19.7395,23.2003 27.3316,23.1607 27.3316,23.1607C27.0562,23.8074 26.69,24.4247 26.2358,24.9953L26.2358,24.9953ZM27.7246,22.0746C27.6794,22.2395 27.6298,22.4035 27.5753,22.5636L21.8786,22.5636C22.0783,22.4204 27.4184,17.0429 27.4184,17.0429C27.6827,17.6944 27.8634,18.3881 27.9458,19.1124C27.9806,19.4078 28,19.7087 28,20.0134C27.9997,20.7268 27.9024,21.4161 27.7246,22.0746L27.7246,22.0746Z"
android:strokeWidth=
"1"
android:fillColor=
"#5DD180"
android:fillType=
"nonZero"
android:strokeColor=
"#00000000"
/>
</vector>
ydl-webview/src/main/res/drawable/ic_icon_qq.xml
0 → 100644
View file @
deddb032
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"40dp"
android:height=
"40dp"
android:viewportWidth=
"40"
android:viewportHeight=
"40"
>
<path
android:pathData=
"M20,20m-20,0a20,20 0,1 1,40 0a20,20 0,1 1,-40 0"
android:strokeWidth=
"1"
android:fillColor=
"#282E3F"
android:fillAlpha=
"0.29826814"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M25.9967,24.9517C25.6549,25.0114 24.6864,23.3409 24.6864,23.3409C24.6864,24.2955 24.2307,25.4886 23.2052,26.3835C23.661,26.5625 24.8004,26.9801 24.5155,27.3977C24.2876,27.7557 20.9265,27.6364 19.9581,27.517C18.9896,27.6364 15.5715,27.7557 15.4006,27.3977C15.1158,26.9205 16.2551,26.5028 16.7109,26.3835C15.7424,25.5483 15.2867,24.3551 15.2867,23.4006C15.2867,23.4006 14.3182,25.0114 13.9764,25.0114C13.8055,25.0114 13.6346,24.1165 14.2612,22.0284C14.5461,21.0142 14.8879,20.2386 15.4006,18.8665C15.3436,15.2869 16.7109,12.3636 20.015,12.3636C23.2622,12.3636 24.6864,15.2273 24.6294,18.8068C25.1422,20.179 25.484,21.0142 25.7688,21.9687C26.3954,24.0568 26.1676,24.9517 25.9967,24.9517L25.9967,24.9517Z"
android:strokeWidth=
"1"
android:fillColor=
"#6CAAFF"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
/>
</vector>
ydl-webview/src/main/res/drawable/ic_icon_qqzone.xml
0 → 100644
View file @
deddb032
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"40dp"
android:height=
"40dp"
android:viewportWidth=
"40"
android:viewportHeight=
"40"
>
<path
android:pathData=
"M20,20m-20,0a20,20 0,1 1,40 0a20,20 0,1 1,-40 0"
android:strokeWidth=
"1"
android:fillColor=
"#282E3F"
android:fillAlpha=
"0.29826814"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M24.5371,23.1482L19.0981,22.7394L19.0981,22.7121L19.1259,22.7121C19.2388,22.5763 19.4178,22.5116 19.5699,22.4123C19.9106,22.1895 20.2481,21.96 20.5966,21.7308C21.5062,21.1327 22.397,20.4672 23.2883,19.8501C23.5294,19.6832 24.0773,19.3825 24.2318,19.1687C24.3126,19.0569 24.3701,18.8507 24.2873,18.7325C24.2161,18.5306 23.9116,18.5963 23.6491,18.5963L21.8176,18.5963C21.6395,18.7032 20.664,18.6235 20.3746,18.6235L16.7949,18.678C16.5021,18.6785 15.5033,18.5968 15.3242,18.7053C15.6888,18.7017 16.0633,18.7696 16.3787,18.8416C16.8017,18.938 17.2362,18.916 17.6274,19.0051L18.0714,19.0324C18.7288,19.1835 19.4932,19.1824 20.1526,19.3322C20.5758,19.4284 21.0101,19.4069 21.4014,19.4957C21.5908,19.5387 21.8017,19.4815 21.9286,19.5775L21.8731,19.5775C21.5086,19.8981 20.8158,20.1303 20.3746,20.3952C19.2713,21.0577 18.1107,21.6518 17.0169,22.3305C16.7813,22.4767 16.3661,22.7083 16.2399,22.9574C16.1552,23.1246 16.2005,23.5126 16.3509,23.5843L16.7949,23.5843L24.5371,23.23L24.5371,23.1482C24.7844,23.1418 25.2367,23.1198 25.3973,23.23L24.5648,23.2572L25.3973,28L25.3418,28C25.084,27.7533 24.3653,27.5 24.0098,27.3186C23.101,26.8547 22.1835,26.3978 21.2626,25.9284C20.9439,25.766 20.6241,25.6073 20.2914,25.4378C20.2216,25.4023 20.0625,25.247 19.9584,25.2743C19.9168,25.2852 19.8114,25.3864 19.7641,25.4106C19.47,25.5606 19.1818,25.7043 18.9039,25.8467C17.9109,26.3557 16.9276,26.8118 15.9347,27.3186C15.5339,27.5231 15.0414,27.8742 14.6027,28L15.6294,22.1942C15.3327,22.0022 15.1033,21.6995 14.8524,21.4583C14.4035,21.0264 13.9391,20.5497 13.4372,20.1772L12.8545,19.5775C12.458,19.2831 12.1213,18.9116 11.7722,18.569C11.6123,18.412 11.3995,18.2938 11.2727,18.1056C11.6153,18.0734 12.0057,18.0154 12.3272,17.9421C12.8,17.8342 13.2759,17.8531 13.7147,17.7513C14.3633,17.6008 15.0379,17.6222 15.6572,17.4787C16.0204,17.3946 17.0809,17.3955 17.2944,17.2334C17.4265,17.0873 17.4757,16.8693 17.5719,16.6882C17.7734,16.309 17.9727,15.912 18.1824,15.5162C18.7947,14.3601 19.4099,13.1813 19.9861,12C20.0085,12.0278 19.996,12.0075 20.0139,12.0545C20.1314,12.1535 20.1606,12.3212 20.2359,12.4634C20.4333,12.8361 20.6152,13.224 20.8186,13.6082L22.7056,17.2606C23.4734,17.3328 24.3847,17.4444 25.1198,17.615C25.7684,17.7655 26.443,17.7441 27.0623,17.8876C27.4347,17.9738 28.5076,17.966 28.7273,18.1329C28.3822,18.3555 28.1621,18.738 27.8393,18.9779C27.6,19.1556 27.4332,19.4051 27.201,19.5775C26.5564,20.0565 25.9953,20.6822 25.4251,21.2402C25.2308,21.4302 24.4001,22.0668 24.3706,22.3032C24.4598,22.4366 24.5136,22.9609 24.5371,23.1482Z"
android:strokeWidth=
"1"
android:fillColor=
"#FFBE66"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
/>
</vector>
ydl-webview/src/main/res/drawable/ic_icon_weixin.xml
0 → 100644
View file @
deddb032
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"40dp"
android:height=
"40dp"
android:viewportWidth=
"40"
android:viewportHeight=
"40"
>
<path
android:pathData=
"M20,20m-20,0a20,20 0,1 1,40 0a20,20 0,1 1,-40 0"
android:strokeWidth=
"1"
android:fillColor=
"#282E3F"
android:fillAlpha=
"0.29826814"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M24.5505,17.4423C27.7242,17.4423 30.5455,19.6578 30.5455,22.3785C30.5455,23.9089 29.4899,25.2727 28.0759,26.2974L28.0759,26.2974L28.6063,28L26.6683,26.9757C25.9653,27.141 25.2539,27.314 24.5505,27.314C21.188,27.314 18.5475,25.1062 18.5475,22.3785C18.5475,19.6578 21.188,17.4423 24.5505,17.4423ZM17.3901,12C20.9355,12 24.0401,14.0773 24.6621,16.8794C24.4313,16.8565 24.1992,16.8409 23.968,16.8409C20.5439,16.8409 17.8373,19.3039 17.8377,22.3372C17.8377,22.8383 17.9174,23.3296 18.0613,23.7923C17.8377,23.8144 17.6133,23.8221 17.3901,23.8221C16.4958,23.8221 15.7695,23.6446 14.8676,23.4757L14.8676,23.4757L12.3454,24.6988L13.0637,22.606C11.2598,21.3894 10.1818,19.8198 10.1818,17.9107C10.1818,14.6013 13.4307,12 17.3901,12ZM22.6032,20.1708C22.2524,20.1708 21.9007,20.5103 21.9007,20.8482C21.9007,21.1881 22.2524,21.5269 22.6032,21.5269C23.1352,21.5269 23.4873,21.1881 23.4873,20.8482C23.4873,20.5103 23.1352,20.1708 22.6032,20.1708ZM26.4889,20.1708C26.1376,20.1708 25.7867,20.5103 25.7867,20.8482C25.7867,21.1881 26.1376,21.5269 26.4889,21.5269C27.0115,21.5269 27.3721,21.1881 27.3721,20.8482C27.3721,20.5103 27.02,20.1708 26.4889,20.1708ZM20.0879,14.9551C19.5525,14.9551 19.0107,15.3012 19.0027,15.8252C19.0027,16.348 19.5448,16.6945 20.0879,16.6945C20.6301,16.6945 20.9894,16.348 20.9894,15.8252C20.9894,15.3016 20.6305,14.9551 20.0879,14.9551ZM15.0432,14.9547C14.5006,14.9547 13.958,15.3008 13.958,15.8244C13.958,16.3476 14.5002,16.6937 15.0432,16.6937C15.5867,16.6937 15.9456,16.3402 15.946,15.8244C15.946,15.3012 15.5867,14.9547 15.0432,14.9547Z"
android:strokeWidth=
"1"
android:fillColor=
"#5AC689"
android:fillType=
"nonZero"
android:strokeColor=
"#00000000"
/>
</vector>
ydl-webview/src/main/res/drawable/icon_meditation_share_friends.xml
0 → 100644
View file @
deddb032
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:aapt=
"http://schemas.android.com/aapt"
android:width=
"40dp"
android:height=
"40dp"
android:viewportWidth=
"40"
android:viewportHeight=
"40"
>
<path
android:pathData=
"M20,20m-20,0a20,20 0,1 1,40 0a20,20 0,1 1,-40 0"
android:strokeWidth=
"1"
android:fillColor=
"#5DD180"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M23.131,12.621C23.78,12.895 24.4,13.26 24.973,13.713C25.207,13.897 25.433,14.096 25.65,14.312C26.156,14.816 26.576,15.373 26.917,15.962C27.003,16.11 27.085,16.261 27.16,16.413L23.131,20.427C23.171,20.185 23.131,12.621 23.131,12.621L23.131,12.621ZM19.107,12.053C19.404,12.018 19.705,12 20.012,12C20.727,12 21.421,12.097 22.08,12.273C22.246,12.319 22.41,12.368 22.571,12.423L22.571,18.099C22.428,17.901 17.03,12.578 17.03,12.578C17.684,12.316 18.381,12.135 19.107,12.053L19.107,12.053ZM13.725,15.035C13.911,14.803 14.109,14.576 14.327,14.36C14.832,13.857 15.391,13.437 15.984,13.097C16.132,13.012 16.283,12.932 16.437,12.856L20.465,16.87C20.222,16.831 12.629,16.871 12.629,16.871C12.905,16.223 13.27,15.605 13.725,15.035L13.725,15.035ZM12.054,20.891C12.019,20.596 12,20.294 12,19.99C12,19.277 12.097,18.587 12.274,17.929C12.32,17.764 12.369,17.6 12.424,17.44L18.121,17.44C17.922,17.583 12.582,22.96 12.582,22.96C12.316,22.31 12.136,21.615 12.054,20.891L12.054,20.891ZM15.022,26.248C14.788,26.064 14.561,25.865 14.345,25.65C13.839,25.146 13.417,24.589 13.077,23.998C12.992,23.851 12.91,23.701 12.835,23.547L16.862,19.533C16.823,19.776 16.864,27.34 16.864,27.34C16.214,27.066 15.596,26.702 15.022,26.248L15.022,26.248ZM20.892,27.947C20.596,27.981 20.294,28 19.988,28C19.272,28 18.58,27.903 17.92,27.726C17.755,27.682 17.591,27.632 17.429,27.577L17.429,21.901C17.572,22.1 22.97,27.42 22.969,27.42C22.315,27.684 21.618,27.864 20.892,27.947L20.892,27.947ZM26.236,24.995C26.05,25.228 25.85,25.455 25.635,25.67C25.129,26.175 24.569,26.594 23.978,26.933C23.829,27.019 23.679,27.099 23.525,27.175L19.496,23.162C19.74,23.2 27.332,23.161 27.332,23.161C27.056,23.807 26.69,24.425 26.236,24.995L26.236,24.995ZM27.725,22.075C27.679,22.239 27.63,22.403 27.575,22.564L21.879,22.564C22.078,22.42 27.418,17.043 27.418,17.043C27.683,17.694 27.863,18.388 27.946,19.112C27.981,19.408 28,19.709 28,20.013C28,20.727 27.902,21.416 27.725,22.075L27.725,22.075Z"
android:strokeWidth=
"1"
android:fillType=
"nonZero"
android:strokeColor=
"#00000000"
>
<aapt:attr
name=
"android:fillColor"
>
<gradient
android:startX=
"31.222"
android:startY=
"40.376"
android:endX=
"20.938"
android:endY=
"23.787"
android:type=
"linear"
>
<item
android:offset=
"0"
android:color=
"#FF49B7FC"
/>
<item
android:offset=
"1"
android:color=
"#FFFFFFFF"
/>
</gradient>
</aapt:attr>
</path>
</vector>
ydl-webview/src/main/res/drawable/icon_meditation_share_qq.xml
0 → 100644
View file @
deddb032
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:aapt=
"http://schemas.android.com/aapt"
android:width=
"40dp"
android:height=
"40dp"
android:viewportWidth=
"40"
android:viewportHeight=
"40"
>
<path
android:pathData=
"M20,20m-20,0a20,20 0,1 1,40 0a20,20 0,1 1,-40 0"
android:strokeWidth=
"1"
android:fillColor=
"#6CAAFF"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M25.997,24.952C25.655,25.011 24.686,23.341 24.686,23.341C24.686,24.295 24.231,25.489 23.205,26.384C23.661,26.563 24.8,26.98 24.516,27.398C24.288,27.756 20.927,27.636 19.958,27.517C18.99,27.636 15.572,27.756 15.401,27.398C15.116,26.92 16.255,26.503 16.711,26.384C15.742,25.548 15.287,24.355 15.287,23.401C15.287,23.401 14.318,25.011 13.976,25.011C13.806,25.011 13.635,24.116 14.261,22.028C14.546,21.014 14.888,20.239 15.401,18.866C15.344,15.287 16.711,12.364 20.015,12.364C23.262,12.364 24.686,15.227 24.629,18.807C25.142,20.179 25.484,21.014 25.769,21.969C26.395,24.057 26.168,24.952 25.997,24.952L25.997,24.952Z"
android:strokeWidth=
"1"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
>
<aapt:attr
name=
"android:fillColor"
>
<gradient
android:startX=
"36.074"
android:startY=
"47.516"
android:endX=
"20.015"
android:endY=
"24.704"
android:type=
"linear"
>
<item
android:offset=
"0"
android:color=
"#FF459FFC"
/>
<item
android:offset=
"1"
android:color=
"#FFFFFFFF"
/>
</gradient>
</aapt:attr>
</path>
</vector>
ydl-webview/src/main/res/drawable/icon_meditation_share_qqzone.xml
0 → 100644
View file @
deddb032
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:aapt=
"http://schemas.android.com/aapt"
android:width=
"40dp"
android:height=
"40dp"
android:viewportWidth=
"40"
android:viewportHeight=
"40"
>
<path
android:pathData=
"M20,20m-20,0a20,20 0,1 1,40 0a20,20 0,1 1,-40 0"
android:strokeWidth=
"1"
android:fillColor=
"#FFBE66"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M24.537,23.148L19.098,22.739L19.098,22.712L19.126,22.712C19.239,22.576 19.418,22.512 19.57,22.412C19.911,22.189 20.248,21.96 20.597,21.731C21.506,21.133 22.397,20.467 23.288,19.85C23.529,19.683 24.077,19.383 24.232,19.169C24.313,19.057 24.37,18.851 24.287,18.733C24.216,18.531 23.912,18.596 23.649,18.596L21.818,18.596C21.639,18.703 20.664,18.624 20.375,18.624L16.795,18.678C16.502,18.679 15.503,18.597 15.324,18.705C15.689,18.702 16.063,18.77 16.379,18.842C16.802,18.938 17.236,18.916 17.627,19.005L18.071,19.032C18.729,19.183 19.493,19.182 20.153,19.332C20.576,19.428 21.01,19.407 21.401,19.496C21.591,19.539 21.802,19.481 21.929,19.578L21.873,19.578C21.509,19.898 20.816,20.13 20.375,20.395C19.271,21.058 18.111,21.652 17.017,22.33C16.781,22.477 16.366,22.708 16.24,22.957C16.155,23.125 16.201,23.513 16.351,23.584L16.795,23.584L24.537,23.23L24.537,23.148C24.784,23.142 25.237,23.12 25.397,23.23L24.565,23.257L25.397,28L25.342,28C25.084,27.753 24.365,27.5 24.01,27.319C23.101,26.855 22.183,26.398 21.263,25.928C20.944,25.766 20.624,25.607 20.291,25.438C20.222,25.402 20.062,25.247 19.958,25.274C19.917,25.285 19.811,25.386 19.764,25.411C19.47,25.561 19.182,25.704 18.904,25.847C17.911,26.356 16.928,26.812 15.935,27.319C15.534,27.523 15.041,27.874 14.603,28L15.629,22.194C15.333,22.002 15.103,21.7 14.852,21.458C14.403,21.026 13.939,20.55 13.437,20.177L12.854,19.578C12.458,19.283 12.121,18.912 11.772,18.569C11.612,18.412 11.399,18.294 11.273,18.106C11.615,18.073 12.006,18.015 12.327,17.942C12.8,17.834 13.276,17.853 13.715,17.751C14.363,17.601 15.038,17.622 15.657,17.479C16.02,17.395 17.081,17.395 17.294,17.233C17.427,17.087 17.476,16.869 17.572,16.688C17.773,16.309 17.973,15.912 18.182,15.516C18.795,14.36 19.41,13.181 19.986,12C20.008,12.028 19.996,12.007 20.014,12.055C20.131,12.154 20.161,12.321 20.236,12.463C20.433,12.836 20.615,13.224 20.819,13.608L22.706,17.261C23.473,17.333 24.385,17.444 25.12,17.615C25.768,17.765 26.443,17.744 27.062,17.888C27.435,17.974 28.508,17.966 28.727,18.133C28.382,18.355 28.162,18.738 27.839,18.978C27.6,19.156 27.433,19.405 27.201,19.578C26.556,20.056 25.995,20.682 25.425,21.24C25.231,21.43 24.4,22.067 24.371,22.303C24.46,22.437 24.514,22.961 24.537,23.148Z"
android:strokeWidth=
"1"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
>
<aapt:attr
name=
"android:fillColor"
>
<gradient
android:startX=
"29.642"
android:startY=
"35.648"
android:endX=
"20"
android:endY=
"25.049"
android:type=
"linear"
>
<item
android:offset=
"0"
android:color=
"#FFFCA629"
/>
<item
android:offset=
"1"
android:color=
"#FFFFFFFF"
/>
</gradient>
</aapt:attr>
</path>
</vector>
ydl-webview/src/main/res/drawable/icon_meditation_share_save.xml
0 → 100644
View file @
deddb032
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"40dp"
android:height=
"40dp"
android:viewportWidth=
"40"
android:viewportHeight=
"40"
>
<path
android:pathData=
"M20,20m-20,0a20,20 0,1 1,40 0a20,20 0,1 1,-40 0"
android:strokeWidth=
"1"
android:fillColor=
"#DDF2FF"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M29,22.42L29,27.802C29,28.348 28.558,28.791 28.012,28.791L12.989,28.791C12.443,28.791 12,28.348 12,27.802L12,22.42C12,21.874 12.443,21.431 12.988,21.431C13.534,21.431 13.977,21.874 13.977,22.42L13.977,26.814L27.023,26.814L27.023,22.42C27.023,21.874 27.466,21.431 28.012,21.431C28.557,21.431 29,21.874 29,22.42Z"
android:strokeWidth=
"1"
android:fillColor=
"#1DA1F2"
android:fillType=
"nonZero"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M19.794,23.659C19.98,23.849 20.235,23.956 20.5,23.956C20.766,23.956 21.02,23.849 21.206,23.659L25.149,19.634C25.531,19.244 25.525,18.618 25.135,18.236C24.745,17.854 24.119,17.861 23.737,18.251L21.488,20.546L21.488,11.988C21.488,11.443 21.046,11 20.5,11C19.954,11 19.512,11.443 19.512,11.988L19.512,20.546L17.264,18.251C16.882,17.861 16.256,17.854 15.866,18.236C15.476,18.618 15.469,19.244 15.851,19.634L19.794,23.659Z"
android:strokeWidth=
"1"
android:fillColor=
"#1DA1F2"
android:fillType=
"nonZero"
android:strokeColor=
"#00000000"
/>
</vector>
ydl-webview/src/main/res/drawable/icon_meditation_share_wechat.xml
0 → 100644
View file @
deddb032
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:aapt=
"http://schemas.android.com/aapt"
android:width=
"40dp"
android:height=
"40dp"
android:viewportWidth=
"40"
android:viewportHeight=
"40"
>
<path
android:pathData=
"M20,20m-20,0a20,20 0,1 1,40 0a20,20 0,1 1,-40 0"
android:strokeWidth=
"1"
android:fillColor=
"#5AC689"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
/>
<path
android:pathData=
"M24.55,17.442C27.724,17.442 30.545,19.658 30.545,22.379C30.545,23.909 29.49,25.273 28.076,26.297L28.076,26.297L28.606,28L26.668,26.976C25.965,27.141 25.254,27.314 24.55,27.314C21.188,27.314 18.547,25.106 18.547,22.379C18.547,19.658 21.188,17.442 24.55,17.442ZM17.39,12C20.936,12 24.04,14.077 24.662,16.879C24.431,16.856 24.199,16.841 23.968,16.841C20.544,16.841 17.837,19.304 17.838,22.337C17.838,22.838 17.917,23.33 18.061,23.792C17.838,23.814 17.613,23.822 17.39,23.822C16.496,23.822 15.77,23.645 14.868,23.476L14.868,23.476L12.345,24.699L13.064,22.606C11.26,21.389 10.182,19.82 10.182,17.911C10.182,14.601 13.431,12 17.39,12ZM22.603,20.171C22.252,20.171 21.901,20.51 21.901,20.848C21.901,21.188 22.252,21.527 22.603,21.527C23.135,21.527 23.487,21.188 23.487,20.848C23.487,20.51 23.135,20.171 22.603,20.171ZM26.489,20.171C26.138,20.171 25.787,20.51 25.787,20.848C25.787,21.188 26.138,21.527 26.489,21.527C27.012,21.527 27.372,21.188 27.372,20.848C27.372,20.51 27.02,20.171 26.489,20.171ZM20.088,14.955C19.552,14.955 19.011,15.301 19.003,15.825C19.003,16.348 19.545,16.694 20.088,16.694C20.63,16.694 20.989,16.348 20.989,15.825C20.989,15.302 20.63,14.955 20.088,14.955ZM15.043,14.955C14.501,14.955 13.958,15.301 13.958,15.824C13.958,16.348 14.5,16.694 15.043,16.694C15.587,16.694 15.946,16.34 15.946,15.824C15.946,15.301 15.587,14.955 15.043,14.955Z"
android:strokeWidth=
"1"
android:fillType=
"nonZero"
android:strokeColor=
"#00000000"
>
<aapt:attr
name=
"android:fillColor"
>
<gradient
android:startX=
"49.894"
android:startY=
"36.333"
android:endX=
"22.633"
android:endY=
"23.033"
android:type=
"linear"
>
<item
android:offset=
"0"
android:color=
"#FF43E07D"
/>
<item
android:offset=
"1"
android:color=
"#FFFFFFFF"
/>
</gradient>
</aapt:attr>
</path>
</vector>
ydl-webview/src/main/res/layout/layout_share_meditation_dialog.xml
0 → 100644
View file @
deddb032
<?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:id=
"@+id/csl_root_layout"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#5D000000"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/csl_share_layout"
android:layout_width=
"match_parent"
android:layout_height=
"176dp"
android:layout_margin=
"20dp"
android:background=
"@drawable/bg_share_play_meditation_bottom"
android:paddingHorizontal=
"15dp"
android:paddingTop=
"28dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
>
<LinearLayout
android:id=
"@+id/ll_wechat_friend"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
app:layout_constraintEnd_toStartOf=
"@id/ll_wechat_circle_of_friends"
app:layout_constraintHorizontal_weight=
"1"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
>
<ImageView
android:id=
"@+id/iv_wechat"
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:src=
"@drawable/icon_meditation_share_wechat"
/>
<TextView
android:id=
"@+id/tv_wechat"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"12dp"
android:text=
"微信好友"
android:textColor=
"#FF666666"
android:textSize=
"14sp"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_wechat_circle_of_friends"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
app:layout_constraintEnd_toStartOf=
"@id/ll_save_picture"
app:layout_constraintHorizontal_weight=
"1"
app:layout_constraintStart_toEndOf=
"@id/ll_wechat_friend"
app:layout_constraintTop_toTopOf=
"parent"
>
<ImageView
android:id=
"@+id/iv_circle"
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:src=
"@drawable/icon_meditation_share_friends"
/>
<TextView
android:id=
"@+id/tv_circle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"12dp"
android:text=
"朋友圈"
android:textColor=
"#FF666666"
android:textSize=
"14sp"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_save_picture"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
android:visibility=
"gone"
app:layout_constraintEnd_toStartOf=
"@id/ll_qq_zone"
app:layout_constraintHorizontal_weight=
"1"
app:layout_constraintStart_toEndOf=
"@id/ll_wechat_circle_of_friends"
app:layout_constraintTop_toTopOf=
"parent"
>
<ImageView
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:src=
"@drawable/icon_meditation_share_save"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"12dp"
android:text=
"保存图片"
android:textColor=
"#FF666666"
android:textSize=
"14sp"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_qq_zone"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
app:layout_constraintEnd_toStartOf=
"@id/ll_qq_friend"
app:layout_constraintHorizontal_weight=
"1"
app:layout_constraintStart_toEndOf=
"@id/ll_save_picture"
app:layout_constraintTop_toTopOf=
"parent"
>
<ImageView
android:id=
"@+id/iv_qq_zone"
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:src=
"@drawable/icon_meditation_share_qqzone"
/>
<TextView
android:id=
"@+id/tv_qq_zone"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"12dp"
android:text=
"QQ空间"
android:textColor=
"#FF666666"
android:textSize=
"14sp"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_qq_friend"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_weight=
"1"
app:layout_constraintStart_toEndOf=
"@id/ll_qq_zone"
app:layout_constraintTop_toTopOf=
"parent"
>
<ImageView
android:id=
"@+id/iv_qq"
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:src=
"@drawable/icon_meditation_share_qq"
/>
<TextView
android:id=
"@+id/tv_qq"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"12dp"
android:text=
"QQ好友"
android:textColor=
"#FF666666"
android:textSize=
"14sp"
/>
</LinearLayout>
<TextView
android:id=
"@+id/tv_cancel_share"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:padding=
"20dp"
android:text=
"取消"
android:textColor=
"#FF242424"
android:textSize=
"16sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
ydl-webview/src/main/res/values/styles.xml
0 → 100644
View file @
deddb032
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style
name=
"share_meditation_dialog"
parent=
"Theme.Design.BottomSheetDialog"
>
<item
name=
"android:windowIsFloating"
>
true
</item>
<item
name=
"android:statusBarColor"
>
@color/transparent
</item>
<item
name=
"android:windowSoftInputMode"
>
adjustResize
</item>
</style>
</resources>
\ 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