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
5ac59c8a
Commit
5ac59c8a
authored
Jun 01, 2022
by
范玉宾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix play list err
parent
16a79f30
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
14 deletions
+36
-14
MeditationTimeOffActivity.kt
m-muse/src/main/java/com/yidianling/muse/activity/MeditationTimeOffActivity.kt
+0
-8
PlayMeditationActivity.kt
m-muse/src/main/java/com/yidianling/muse/activity/PlayMeditationActivity.kt
+36
-6
No files found.
m-muse/src/main/java/com/yidianling/muse/activity/MeditationTimeOffActivity.kt
View file @
5ac59c8a
package
com.yidianling.muse.activity
import
android.content.Intent
import
android.graphics.Color
import
android.os.Bundle
import
android.os.Handler
import
com.blankj.utilcode.util.SPUtils
import
com.bumptech.glide.Glide
import
com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions
import
com.bumptech.glide.request.RequestOptions
import
com.ydl.ydlcommon.base.BaseActivity
import
com.ydl.ydlcommon.utils.StatusBarUtils
import
com.ydl.ydlcommon.utils.remind.ToastHelper
import
com.yidianling.muse.R
import
jp.wasabeef.glide.transformations.BitmapTransformation
import
jp.wasabeef.glide.transformations.BlurTransformation
import
kotlinx.android.synthetic.main.activity_play_meditation_time_off.*
import
kotlinx.android.synthetic.main.activity_play_meditation_time_off.iv_close
class
MeditationTimeOffActivity
:
BaseActivity
()
{
...
...
@@ -43,7 +37,6 @@ class MeditationTimeOffActivity : BaseActivity() {
iv_close
?.
setOnClickListener
{
finish
()
}
tv_save_setting
?.
setOnClickListener
{
ToastHelper
.
show
(
"保存设置"
)
val
hour
=
wheel_hour
.
selectedItem
val
minute
=
wheel_minute
.
selectedItem
...
...
@@ -63,7 +56,6 @@ class MeditationTimeOffActivity : BaseActivity() {
}
tv_cancel_time_off
?.
setOnClickListener
{
ToastHelper
.
show
(
"关闭定时"
)
SPUtils
.
getInstance
().
put
(
"SELECT_H"
,
0
)
SPUtils
.
getInstance
().
put
(
"SELECT_M"
,
1
)
val
intent
=
Intent
()
...
...
m-muse/src/main/java/com/yidianling/muse/activity/PlayMeditationActivity.kt
View file @
5ac59c8a
...
...
@@ -68,6 +68,7 @@ class PlayMeditationActivity : BaseActivity() {
private
var
meditations
=
mutableListOf
<
MeditationPlayModuleBean
.
MeditationDetail
>()
private
var
currentMeditation
:
MeditationPlayModuleBean
.
MeditationDetail
?
=
null
private
var
currentMeditationIndex
=
0
private
var
collected
=
false
...
...
@@ -324,12 +325,12 @@ class PlayMeditationActivity : BaseActivity() {
iv_collect
.
setImageResource
(
R
.
drawable
.
icon_play_meditation_collect
)
}
}
else
{
show
(
"操作失败!"
)
}
},
{
object
:
ThrowableConsumer
()
{
override
fun
accept
(
msg
:
String
)
{
show
(
msg
)
}
}
})
...
...
@@ -464,6 +465,9 @@ class PlayMeditationActivity : BaseActivity() {
}
exo_play
.
setOnClickListener
{
if
(
Utils
.
isFastClick
())
return
@setOnClickListener
if
(
isPlaying
)
{
mMediaPlayer
?.
pause
()
if
(
mMeditationId
==
null
||
mMediaId
==
null
)
return
@setOnClickListener
...
...
@@ -522,6 +526,9 @@ class PlayMeditationActivity : BaseActivity() {
}
exo_prev
.
setOnClickListener
{
if
(
Utils
.
isFastClick
())
return
@setOnClickListener
//上一曲埋点
ActionCountUtils
.
baiDuCountSign3
(
MuseBIConstants
.
YDL_MUSE_MEDITATION_MUSIC_PLAY_PAGE
,
...
...
@@ -530,7 +537,12 @@ class PlayMeditationActivity : BaseActivity() {
mBuried
?:
""
,
""
)
val
currentPosition
=
meditations
.
indexOf
(
currentMeditation
)
var
currentPosition
=
0
meditations
?.
forEachIndexed
{
index
,
meditationDetail
->
if
(
meditationDetail
.
mediaId
==
mMediaId
){
currentPosition
=
index
}
}
if
(
currentPosition
>
0
)
{
if
(
mMeditationId
==
null
||
mMediaId
==
null
)
return
@setOnClickListener
...
...
@@ -552,7 +564,10 @@ class PlayMeditationActivity : BaseActivity() {
val
currentPosition
=
meditation
.
broadcastTime
mStatus
=
meditation
.
status
updateUI
()
mTitle
=
meditation
.
title
mDesc
=
meditation
.
title
updateUI
(
needRefresh
=
false
)
initMediaPlayer
(
mMediaUrl
,
currentPosition
,
mMediaIdFromLocal
==
mMediaId
)
}
else
{
...
...
@@ -561,6 +576,8 @@ class PlayMeditationActivity : BaseActivity() {
}
exo_next
.
setOnClickListener
{
if
(
Utils
.
isFastClick
())
return
@setOnClickListener
//下一个点击事件
ActionCountUtils
.
baiDuCountSign3
(
MuseBIConstants
.
YDL_MUSE_MEDITATION_MUSIC_PLAY_PAGE
,
...
...
@@ -569,7 +586,12 @@ class PlayMeditationActivity : BaseActivity() {
mBuried
?:
""
,
""
)
val
currentPosition
=
meditations
.
indexOf
(
currentMeditation
)
var
currentPosition
=
0
meditations
?.
forEachIndexed
{
index
,
meditationDetail
->
if
(
meditationDetail
.
mediaId
==
mMediaId
){
currentPosition
=
index
}
}
if
(
currentPosition
<
meditations
.
size
-
1
)
{
if
(
mMeditationId
==
null
||
mMediaId
==
null
)
return
@setOnClickListener
...
...
@@ -583,7 +605,8 @@ class PlayMeditationActivity : BaseActivity() {
)
val
meditation
=
meditations
[
currentPosition
+
1
]
currentMeditation
=
meditation
currentMeditation
=
meditation
.
copy
(
meditationId
=
mMeditationId
!!
)
mMediaId
=
meditation
.
mediaId
mMediaCoverUrl
=
meditation
.
coverImageUrl
...
...
@@ -591,6 +614,9 @@ class PlayMeditationActivity : BaseActivity() {
val
currentPosition
=
meditation
.
broadcastTime
mStatus
=
meditation
.
status
mTitle
=
meditation
.
title
mDesc
=
meditation
.
title
updateUI
(
needRefresh
=
false
)
initMediaPlayer
(
mMediaUrl
,
currentPosition
,
mMediaIdFromLocal
==
mMediaId
)
...
...
@@ -600,6 +626,8 @@ class PlayMeditationActivity : BaseActivity() {
}
exo_rew
.
setOnClickListener
{
if
(
Utils
.
isFastClick
())
return
@setOnClickListener
//快退点击事件
ActionCountUtils
.
baiDuCountSign3
(
MuseBIConstants
.
YDL_MUSE_MEDITATION_MUSIC_PLAY_PAGE
,
...
...
@@ -617,6 +645,8 @@ class PlayMeditationActivity : BaseActivity() {
}
exo_ffwd
.
setOnClickListener
{
if
(
Utils
.
isFastClick
())
return
@setOnClickListener
//快进点击事件
ActionCountUtils
.
baiDuCountSign3
(
MuseBIConstants
.
YDL_MUSE_MEDITATION_MUSIC_PLAY_PAGE
,
...
...
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