diff --git a/main/src/main/java/com/yunbao/main/activity/MainActivity.java b/main/src/main/java/com/yunbao/main/activity/MainActivity.java index 65683ecf3..322f0c587 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -41,6 +41,7 @@ import com.google.firebase.messaging.FirebaseMessaging; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import com.jakewharton.rxbinding3.view.RxView; +import com.lzf.easyfloat.EasyFloat; import com.lzf.easyfloat.interfaces.OnPermissionResult; import com.lzf.easyfloat.permission.PermissionUtils; import com.tencent.imsdk.v2.V2TIMCallback; @@ -88,6 +89,7 @@ import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.VersionUtil; import com.yunbao.common.utils.WordUtil; import com.yunbao.common.views.AbsMainViewHolder; +import com.yunbao.common.views.floatingview.APPEasyFloat; import com.yunbao.common.views.weight.LiveFloatView; import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.live.activity.LiveAudienceActivity; @@ -946,6 +948,11 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene if (curTime - mLastClickBackTime > 2000) { mLastClickBackTime = curTime; ToastUtil.show(R.string.main_click_next_exit); + APPEasyFloat.getInstance().dismiss(mContext); + //判断是否有直播悬浮窗,有直接关闭 + if (EasyFloat.isShow("LiveFloatView")) { + EasyFloat.dismiss("LiveFloatView", true); + } return; } super.onBackPressed();