下沉了初始化方法
This commit is contained in:
@@ -11,7 +11,7 @@ import com.zhidao.mogo.module.event.panel.R;
|
|||||||
/**
|
/**
|
||||||
* @author donghongyu
|
* @author donghongyu
|
||||||
*/
|
*/
|
||||||
public class ScenarioHistoryIllegalParkVH extends V2XBaseViewHolder {
|
public class ScenarioHistoryIllegalParkVH extends V2XBaseViewHolder<V2XHistoryScenarioData> {
|
||||||
public ScenarioHistoryIllegalParkVH(@NonNull ViewGroup viewGroup) {
|
public ScenarioHistoryIllegalParkVH(@NonNull ViewGroup viewGroup) {
|
||||||
super(LayoutInflater.from(viewGroup.getContext())
|
super(LayoutInflater.from(viewGroup.getContext())
|
||||||
.inflate(R.layout.module_event_panel_share_item, viewGroup, false));
|
.inflate(R.layout.module_event_panel_share_item, viewGroup, false));
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import com.mogo.utils.logger.Logger;
|
|||||||
*
|
*
|
||||||
* @author donghongyu
|
* @author donghongyu
|
||||||
*/
|
*/
|
||||||
public abstract class V2XBaseViewHolder
|
public abstract class V2XBaseViewHolder<T>
|
||||||
extends RecyclerView.ViewHolder
|
extends RecyclerView.ViewHolder
|
||||||
implements IMogoNaviListener {
|
implements IMogoNaviListener {
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ public abstract class V2XBaseViewHolder
|
|||||||
super(itemView);
|
super(itemView);
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract void initView(V2XHistoryScenarioData viewData);
|
public abstract void initView(T viewData);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 延迟关闭窗体视图
|
* 延迟关闭窗体视图
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
|
|||||||
*
|
*
|
||||||
* @author donghongyu
|
* @author donghongyu
|
||||||
*/
|
*/
|
||||||
public abstract class V2XBaseViewHolder
|
public abstract class V2XBaseViewHolder<T>
|
||||||
extends RecyclerView.ViewHolder
|
extends RecyclerView.ViewHolder
|
||||||
implements IMogoNaviListener {
|
implements IMogoNaviListener {
|
||||||
|
|
||||||
@@ -36,6 +36,14 @@ public abstract class V2XBaseViewHolder
|
|||||||
super(itemView);
|
super(itemView);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 填充View视图
|
||||||
|
*
|
||||||
|
* @param viewData 与视图绑定的数据
|
||||||
|
*/
|
||||||
|
public abstract void initView(T viewData);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 延迟关闭窗体视图
|
* 延迟关闭窗体视图
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import com.mogo.module.v2x.voice.V2XVoiceManager;
|
|||||||
*
|
*
|
||||||
* @author donghongyu
|
* @author donghongyu
|
||||||
*/
|
*/
|
||||||
public class V2XFatigueDrivingVH extends V2XBaseViewHolder {
|
public class V2XFatigueDrivingVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||||
|
|
||||||
private TextView mTvAddress, mTvAddressDistance;
|
private TextView mTvAddress, mTvAddressDistance;
|
||||||
private ImageView mIvToNav;
|
private ImageView mIvToNav;
|
||||||
@@ -71,6 +71,7 @@ public class V2XFatigueDrivingVH extends V2XBaseViewHolder {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void initView(V2XEventShowEntity v2XEventShowEntity) {
|
public void initView(V2XEventShowEntity v2XEventShowEntity) {
|
||||||
mV2XPushMessageEntity = v2XEventShowEntity.getV2XPushMessageEntity();
|
mV2XPushMessageEntity = v2XEventShowEntity.getV2XPushMessageEntity();
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
|
|||||||
*
|
*
|
||||||
* @author donghongyu
|
* @author donghongyu
|
||||||
*/
|
*/
|
||||||
public class V2XIllegalParkVH extends V2XBaseViewHolder {
|
public class V2XIllegalParkVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||||
private TextView mAddressTv;
|
private TextView mAddressTv;
|
||||||
private TextView mIllegalNumTv;
|
private TextView mIllegalNumTv;
|
||||||
private HeartLikeView mIlIllegalParkingLike;
|
private HeartLikeView mIlIllegalParkingLike;
|
||||||
@@ -75,6 +75,7 @@ public class V2XIllegalParkVH extends V2XBaseViewHolder {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void initView(V2XEventShowEntity v2XEventShowEntity) {
|
public void initView(V2XEventShowEntity v2XEventShowEntity) {
|
||||||
mExploreWay = v2XEventShowEntity.getV2XIllegalPark();
|
mExploreWay = v2XEventShowEntity.getV2XIllegalPark();
|
||||||
mAddressTv.setText(mExploreWay.getAddr());
|
mAddressTv.setText(mExploreWay.getAddr());
|
||||||
|
|||||||
@@ -21,8 +21,9 @@ import com.mogo.service.imageloader.MogoImageView;
|
|||||||
* date : 2020/3/11 4:35 PM
|
* date : 2020/3/11 4:35 PM
|
||||||
* desc : 直播类型的卡片
|
* desc : 直播类型的卡片
|
||||||
* version: 1.0
|
* version: 1.0
|
||||||
|
* @author donghongyu
|
||||||
*/
|
*/
|
||||||
public class V2XLiveVideoVH extends V2XBaseViewHolder {
|
public class V2XLiveVideoVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||||
|
|
||||||
private V2XLiveGSYVideoView videoPlayer;
|
private V2XLiveGSYVideoView videoPlayer;
|
||||||
private MogoImageView ivReportHead;
|
private MogoImageView ivReportHead;
|
||||||
@@ -40,6 +41,7 @@ public class V2XLiveVideoVH extends V2XBaseViewHolder {
|
|||||||
ivReportHead = itemView.findViewById(R.id.ivReportHead);
|
ivReportHead = itemView.findViewById(R.id.ivReportHead);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void initView(V2XEventShowEntity v2XLiveCarEntity) {
|
public void initView(V2XEventShowEntity v2XLiveCarEntity) {
|
||||||
mV2XRoadEventEntity = v2XLiveCarEntity.getV2XRoadEventEntity();
|
mV2XRoadEventEntity = v2XLiveCarEntity.getV2XRoadEventEntity();
|
||||||
mV2XLiveCarEntity = v2XLiveCarEntity.getV2XLiveCarInfoRes();
|
mV2XLiveCarEntity = v2XLiveCarEntity.getV2XLiveCarInfoRes();
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ import static android.view.View.VISIBLE;
|
|||||||
*
|
*
|
||||||
* @author donghongyu
|
* @author donghongyu
|
||||||
*/
|
*/
|
||||||
public class V2XOtherSeekHelpVH extends V2XBaseViewHolder {
|
public class V2XOtherSeekHelpVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||||
|
|
||||||
private MogoImageView ivHead;
|
private MogoImageView ivHead;
|
||||||
private TextView tvName;
|
private TextView tvName;
|
||||||
@@ -116,6 +116,7 @@ public class V2XOtherSeekHelpVH extends V2XBaseViewHolder {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void initView(V2XEventShowEntity v2XEventShowEntity) {
|
public void initView(V2XEventShowEntity v2XEventShowEntity) {
|
||||||
mV2XPushMessageEntity = v2XEventShowEntity.getV2XPushMessageEntity();
|
mV2XPushMessageEntity = v2XEventShowEntity.getV2XPushMessageEntity();
|
||||||
// 只有自研车机才会 有车聊聊通话
|
// 只有自研车机才会 有车聊聊通话
|
||||||
|
|||||||
@@ -27,8 +27,9 @@ import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
|
|||||||
* date : 2020/3/11 4:35 PM
|
* date : 2020/3/11 4:35 PM
|
||||||
* desc : TODO 这里是前瞻演示需求,推送的消息,
|
* desc : TODO 这里是前瞻演示需求,推送的消息,
|
||||||
* version: 1.0
|
* version: 1.0
|
||||||
|
* @author donghongyu
|
||||||
*/
|
*/
|
||||||
public class V2XPushEventVH extends V2XBaseViewHolder {
|
public class V2XPushEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||||
private MogoImageView ivImg;
|
private MogoImageView ivImg;
|
||||||
private MogoImageView ivReportHead;
|
private MogoImageView ivReportHead;
|
||||||
|
|
||||||
@@ -136,6 +137,7 @@ public class V2XPushEventVH extends V2XBaseViewHolder {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void initView(V2XEventShowEntity v2XEventShowEntity) {
|
public void initView(V2XEventShowEntity v2XEventShowEntity) {
|
||||||
mV2XRoadEventEntity = v2XEventShowEntity.getV2XPushMessageEntity();
|
mV2XRoadEventEntity = v2XEventShowEntity.getV2XPushMessageEntity();
|
||||||
mNoveltyInfo = new MarkerExploreWay();
|
mNoveltyInfo = new MarkerExploreWay();
|
||||||
|
|||||||
@@ -49,8 +49,9 @@ import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
|
|||||||
* date : 2020/3/11 4:35 PM
|
* date : 2020/3/11 4:35 PM
|
||||||
* desc : 道路事件详情
|
* desc : 道路事件详情
|
||||||
* version: 1.0
|
* version: 1.0
|
||||||
|
* @author donghongyu
|
||||||
*/
|
*/
|
||||||
public class V2XRoadEventVH extends V2XBaseViewHolder {
|
public class V2XRoadEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||||
private MogoImageView ivEventImg;
|
private MogoImageView ivEventImg;
|
||||||
private MogoImageView ivReportHead;
|
private MogoImageView ivReportHead;
|
||||||
private ImageView ivEventPlay;
|
private ImageView ivEventPlay;
|
||||||
@@ -156,6 +157,7 @@ public class V2XRoadEventVH extends V2XBaseViewHolder {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void initView(V2XEventShowEntity v2XEventShowEntity) {
|
public void initView(V2XEventShowEntity v2XEventShowEntity) {
|
||||||
try {
|
try {
|
||||||
if (v2XEventShowEntity == null) {
|
if (v2XEventShowEntity == null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user