Commit cc15c960 by 王佳洋

音频快照

parent 0ff123a5
...@@ -14,7 +14,7 @@ buildscript { ...@@ -14,7 +14,7 @@ buildscript {
ydlrouter_version = '1.2.3' ydlrouter_version = '1.2.3'
constrait_support_version = '1.0.2' constrait_support_version = '1.0.2'
componentVersion = "0.3.0.24-SNAPSHOT" componentVersion = "0.3.0.25-SNAPSHOT"
} }
repositories { repositories {
mavenCentral() mavenCentral()
......
...@@ -38,7 +38,7 @@ class CourseSpeedDialog : BaseDialogFragment() { ...@@ -38,7 +38,7 @@ class CourseSpeedDialog : BaseDialogFragment() {
} }
fun setSpeedPosition(speed: Float) { fun setSpeedPosition(speed: Float) {
mCurrentPosition = mSpeedList.indexOf(speed) mCurrentPosition = mSpeedList.indexOfFirst { speed == it }
} }
inner class CourseSpeedAdapter( inner class CourseSpeedAdapter(
......
...@@ -52,9 +52,9 @@ class HomeImpl(context: Context, homeView: IHomeContract.View) : HomeBaseImpl(co ...@@ -52,9 +52,9 @@ class HomeImpl(context: Context, homeView: IHomeContract.View) : HomeBaseImpl(co
AudioPlayer.get().singlePlay(music, false) AudioPlayer.get().singlePlay(music, false)
PlayerFloatHelper.playingType = PlayTypeEnum.PLAY_TYPE_CONFIDE PlayerFloatHelper.playingType = PlayTypeEnum.PLAY_TYPE_CONFIDE
if (PlayerFloatHelper.isShow(mContext!!)) { if (PlayerFloatHelper.isShow()) {
if (PlayerFloatHelper.playingType == PlayTypeEnum.PLAY_TYPE_CONFIDE) { if (PlayerFloatHelper.playingType == PlayTypeEnum.PLAY_TYPE_CONFIDE) {
PlayerFloatHelper.removeView(mContext!!) PlayerFloatHelper.removeView()
PlayerFloatHelper.show(mContext!!) PlayerFloatHelper.show(mContext!!)
} else { } else {
...@@ -78,9 +78,8 @@ class HomeImpl(context: Context, homeView: IHomeContract.View) : HomeBaseImpl(co ...@@ -78,9 +78,8 @@ class HomeImpl(context: Context, homeView: IHomeContract.View) : HomeBaseImpl(co
override fun onPlayFinish() { override fun onPlayFinish() {
stopPlayAnim() stopPlayAnim()
if (PlayerFloatHelper.isShow(mContext!!)) { if (PlayerFloatHelper.isShow()) {
PlayerFloatHelper.removeView(mContext!!) PlayerFloatHelper.removeResetView()
AudioPlayer.get().stopPlayer()
} }
} }
......
...@@ -45,6 +45,7 @@ class ImageUtil { ...@@ -45,6 +45,7 @@ class ImageUtil {
* base64字符串 * base64字符串
* 保存图片到相册 * 保存图片到相册
*/ */
@JvmStatic
fun savePicture(context: Context, base64: String?): Disposable? { fun savePicture(context: Context, base64: String?): Disposable? {
var disposable: Disposable? = null var disposable: Disposable? = null
base64?.run { base64?.run {
...@@ -71,6 +72,7 @@ class ImageUtil { ...@@ -71,6 +72,7 @@ class ImageUtil {
* bitmap * bitmap
* 保存图片到相册 * 保存图片到相册
*/ */
@JvmStatic
fun savePicture(context: Context, bitmap: Bitmap?): Disposable? { fun savePicture(context: Context, bitmap: Bitmap?): Disposable? {
var disposable: Disposable? = null var disposable: Disposable? = null
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { // if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment