Commit 37ec7f3d by 洪国微

merge

parents d690bbf2 caec909a
......@@ -5,8 +5,8 @@ ext {
ydl_app = [
appName : "心理咨询壹点灵",
applicationId: "com.cxzapp.yidianling",
versionName : "3.9.50",
versionCode : 3950,
versionName : "4.0.00",
versionCode : 4000,
]
xlzx_app = [
......@@ -42,13 +42,15 @@ ext {
ydlPublishVersion = [
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.24",
"m-consultant" : "0.0.38",
"m-course" : "0.0.17",
"m-fm" : "0.0.15",
"m-muse" : "0.0.12",
"m-tests" : "0.0.10",
"m-user" : "0.0.31",
"m-consultant" : "0.0.39",
"m-course" : "0.0.25",
"m-fm" : "0.0.17",
"m-muse" : "0.0.14",
"m-tests" : "0.0.11",
"m-user" : "0.0.32",
//-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.1",
......@@ -62,12 +64,14 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform" : "0.0.24",
"ydl-platform" : "0.0.26",
//第二步 若干
"ydl-webview" : "0.0.26",
"ydl-media" : "0.0.12",
"ydl-pay" : "0.0.9",
"ydl-webview" : "0.0.27",
"ydl-media" : "0.0.13",
"ydl-pay" : "0.0.10",
"m-audioim" : "0.0.17",
//以下 几乎不会动
"router" : "0.0.1",
"ydl-net" : "0.0.2",
......@@ -97,12 +101,14 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform" : "0.0.24",
"ydl-platform" : "0.0.26",
//第二步 若干
"ydl-webview" : "0.0.24",
"ydl-media" : "0.0.12",
"ydl-pay" : "0.0.9",
"ydl-webview" : "0.0.27",
"ydl-media" : "0.0.13",
"ydl-pay" : "0.0.10",
"m-audioim" : "0.0.17",
//以下 几乎不会动
"router" : "0.0.1",
......@@ -245,7 +251,7 @@ ext {
"ydl-utils" : "com.ydl:ydl-utils:${ydlCompileVersion["ydl-utils"]}",
//flutter功能组件升级===>发布ydl-flutter组件===>引用flutter相关的业务模块
"ydl-flutter" : "com.ydl:ydl-flutter:0.0.13@aar",
"ydl-flutter" : "com.ydl:ydl-flutter:0.0.14@aar",
//基础组件 <<--- 先发这个,发完改这里的版本号
"ydl-platform" : "com.ydl:ydl-platform:${ydlCompileVersion["ydl-platform"]}@aar",
......
......@@ -26,6 +26,7 @@ import com.ydl.media.audio.AudioPlayer;
import com.ydl.media.audio.OnPlayerEventListener;
import com.ydl.media.audio.model.Music;
import com.ydl.media.view.PlayerFloatHelper;
import com.ydl.media.view.PlayerFloatView;
import com.ydl.ydl_image.module.GlideApp;
import com.ydl.ydl_image.transform.GlideCircleRingTransform;
import com.ydl.ydlcommon.base.BaseActivity;
......@@ -61,7 +62,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
* Created by softrice on 15/12/11.
*/
@Route(path = "/fm/detail")
public class FMDetailActivity extends BaseActivity implements View.OnClickListener, OnPlayerEventListener {
public class FMDetailActivity extends BaseActivity implements View.OnClickListener, OnPlayerEventListener, PlayerFloatView.FloatViewPlayListener {
int id;
boolean isSplash;
......@@ -222,11 +223,11 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
iv_next.setOnClickListener(this);
iv_last.setOnClickListener(this);
iv_share.setOnClickListener(this);
initRefreshAnimate();
init();
initSurfaceView();
initImg();
PlayerFloatHelper.Companion.addClickListener(this);
}
@SuppressLint("WrongConstant")
......@@ -489,7 +490,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
private void share() {
if (fmDetail == null)
return;
YDLShareDialog dialog = YDLShareDialog.Companion.style1(this, fmDetail.getTitle(), fmDetail.getShare_url(), null, fmDetail.getImage_url());
YDLShareDialog dialog = YDLShareDialog.Companion.style1(this, fmDetail.getTitle(), fmDetail.getShare_url(), "", fmDetail.getImage_url());
dialog.setCallBack(type -> {
if (1 == type) {
if (!FMIn.INSTANCE.isLogin()) {
......@@ -590,8 +591,8 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
anim.cancel();
EventBus.getDefault().unregister(this);
AudioPlayer.Companion.get().removeOnPlayEventListener(this);
PlayerFloatHelper.Companion.removeClickListener(this);
}
@Override
......@@ -639,4 +640,21 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
updateAnimateStatus();
getFMDetail(fmDetail.getNext_id(), true);
}
@Override
public void onPauseClick() {
iv_play.setImageResource(R.drawable.fm_play_2);
fmSurfaceView.stopTimer();
}
@Override
public void onStartClick() {
iv_play.setImageResource(R.drawable.fm_stop_2);
fmSurfaceView.playTimer();
}
@Override
public void onPlayFinish() {
}
}
......@@ -6,6 +6,7 @@ import android.content.Intent
import android.graphics.PixelFormat
import android.graphics.Point
import android.os.Bundle
import android.support.v4.view.ViewCompat
import android.text.TextUtils
import android.view.Gravity
import android.view.View
......@@ -141,7 +142,12 @@ class PlayerFloatHelper {
private fun addFloatToWm(context: Context) {
if (wm != null && !TextUtils.isEmpty(showingPageName)) {
wm?.removeViewImmediate(mPlayerFloatView)
if (ViewCompat.isAttachedToWindow(mPlayerFloatView)){
// if (context is Activity && !(context.isFinishing)){
// wm?.removeViewImmediate(mPlayerFloatView)
// }
wm?.removeViewImmediate(mPlayerFloatView)
}
wm = null
}
//获取WindowManager
......
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