diff --git a/common/src/main/java/com/yunbao/common/views/floatingview/APPEasyFloat.java b/common/src/main/java/com/yunbao/common/views/floatingview/APPEasyFloat.java index 1549e406d..1a3d49a94 100644 --- a/common/src/main/java/com/yunbao/common/views/floatingview/APPEasyFloat.java +++ b/common/src/main/java/com/yunbao/common/views/floatingview/APPEasyFloat.java @@ -168,5 +168,8 @@ public class APPEasyFloat implements Application.ActivityLifecycleCallbacks { FloatingView.get().remove(); FloatingView.get().detach(activity); activity.getApplication().unregisterActivityLifecycleCallbacks(this); + if (magnetViewListener != null) { + magnetViewListener.dismiss(); + } } } diff --git a/common/src/main/java/com/yunbao/common/views/floatingview/MagnetViewListener.java b/common/src/main/java/com/yunbao/common/views/floatingview/MagnetViewListener.java index ea41fa0eb..09ab1a287 100644 --- a/common/src/main/java/com/yunbao/common/views/floatingview/MagnetViewListener.java +++ b/common/src/main/java/com/yunbao/common/views/floatingview/MagnetViewListener.java @@ -7,4 +7,6 @@ public interface MagnetViewListener { void invoke(FloatingMagnetView magnetView); void onRemove(); + + void dismiss(); } 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 40e278042..213b8cc2e 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 @@ -47,7 +47,7 @@ public class LiveFloatView implements Function1 { return instance; } - public void builderFloat(Activity mContext, String url,Class back) { + public void builderFloat(Activity mContext, String url, Class back) { this.mContext = mContext; this.url = url; APPEasyFloat.getInstance().layout(R.layout.view_flaot_live) @@ -77,7 +77,13 @@ public class LiveFloatView implements Function1 { @Override public void onRemove() { -// mPlayer.stopPlay(); +// + } + + @Override + public void dismiss() { + if (mPlayer != null) + mPlayer.stopPlay(); } }) .show(mContext); diff --git a/common/src/main/res/values-en/strings.xml b/common/src/main/res/values-en/strings.xml index 5da7c1017..30c268445 100644 --- a/common/src/main/res/values-en/strings.xml +++ b/common/src/main/res/values-en/strings.xml @@ -924,4 +924,11 @@ Limited ride And limited avatar frame Don\'t like the small window play?\n You can turn it off in [Personal Center] - [Settings] Go to Settings Got it + Personal Settings + Rewards + Change password + Blacklist + Message Settings + Blocking gift effects + Blocking seat effects diff --git a/main/src/main/java/com/yunbao/main/activity/SettingActivity.java b/main/src/main/java/com/yunbao/main/activity/SettingActivity.java index a022b7afa..f03bc0b6e 100644 --- a/main/src/main/java/com/yunbao/main/activity/SettingActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/SettingActivity.java @@ -38,6 +38,7 @@ import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.VersionUtil; import com.yunbao.common.utils.WordUtil; +import com.yunbao.common.views.floatingview.APPEasyFloat; import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.main.R; import com.yunbao.main.adapter.SettingAdapter; @@ -103,6 +104,14 @@ public class SettingActivity extends AbsActivity implements OnItemClickListener< mRecyclerView.setAdapter(mAdapter); } }); + //跳转自己 + ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.individual_set), new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + RouteUtil.forwardEditProfileActivity(); + } + }); + //黑名单 ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.blacklist), new ViewClicksAntiShake.ViewClicksCallBack() { @Override @@ -179,6 +188,7 @@ public class SettingActivity extends AbsActivity implements OnItemClickListener< } //更新特效开关 IMLoginManager.get(mContext).initFloat(isFloat); + APPEasyFloat.getInstance().dismiss(mContext); } }); //系统悬浮窗 diff --git a/main/src/main/res/layout/activity_setting.xml b/main/src/main/res/layout/activity_setting.xml index be37c111c..b0a349060 100644 --- a/main/src/main/res/layout/activity_setting.xml +++ b/main/src/main/res/layout/activity_setting.xml @@ -24,6 +24,7 @@ android:orientation="vertical">