推送直播,暂时保留了测试关闭按钮,暂时没有重复推送
This commit is contained in:
@@ -77,15 +77,21 @@ public class V2XPushLiveCarScenario extends AbsV2XScenario<V2XPushMessageEntity>
|
||||
@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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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<V
|
||||
private Context mContext;
|
||||
private V2XLiveGSYVideoView mV2XLiveGSYVideoView;
|
||||
private MogoImageView mIvReportHead;
|
||||
private ImageView pushVideoClose;
|
||||
// 弹窗状态监听
|
||||
private V2XWindowStatusListener mV2XWindowStatusListener;
|
||||
|
||||
@@ -64,6 +66,13 @@ public class V2XPushLiveCarWindow extends RelativeLayout implements IV2XWindow<V
|
||||
// 详情列表
|
||||
mV2XLiveGSYVideoView = findViewById(R.id.videoPlayer);
|
||||
mIvReportHead = findViewById(R.id.ivReportHead);
|
||||
pushVideoClose = findViewById(R.id.pushVideoClose);
|
||||
pushVideoClose.setOnClickListener(v -> {
|
||||
//移除窗体
|
||||
V2XServiceManager
|
||||
.getIMogoWindowManager()
|
||||
.removeView(this);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -133,7 +142,10 @@ public class V2XPushLiveCarWindow extends RelativeLayout implements IV2XWindow<V
|
||||
runnableV2XEvent = () -> {
|
||||
Logger.d(MODULE_NAME, "V2X=== Window 30秒倒计时结束。。。");
|
||||
// 移出Window详细信息
|
||||
close();
|
||||
//移除窗体
|
||||
V2XServiceManager
|
||||
.getIMogoWindowManager()
|
||||
.removeView(this);
|
||||
};
|
||||
} else {
|
||||
handlerV2XEvent.removeCallbacks(runnableV2XEvent);
|
||||
|
||||
@@ -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">
|
||||
|
||||
<com.mogo.module.v2x.view.V2XLiveGSYVideoView
|
||||
android:id="@+id/videoPlayer"
|
||||
|
||||
@@ -3,7 +3,10 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/rlRoadEventDetail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="@dimen/v2x_video_window_height"
|
||||
android:layout_marginLeft="@dimen/v2x_right_context_margin"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginRight="@dimen/dp_25"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<include
|
||||
@@ -11,5 +14,11 @@
|
||||
layout="@layout/item_v2x_live_video"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pushVideoClose"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:src="@drawable/v2x_panel_close" />
|
||||
</RelativeLayout>
|
||||
Reference in New Issue
Block a user