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"> + + +