From 283de1047c378ae5a93d3be3ad4a0d6f040afb7c Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Tue, 1 Nov 2022 16:12:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=82=AC=E6=B5=AE=E7=AA=97=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/yunbao/main/activity/MainActivity.java | 7 +++++++ 1 file changed, 7 insertions(+) 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();