Merge remote-tracking branch 'origin/dev' into qa_1.1.8_easy_mode
# Conflicts: # gradle.properties # modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/holder/V2XScenarioHistoryRoadEventVH.java
This commit is contained in:
@@ -16,6 +16,7 @@ import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.v2x.adapter.holder.V2XSurroundingDetailVH;
|
||||
import com.mogo.module.v2x.entity.panel.SurroundingConstruction;
|
||||
import com.mogo.module.v2x.listener.SurroundingDetailItemListener;
|
||||
import com.mogo.module.v2x.utils.RoadConditionUtils;
|
||||
import com.mogo.module.v2x.view.HeartLikeView;
|
||||
import com.mogo.module.v2x.view.HeartUnLikeView;
|
||||
@@ -39,10 +40,12 @@ public class V2XSurroundingDetailAdapter extends RecyclerView.Adapter<V2XSurroun
|
||||
private HeartLikeView mHeartLikeView;
|
||||
private HeartUnLikeView mUnHeartLikeView;
|
||||
|
||||
private SurroundingDetailItemListener mListener;
|
||||
|
||||
public V2XSurroundingDetailAdapter(Context context, List<MarkerExploreWay> list) {
|
||||
public V2XSurroundingDetailAdapter(Context context, List<MarkerExploreWay> list, SurroundingDetailItemListener listener) {
|
||||
mContext = context;
|
||||
markerExploreWays = list;
|
||||
mListener = listener;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -77,18 +80,19 @@ public class V2XSurroundingDetailAdapter extends RecyclerView.Adapter<V2XSurroun
|
||||
mAddressTv.setText(exploreWay.getAddr());
|
||||
mTimeTv.setText(DateTimeUtils.getTimeText(exploreWay.getGenerateTime(), DateTimeUtils.MM_Yue_dd_Ri_HH_mm));
|
||||
|
||||
Logger.d(V2XConst.MODULE_NAME, "exploreWay.isFabulous() = " + exploreWay.isFabulous());
|
||||
showView(exploreWay.isFabulous());
|
||||
|
||||
mHeartLikeView.setOnClickCallListener(v -> {
|
||||
Logger.d(V2XConst.MODULE_NAME, "反馈有用 position = " + position);
|
||||
roadReportTrue(exploreWay);
|
||||
showView(true);
|
||||
mListener.onItemClickListener(v, position, exploreWay);
|
||||
});
|
||||
|
||||
mUnHeartLikeView.setOnClickCallListener(v -> {
|
||||
Logger.d(V2XConst.MODULE_NAME, "反馈无用 position = " + position);
|
||||
roadReportErr(exploreWay);
|
||||
showView(true);
|
||||
mListener.onItemClickListener(v, position, exploreWay);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ public class V2XScenarioHistoryRoadEventVH extends V2XBaseViewHolder<V2XHistoryS
|
||||
mTagEventType.setText(EventTypeUtils.getPoiTypeStr(mExploreWay.getPoiType()));
|
||||
|
||||
try {
|
||||
mTvIllegalNum.setText(mExploreWay.getUserInfo().getUserName() + "的分享 :" +
|
||||
mTvIllegalNum.setText(mExploreWay.getUserInfo().getUserName() + "的分享 " +
|
||||
TimeUtils.millis2String(mOldScenarioData.getTriggerTime(), "MM月dd日 HH:mm"));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -32,6 +32,7 @@ import com.mogo.module.v2x.adapter.V2XEventPagerAdapter
|
||||
import com.mogo.module.v2x.adapter.V2XSurroundingDetailAdapter
|
||||
import com.mogo.module.v2x.entity.panel.BackRefreshInfo
|
||||
import com.mogo.module.v2x.entity.panel.SurroundingConstruction
|
||||
import com.mogo.module.v2x.listener.SurroundingDetailItemListener
|
||||
import com.mogo.module.v2x.presenter.EventPanelPresenter
|
||||
import com.mogo.module.v2x.utils.TrackUtils
|
||||
import com.mogo.module.v2x.view.V2XEventPanelHistoryCountView
|
||||
@@ -49,7 +50,7 @@ import org.greenrobot.eventbus.ThreadMode
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPresenter>() {
|
||||
class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPresenter>() , SurroundingDetailItemListener {
|
||||
|
||||
private val TAG = "EventPanelFragment"
|
||||
|
||||
@@ -267,10 +268,14 @@ class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPrese
|
||||
selectWithItem(item)
|
||||
}
|
||||
|
||||
override fun onItemClickListener(v: View?, position: Int, exploreWay: MarkerExploreWay?) {
|
||||
markerExploreWays[position].isFabulous = true
|
||||
mSurroundingDetailAdapter.notifyItemChanged(position)
|
||||
}
|
||||
|
||||
private fun initDetail() {
|
||||
mDetailRecyclerView!!.addItemDecoration(SpacesItemDecoration(resources.getDimension(R.dimen.share_item_padding).toInt()))
|
||||
mSurroundingDetailAdapter = V2XSurroundingDetailAdapter(activity, markerExploreWays)
|
||||
mSurroundingDetailAdapter = V2XSurroundingDetailAdapter(activity, markerExploreWays, this)
|
||||
mDetailRecyclerView!!.adapter = mSurroundingDetailAdapter
|
||||
val linearLayoutManager = LinearLayoutManager(activity, LinearLayoutManager.VERTICAL, false)
|
||||
mDetailRecyclerView!!.layoutManager = linearLayoutManager
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.mogo.module.v2x.listener;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.v2x.entity.panel.SurroundingConstruction;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description
|
||||
* @since 2020/8/10
|
||||
*/
|
||||
public interface SurroundingDetailItemListener {
|
||||
void onItemClickListener(View v, int position, MarkerExploreWay exploreWay);
|
||||
}
|
||||
Reference in New Issue
Block a user