Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -28,6 +28,7 @@ import com.mogo.module.v2x.scenario.scene.road.V2XRoadVideoWindow;
|
||||
import com.mogo.module.v2x.utils.ChartingUtil;
|
||||
import com.mogo.module.v2x.utils.EventTypeUtils;
|
||||
import com.mogo.module.v2x.utils.SpanUtils;
|
||||
import com.mogo.module.v2x.view.HeartLikeView;
|
||||
import com.mogo.module.v2x.voice.V2XVoiceCallbackListener;
|
||||
import com.mogo.module.v2x.voice.V2XVoiceConstants;
|
||||
import com.mogo.module.v2x.voice.V2XVoiceManager;
|
||||
@@ -69,7 +70,7 @@ public class V2XRoadEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
private ImageView ivEventCallChart;
|
||||
private ImageView ivEventReportTrue;
|
||||
private ImageView ivEventReportErr;
|
||||
private ImageView ivEventZan;
|
||||
private HeartLikeView ivEventZan;
|
||||
|
||||
|
||||
// 上传事件的用户信息
|
||||
@@ -273,7 +274,8 @@ public class V2XRoadEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
ivEventCallChart.setVisibility(GONE);
|
||||
triggerCallChart(mNoveltyInfo);
|
||||
});
|
||||
ivEventZan.setOnClickListener(v -> {
|
||||
|
||||
ivEventZan.setOnClickCallListener(v -> {
|
||||
triggerZan(mNoveltyInfo);
|
||||
});
|
||||
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.mogo.module.v2x.utils;
|
||||
|
||||
import com.mogo.module.common.entity.V2XPoiTypeEnum;
|
||||
import com.mogo.module.common.marker.PoiWrapper;
|
||||
import com.mogo.module.common.utils.CloudPoiManager;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.voice.V2XVoiceConstants;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
/**
|
||||
* @ProjectName: MoGoModulSafeDriving
|
||||
@@ -18,6 +21,13 @@ import com.mogo.module.v2x.voice.V2XVoiceConstants;
|
||||
*/
|
||||
public class EventTypeUtils {
|
||||
public static String getPoiTypeStr(String poiType) {
|
||||
// 先获取网络配置的poi对应的名称
|
||||
PoiWrapper wrapper = CloudPoiManager.getInstance().getWrapperByPoiType(poiType);
|
||||
if (wrapper != null) {
|
||||
Logger.d("EventTypeUtils", "从配置表中拿到了相关数据: " + wrapper.getTitle());
|
||||
return wrapper.getTitle();
|
||||
}
|
||||
// 如果获取不到,那么就用本地默认的
|
||||
String str = "其它道路事件";
|
||||
switch (poiType) {
|
||||
// 停车场
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
@@ -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/v2x_event_icon_zan" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/v2x_icon_zan1" android:state_pressed="false" /> />
|
||||
</selector>
|
||||
@@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="false">
|
||||
<shape>
|
||||
<corners android:radius="@dimen/dp_180" />
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#3F4057"
|
||||
android:startColor="#3F4057" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_pressed="true">
|
||||
<shape>
|
||||
<corners android:radius="@dimen/dp_180" />
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#3F4057"
|
||||
android:startColor="#3F4057" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -192,17 +192,17 @@
|
||||
app:layout_goneMarginLeft="@dimen/dp_10"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
<com.mogo.module.v2x.view.HeartLikeView
|
||||
android:id="@+id/ivEventZan"
|
||||
android:layout_width="@dimen/module_v2x_event_button_size_detail"
|
||||
android:layout_height="@dimen/module_v2x_event_button_size_detail"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/dp_15"
|
||||
android:src="@drawable/v2x_event_icon_zan"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ivEventLive"
|
||||
app:layout_constraintStart_toEndOf="@id/ivEventEventNav"
|
||||
app:layout_goneMarginLeft="@dimen/dp_10"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Reference in New Issue
Block a user