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