From 8f0a1a09a67b80ee8e1cf7a3e727a4a265ee9bda Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Thu, 10 Nov 2022 14:55:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=B3=E9=97=AD=E5=B0=8F?= =?UTF-8?q?=E7=AA=97=E6=97=B6=E9=83=A8=E5=88=86=E6=9C=BA=E5=9E=8B=E9=97=AA?= =?UTF-8?q?=E9=80=80=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/common/dialog/HintDialog.java | 14 ++++++++++++++ .../yunbao/common/views/weight/LiveFloatView.java | 10 ++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/dialog/HintDialog.java b/common/src/main/java/com/yunbao/common/dialog/HintDialog.java index a4ec14280..a7bdd8b35 100644 --- a/common/src/main/java/com/yunbao/common/dialog/HintDialog.java +++ b/common/src/main/java/com/yunbao/common/dialog/HintDialog.java @@ -7,6 +7,11 @@ import android.view.Window; import android.view.WindowManager; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentTransaction; + import com.yunbao.common.R; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.DpUtil; @@ -77,6 +82,15 @@ public class HintDialog extends AbsDialogFragment { } + @Override + public void show(@NonNull FragmentManager manager, @Nullable String tag) { + try { + super.show(manager, tag); + } catch (Exception e) { + e.printStackTrace(); + } + } + private HintListener listener; public HintDialog setListener(HintListener listener) { diff --git a/common/src/main/java/com/yunbao/common/views/weight/LiveFloatView.java b/common/src/main/java/com/yunbao/common/views/weight/LiveFloatView.java index e4cb1333a..8c68b9ff7 100644 --- a/common/src/main/java/com/yunbao/common/views/weight/LiveFloatView.java +++ b/common/src/main/java/com/yunbao/common/views/weight/LiveFloatView.java @@ -9,6 +9,7 @@ import android.view.Gravity; import android.view.View; import android.widget.RelativeLayout; +import androidx.appcompat.app.AppCompatActivity; import androidx.cardview.widget.CardView; import androidx.fragment.app.FragmentActivity; @@ -28,12 +29,17 @@ import com.yunbao.common.dialog.HintDialog; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.HttpClient; import com.yunbao.common.manager.IMLoginManager; +import com.yunbao.common.utils.DeviceUtils; import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.RouteUtil; +import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.views.floatingview.APPEasyFloat; import com.yunbao.common.views.floatingview.FloatingMagnetView; import com.yunbao.common.views.floatingview.MagnetViewListener; +import java.lang.ref.WeakReference; +import java.util.List; + import kotlin.Unit; import kotlin.jvm.functions.Function1; @@ -168,13 +174,13 @@ public class LiveFloatView implements Function1 { callback.invoke(aBoolean); } builder.dismiss(() -> { - if (mPlayer != null && mPlayer.isPlaying() ) { + if (mPlayer != null && mPlayer.isPlaying()) { mPlayer.stopPlay(true); } return null; }); builder.hide(view12 -> { - if (mPlayer != null && mPlayer.isPlaying() ) { + if (mPlayer != null && mPlayer.isPlaying()) { mPlayer.pause(); } return null;