Compare commits

...

2 Commits

Author SHA1 Message Date
18401019693
283de1047c 悬浮窗关闭 2022-11-01 16:12:16 +08:00
18401019693
06079c7e9c 红点通知 2022-11-01 14:47:58 +08:00
2 changed files with 14 additions and 0 deletions

View File

@ -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();

View File

@ -92,6 +92,12 @@
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
@ -103,6 +109,7 @@
android:id="@+id/v_table_redpoint"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginEnd="5dp"
android:background="@drawable/background_ff5075"
android:gravity="center"
android:textColor="@color/white"