From 0c44ef65db42b776592b0c96c5dfdab4cdf5601f Mon Sep 17 00:00:00 2001 From: liujing Date: Wed, 30 Sep 2020 15:35:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=85=B3=E9=97=AD=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v2x/scenario/scene/road/V2XRoadVideoWindow.java | 6 ++++++ .../src/main/res/layout/window_road_video.xml | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadVideoWindow.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadVideoWindow.java index 74f118b5dc..4a3eb4b7c7 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadVideoWindow.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadVideoWindow.java @@ -5,6 +5,7 @@ import android.net.Uri; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; +import android.widget.ImageView; import android.widget.RelativeLayout; import androidx.constraintlayout.widget.ConstraintLayout; @@ -28,6 +29,7 @@ public class V2XRoadVideoWindow extends RelativeLayout implements IV2XWindow { private V2XWindowStatusListener mV2XWindowStatusListener; private TextureVideoView mVideoView; private V2XMessageEntity mV2XMessageEntity; + private ImageView closeImage; public V2XRoadVideoWindow() { this(V2XServiceManager.getContext(), null); @@ -49,6 +51,10 @@ public class V2XRoadVideoWindow extends RelativeLayout implements IV2XWindow { private void initView(Context context) { LayoutInflater.from(context).inflate(R.layout.window_road_video, this); mVideoView = findViewById(R.id.roadVideoView); + closeImage = findViewById(R.id.roadVideoClose); + closeImage.setOnClickListener(v -> { + close(); + }); } @Override diff --git a/modules/mogo-module-v2x/src/main/res/layout/window_road_video.xml b/modules/mogo-module-v2x/src/main/res/layout/window_road_video.xml index 26989d5087..a145599956 100644 --- a/modules/mogo-module-v2x/src/main/res/layout/window_road_video.xml +++ b/modules/mogo-module-v2x/src/main/res/layout/window_road_video.xml @@ -23,7 +23,16 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toTopOf="parent"> + + +