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
f556f899
Commit
f556f899
authored
Aug 09, 2022
by
王佳洋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
音频播放倍速
parent
3eaf2c42
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletions
+6
-1
AudioPlayActivity.kt
m-course/src/main/java/com/yidianling/course/coursePlay/AudioPlayActivity.kt
+5
-0
course_speed.png
m-course/src/main/res/drawable-xhdpi/course_speed.png
+0
-0
activity_audio_play.xml
m-course/src/main/res/layout/activity_audio_play.xml
+1
-1
No files found.
m-course/src/main/java/com/yidianling/course/coursePlay/AudioPlayActivity.kt
View file @
f556f899
package
com.yidianling.course.coursePlay
import
android.annotation.SuppressLint
import
android.content.Intent
import
android.graphics.drawable.Drawable
import
android.text.TextUtils
...
...
@@ -178,6 +179,7 @@ class AudioPlayActivity : BaseMvpActivity<IAudioPlayContract.View, IAudioPlayCon
}
}
@SuppressLint
(
"SetTextI18n"
)
override
fun
updateView
(
bean
:
CourseExtraBean
,
from
:
Int
)
{
bean
.
let
{
Glide
.
with
(
this
)
...
...
@@ -206,6 +208,7 @@ class AudioPlayActivity : BaseMvpActivity<IAudioPlayContract.View, IAudioPlayCon
iv_speed
.
setOnClickListener
{
speedClick
()
}
tv_list
.
setOnClickListener
{
_
->
listClick
(
it
)
}
iv_list
.
setOnClickListener
{
_
->
listClick
(
it
)
}
tv_speed
.
text
=
"${audio_play.getSpeed()}X"
audio_play
.
setData
(
mPresenter
.
getPlayPosition
(),
mPresenter
.
convertToMusics
(),
from
)
}
}
...
...
@@ -234,11 +237,13 @@ class AudioPlayActivity : BaseMvpActivity<IAudioPlayContract.View, IAudioPlayCon
}
}
@SuppressLint
(
"SetTextI18n"
)
private
fun
speedClick
()
{
showFragment
(
mCourseSpeedDialog
?:
CourseSpeedDialog
().
also
{
dialog
->
mCourseSpeedDialog
=
dialog
dialog
.
setSpeedPosition
(
audio_play
.
getSpeed
())
dialog
.
mListener
=
{
speed
->
tv_speed
.
text
=
"${speed}X"
audio_play
.
setSpeed
(
speed
)
}
},
"courseSpeed"
)
...
...
m-course/src/main/res/drawable-xhdpi/course_speed.png
View replaced file @
3eaf2c42
View file @
f556f899
1.66 KB
|
W:
|
H:
2.32 KB
|
W:
|
H:
2-up
Swipe
Onion skin
m-course/src/main/res/layout/activity_audio_play.xml
View file @
f556f899
...
...
@@ -136,7 +136,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingTop=
"7dp"
android:text=
"倍速
"
tools:text=
"1.0X
"
android:textColor=
"@android:color/white"
android:textSize=
"13sp"
app:layout_constraintEnd_toStartOf=
"@id/tv_list"
...
...
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