Merge branch 'dev' into qa_1.1.8

This commit is contained in:
董宏宇
2020-12-01 15:19:30 +08:00
17 changed files with 74 additions and 12 deletions

View File

@@ -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);
});
}

View File

@@ -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

View File

@@ -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);
}

View File

@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:angle="45"
android:endColor="#E6E6E6"
android:startColor="#DDDDDD" />
<corners android:radius="@dimen/dp_16" />
</shape>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/module_callchatting_user_pop_call_bg_normal_light" android:state_pressed="false" />
<item android:drawable="@drawable/module_callchatting_user_pop_call_bg_pressed_light" android:state_pressed="true" />
</selector>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/dp_16" />
<gradient
android:angle="0"
android:endColor="#E6E6E6"
android:startColor="#DDDDDD" />
</shape>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/dp_16" />
<gradient
android:angle="0"
android:endColor="#CBCBCB"
android:startColor="#C0C0C0" />
</shape>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/dp_30" />
<solid android:color="#F5F5F5" />
</shape>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/module_carchatting_team_fragment_close_normal_light" android:state_pressed="false" />
<item android:drawable="@drawable/module_carchatting_team_fragment_close_pressed_light" android:state_pressed="true" />
</selector>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/dp_30" />
<gradient
android:angle="180"
android:endColor="#F5F5F5"
android:startColor="#FFFFFF" />
</shape>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/dp_23" />
<solid android:color="#DADADA" />
</shape>