修改UI,增加了疲劳驾驶中道路推荐中的关闭按钮
This commit is contained in:
@@ -32,7 +32,7 @@ import com.mogo.module.v2x.voice.V2XVoiceManager;
|
||||
public class V2XFatigueDrivingVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
|
||||
private TextView mTvAddress, mTvAddressDistance;
|
||||
private ImageView mIvToNav;
|
||||
private ImageView mIvToNav, mIvClose;
|
||||
private MarkerExploreWay mNoveltyInfo;
|
||||
private V2XPushMessageEntity mV2XPushMessageEntity;
|
||||
|
||||
@@ -45,7 +45,9 @@ public class V2XFatigueDrivingVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
mTvAddress = itemView.findViewById(R.id.tvAddress);
|
||||
mTvAddressDistance = itemView.findViewById(R.id.tvAddressDistance);
|
||||
mIvToNav = itemView.findViewById(R.id.ivToNav);
|
||||
mIvClose = itemView.findViewById(R.id.ivClose);
|
||||
mIvToNav.setOnClickListener(v -> triggerStartNavi(mNoveltyInfo));
|
||||
mIvClose.setOnClickListener(v -> V2XFatigueDrivingScenario.getInstance().close());
|
||||
|
||||
// 设置视图状态监听
|
||||
itemView.addOnAttachStateChangeListener(new View.OnAttachStateChangeListener() {
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.mogo.module.v2x.marker;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
public class V2XMarkerEventView extends LinearLayout {
|
||||
|
||||
|
||||
public V2XMarkerEventView(Context context) {
|
||||
this(context,null);
|
||||
}
|
||||
|
||||
public V2XMarkerEventView(Context context, @Nullable AttributeSet attrs) {
|
||||
this(context, attrs,0);
|
||||
}
|
||||
|
||||
public V2XMarkerEventView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
initView();
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user