From d0727f2254d1fcdf0d92fc5ec63226ef06e150af Mon Sep 17 00:00:00 2001 From: liujing Date: Thu, 29 Oct 2020 21:13:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E9=80=81=E7=9B=B4=E6=92=AD,=E6=9A=82?= =?UTF-8?q?=E6=97=B6=E4=BF=9D=E7=95=99=E4=BA=86=E6=B5=8B=E8=AF=95=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E6=8C=89=E9=92=AE,=E6=9A=82=E6=97=B6=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E9=87=8D=E5=A4=8D=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scene/livecar/V2XPushLiveCarScenario.java | 20 ++++++++++++------- .../scene/livecar/V2XPushLiveCarWindow.java | 14 ++++++++++++- .../main/res/layout/item_v2x_live_video.xml | 3 +-- .../res/layout/item_v2x_push_live_video.xml | 13 ++++++++++-- 4 files changed, 38 insertions(+), 12 deletions(-) diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XPushLiveCarScenario.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XPushLiveCarScenario.java index e01dd87f44..4dcd8ff40e 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XPushLiveCarScenario.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XPushLiveCarScenario.java @@ -77,15 +77,21 @@ public class V2XPushLiveCarScenario extends AbsV2XScenario @Override public void showWindow() { if (getV2XWindow() != null) { - ViewGroup.LayoutParams layoutParams = - new ViewGroup.LayoutParams( - ViewGroup.LayoutParams.MATCH_PARENT, - (int) V2XUtils.getApp().getResources().getDimension(R.dimen.module_v2x_event_window_height)); +// ViewGroup.LayoutParams layoutParams = +// new ViewGroup.LayoutParams( +// ViewGroup.LayoutParams.MATCH_PARENT, +// (int) V2XUtils.getApp().getResources().getDimension(R.dimen.module_v2x_event_window_height)); +// V2XServiceManager +// .getMogoTopViewManager() +// .addView(getV2XWindow().getView(), layoutParams, this); +// getV2XWindow().show(getV2XMessageEntity().getContent()); +// V2XServiceManager.getMoGoV2XStatusManager().setLiveCarWindowShow(TAG, true); + V2XServiceManager - .getMogoTopViewManager() - .addView(getV2XWindow().getView(), layoutParams, this); + .getIMogoWindowManager() + .addView(getV2XWindow().getView(), 0, 0, false); getV2XWindow().show(getV2XMessageEntity().getContent()); - V2XServiceManager.getMoGoV2XStatusManager().setLiveCarWindowShow(TAG, true); + V2XServiceManager.getMoGoV2XStatusManager().setV2XAnimationWindowShow(TAG, true); } } diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XPushLiveCarWindow.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XPushLiveCarWindow.java index 92eaba72d8..0b31e6ca8c 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XPushLiveCarWindow.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/livecar/V2XPushLiveCarWindow.java @@ -6,6 +6,7 @@ import android.text.TextUtils; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; +import android.widget.ImageView; import android.widget.RelativeLayout; import com.mogo.module.common.entity.MarkerCarInfo; @@ -33,6 +34,7 @@ public class V2XPushLiveCarWindow extends RelativeLayout implements IV2XWindow { + //移除窗体 + V2XServiceManager + .getIMogoWindowManager() + .removeView(this); + }); } /** @@ -133,7 +142,10 @@ public class V2XPushLiveCarWindow extends RelativeLayout implements IV2XWindow { Logger.d(MODULE_NAME, "V2X=== Window 30秒倒计时结束。。。"); // 移出Window详细信息 - close(); + //移除窗体 + V2XServiceManager + .getIMogoWindowManager() + .removeView(this); }; } else { handlerV2XEvent.removeCallbacks(runnableV2XEvent); diff --git a/modules/mogo-module-v2x/src/main/res/layout/item_v2x_live_video.xml b/modules/mogo-module-v2x/src/main/res/layout/item_v2x_live_video.xml index cfbd596344..38fa4253da 100644 --- a/modules/mogo-module-v2x/src/main/res/layout/item_v2x_live_video.xml +++ b/modules/mogo-module-v2x/src/main/res/layout/item_v2x_live_video.xml @@ -4,8 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@drawable/v2x_alert_window_live_bg" - android:padding="@dimen/dp_20"> + android:background="@drawable/v2x_alert_window_live_bg"> - + \ No newline at end of file