添加关闭按钮
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"></com.mogo.module.v2x.view.TextureVideoView>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/roadVideoClose"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/roadVideoView"
|
||||
android:layout_alignRight="@+id/roadVideoView"
|
||||
android:src="@drawable/v2x_panel_close" />
|
||||
|
||||
|
||||
</com.mogo.module.v2x.view.RoundLayout>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user