diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/V2XSurroundingDetailAdapter.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/V2XSurroundingDetailAdapter.java index 62431f4d62..b7a6665727 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/V2XSurroundingDetailAdapter.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/V2XSurroundingDetailAdapter.java @@ -6,15 +6,21 @@ import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; + import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import com.mogo.module.common.entity.MarkerExploreWay; import com.mogo.module.common.entity.MarkerPoiTypeEnum; 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.utils.RoadConditionUtils; +import com.mogo.module.v2x.view.HeartLikeView; +import com.mogo.module.v2x.view.HeartUnLikeView; import com.mogo.utils.DateTimeUtils; +import com.mogo.utils.logger.Logger; import java.util.List; @@ -26,10 +32,12 @@ import java.util.List; public class V2XSurroundingDetailAdapter extends RecyclerView.Adapter { private List markerExploreWays; private Context mContext; - private ImageView mTypeImageView; private TextView mTypeTv; private TextView mAddressTv; + private TextView mUserNameTv; private TextView mTimeTv; + private HeartLikeView mHeartLikeView; + private HeartUnLikeView mUnHeartLikeView; public V2XSurroundingDetailAdapter(Context context, List list) { @@ -57,18 +65,52 @@ public class V2XSurroundingDetailAdapter extends RecyclerView.Adapter { + Logger.d(V2XConst.MODULE_NAME, "反馈有用"); + roadReportTrue(exploreWay); + }); + + mUnHeartLikeView.setOnClickCallListener(v -> { + Logger.d(V2XConst.MODULE_NAME, "反馈无用"); + roadReportErr(exploreWay); + }); } + /** + * 反馈路况正确 + */ + private void roadReportTrue(MarkerExploreWay exploreWay) { + if (exploreWay != null) { + RoadConditionUtils.sendShareReceiverInfo( + exploreWay.getInfoId(), + exploreWay.getPoiType(), + 2); + } + } + + /** + * 反馈路况错误 + */ + private void roadReportErr(MarkerExploreWay exploreWay) { + if (exploreWay != null) { + RoadConditionUtils.sendShareReceiverInfo( + exploreWay.getInfoId(), + exploreWay.getPoiType(), + 3); + } + } @Override public int getItemCount() { @@ -113,4 +155,6 @@ public class V2XSurroundingDetailAdapter extends RecyclerView.Adapter + android:layout_width="43px" + android:layout_height="43px"/> + android:textSize="18px" /> - diff --git a/modules/mogo-module-v2x/src/main/res/layout/module_v2x_event_surrounding_detail_item.xml b/modules/mogo-module-v2x/src/main/res/layout/module_v2x_event_surrounding_detail_item.xml index 075ce59f72..3753401c25 100644 --- a/modules/mogo-module-v2x/src/main/res/layout/module_v2x_event_surrounding_detail_item.xml +++ b/modules/mogo-module-v2x/src/main/res/layout/module_v2x_event_surrounding_detail_item.xml @@ -1,53 +1,89 @@ - + android:layout_marginTop="@dimen/dp_24" + android:layout_marginRight="@dimen/dp_30" + android:ellipsize="end" + android:maxLines="1" + android:textColor="@color/v2x_FFF_333" + android:textSize="18px" + android:textStyle="bold" + app:layout_constraintEnd_toStartOf="@+id/surrounding_road_like" + app:layout_constraintStart_toStartOf="@id/surrounding_road_type" + app:layout_constraintTop_toTopOf="parent" + tools:text="小黄庄北街与北三环辅路交叉口小黄庄北街与北三环辅路交叉口" /> + android:alpha="0.6" + android:textColor="@color/v2x_FFF_666" + android:textSize="16px" + android:layout_marginStart="@dimen/dp_36" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/surrounding_road_type_address" + tools:text="赵云" /> - \ No newline at end of file + android:textSize="16px" + android:layout_marginStart="@dimen/dp_80" + app:layout_constraintStart_toStartOf="@+id/surrounding_username" + app:layout_constraintTop_toBottomOf="@+id/surrounding_road_type_address" + tools:text="2020-1-12" /> + + + + + + + + +