Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -25,9 +25,9 @@
|
||||
android:layout_width="@dimen/module_main_apps_fragment_container_width"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="@dimen/module_main_apps_fragment_container_padding"
|
||||
android:paddingRight="@dimen/module_main_apps_fragment_container_padding"
|
||||
android:paddingTop="@dimen/module_main_apps_fragment_container_paddingTop"
|
||||
android:paddingBottom="@dimen/module_main_apps_fragment_container_paddingTop"/>
|
||||
android:paddingRight="@dimen/module_main_apps_fragment_container_padding"
|
||||
android:paddingBottom="@dimen/module_main_apps_fragment_container_paddingTop" />
|
||||
|
||||
<!-- 左侧浮层,布局位置目前只考虑了1+16独立app情况 -->
|
||||
<FrameLayout
|
||||
@@ -42,8 +42,8 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/module_main_id_entrance_fragment_container_marginLeft"
|
||||
android:paddingLeft="@dimen/module_main_apps_fragment_container_padding"
|
||||
android:paddingRight="@dimen/module_main_apps_fragment_container_padding"
|
||||
android:paddingTop="@dimen/module_main_apps_fragment_container_paddingTop"
|
||||
android:paddingRight="@dimen/module_main_apps_fragment_container_padding"
|
||||
android:paddingBottom="@dimen/module_main_apps_fragment_container_paddingTop" />
|
||||
|
||||
<!-- 浮层-->
|
||||
@@ -58,15 +58,15 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/module_main_id_entrance_fragment_container_marginLeft"
|
||||
android:paddingLeft="@dimen/module_main_event_panel_fragment_paddingLeft"
|
||||
android:paddingRight="@dimen/module_main_event_panel_fragment_paddingRight"
|
||||
android:paddingTop="@dimen/module_main_event_panel_fragment_paddingTop"
|
||||
android:paddingRight="@dimen/module_main_event_panel_fragment_paddingRight"
|
||||
android:paddingBottom="@dimen/module_main_event_panel_fragment_paddingBottom" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_message_history_fragment_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/module_main_id_entrance_fragment_container_marginLeft"/>
|
||||
android:layout_marginLeft="@dimen/module_main_id_entrance_fragment_container_marginLeft" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_search_fragment"
|
||||
@@ -77,8 +77,8 @@
|
||||
android:id="@+id/module_main_id_cover_up"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:background="@drawable/main_bitmap_splash_bg"
|
||||
android:scaleType="centerCrop"
|
||||
android:visibility="visible" />
|
||||
|
||||
<FrameLayout
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<dimen name="module_event_fragment_container_padding">20px</dimen>
|
||||
<dimen name="module_main_apps_fragment_container_paddingTop">20px</dimen>
|
||||
|
||||
<dimen name="module_main_event_panel_fragment_paddingTop">15px</dimen>
|
||||
<dimen name="module_main_event_panel_fragment_paddingBottom">15px</dimen>
|
||||
<dimen name="module_main_event_panel_fragment_paddingLeft">15px</dimen>
|
||||
<dimen name="module_main_event_panel_fragment_paddingRight">15px</dimen>
|
||||
<dimen name="module_main_event_panel_fragment_paddingTop">18px</dimen>
|
||||
<dimen name="module_main_event_panel_fragment_paddingBottom">18px</dimen>
|
||||
<dimen name="module_main_event_panel_fragment_paddingLeft">18px</dimen>
|
||||
<dimen name="module_main_event_panel_fragment_paddingRight">18px</dimen>
|
||||
</resources>
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
<View
|
||||
android:id="@+id/viewLinEnd"
|
||||
android:layout_width="12px"
|
||||
android:layout_width="@dimen/dp_22"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginLeft="16px"
|
||||
android:background="@color/share_event_no_more_color"
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/module_common_icon_close_press_light" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/module_common_icon_close_light" android:state_pressed="false" />
|
||||
<item android:drawable="@drawable/module_common_icon_close_light" />
|
||||
</selector>
|
||||
Reference in New Issue
Block a user