[2.15.0] roma change and track color change
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android" tools:ignore="MissingDefaultResource">
|
||||
<item android:drawable="@drawable/iv_roma_bus_passenger_press_bg" android:state_focused="true" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/iv_roma_bus_passenger_press_bg" android:state_focused="false" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/iv_roma_bus_passenger_press_bg" android:state_selected="true" />
|
||||
<item android:drawable="@drawable/iv_roma_bus_passenger_press_bg" android:state_focused="true" />
|
||||
<item android:drawable="@drawable/iv_roma_bus_passenger_bg" />
|
||||
</selector>
|
||||
@@ -62,7 +62,9 @@
|
||||
android:layout_height="@dimen/dp_121"
|
||||
android:layout_marginRight="@dimen/dp_751"
|
||||
android:layout_marginBottom="@dimen/dp_59"
|
||||
android:background="@drawable/iv_roma_bus_passenger_bg"
|
||||
android:background="@drawable/roma_bus_p_bg_selector"
|
||||
app:roma_close="@drawable/roma_bus_p_bg_selector"
|
||||
app:roma_open="@drawable/iv_roma_bus_passenger_press_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android" tools:ignore="MissingDefaultResource">
|
||||
<item android:drawable="@drawable/iv_roma_taxi_passenger_press_bg" android:state_focused="true" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/iv_roma_taxi_passenger_press_bg" android:state_focused="false" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/iv_roma_taxi_passenger_press_bg" android:state_selected="true" />
|
||||
<item android:drawable="@drawable/iv_roma_taxi_passenger_press_bg" android:state_focused="true" />
|
||||
<item android:drawable="@drawable/iv_roma_passenger_bg" />
|
||||
</selector>
|
||||
@@ -59,8 +59,10 @@
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginStart="@dimen/dp_557"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:background="@drawable/iv_roma_passenger_bg"
|
||||
android:background="@drawable/roma_taxi_p_bg_selector"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:roma_close="@drawable/roma_taxi_p_bg_selector"
|
||||
app:roma_open="@drawable/iv_roma_taxi_passenger_press_bg"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
|
||||
<ImageView
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.content.res.TypedArray
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -23,8 +24,15 @@ class RomaPassengerView @JvmOverloads constructor(
|
||||
@Volatile
|
||||
private var romaMode = false
|
||||
|
||||
private val openRes: Int
|
||||
private val normalRes: Int
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_roma_passenger_bg, this, true)
|
||||
val a = context.obtainStyledAttributes(attrs, R.styleable.RomaPassengerView, defStyleAttr, 0)
|
||||
openRes = a.getResourceId(R.styleable.RomaPassengerView_roma_open,0)
|
||||
normalRes = a.getResourceId(R.styleable.RomaPassengerView_roma_close,0)
|
||||
a.recycle()
|
||||
setOnClickListener {
|
||||
romaMode = !romaMode
|
||||
romaTrigger(romaMode)
|
||||
@@ -42,9 +50,15 @@ class RomaPassengerView @JvmOverloads constructor(
|
||||
when (String(byteArray)) {
|
||||
"0" -> {
|
||||
romaMode = true
|
||||
if(openRes != 0){
|
||||
setBackgroundResource(openRes)
|
||||
}
|
||||
}
|
||||
"1" -> {
|
||||
romaMode = false
|
||||
if(normalRes != 0){
|
||||
setBackgroundResource(normalRes)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,4 +80,8 @@
|
||||
<attr name="pnc_size" format="reference"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="RomaPassengerView">
|
||||
<attr name="roma_open" format="reference"/>
|
||||
<attr name="roma_close" format="reference"/>
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
@@ -65,10 +65,10 @@ object TrackerSourceFilterHelper {
|
||||
|
||||
//僵尸车
|
||||
if(data.addAttribute == AdditionalAttribute.ATTR_ZOMBIE){
|
||||
color = "#AD7488FF"
|
||||
color = "#7A8499FF"
|
||||
CallerMapUIServiceManager.getMapUIController()?.let {
|
||||
if(it.isDayMode){
|
||||
color = "#AE7887FF"
|
||||
color = "#9BA8BCFF"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ object WarningHelper {
|
||||
mMarkersCaches[trackId] ?: return@Consumer
|
||||
if (planningObj.type == 0) { //0是leading障碍物,障碍物车身红色提示
|
||||
pncWarningBeautyTrafficData[trackId] = PlanningTrack(
|
||||
"#FF0000FF",
|
||||
"#D65D5AFF",
|
||||
getCurWgs84SatelliteTime()
|
||||
)
|
||||
} else if (planningObj.type == 1) { //1是避障和择机的障碍物,障碍物车身黄色提示
|
||||
|
||||
@@ -115,6 +115,8 @@ public class AMapWrapper implements IMogoMap {
|
||||
}
|
||||
}
|
||||
|
||||
BatchMarkerOptions batchMarkerOptions = new BatchMarkerOptions();
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
@Override
|
||||
public void updateBatchMarkerPosition(HashMap<String, MessagePad.TrackedObject> optionsArrayList) {
|
||||
@@ -135,18 +137,17 @@ public class AMapWrapper implements IMogoMap {
|
||||
return;
|
||||
}
|
||||
long time = markerOptionsArrayList.get(0).getTime();
|
||||
ArrayList list = new ArrayList(markerOptionsArrayList);
|
||||
BatchMarkerOptions batchMarkerOptions = new BatchMarkerOptions();
|
||||
batchMarkerOptions.list = list;
|
||||
batchMarkerOptions.list = markerOptionsArrayList;
|
||||
batchMarkerOptions.delayStrategy = false;
|
||||
batchMarkerOptions.ruleAngle = FunctionBuildConfig.isBeautyMode ? 8.0f : 0f;
|
||||
batchMarkerOptions.controlIcon = 1;
|
||||
batchMarkerOptions.duration = (int) time;
|
||||
batchMarkerOptions.deleteRule = 1;
|
||||
MarkerHelper.INSTANCE.updateBatchMarkerPositon(batchMarkerOptions);
|
||||
// MarkerHelper.INSTANCE.updateBatchMarkerPositon(markerOptionsArrayList, false, FunctionBuildConfig.isBeautyMode ? 8.0f : 0f, 1, time, 1);
|
||||
}
|
||||
|
||||
BatchMarkerOptions aiBatchMarkerOptions = new BatchMarkerOptions();
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
@Override
|
||||
public void updateBatchAiMarkerPosition(HashMap<String, SocketDownData.CloudRoadDataProto> optionsArrayList) {
|
||||
@@ -162,7 +163,13 @@ public class AMapWrapper implements IMogoMap {
|
||||
});
|
||||
long time = markerOptionsArrayList.get(0).getTime();
|
||||
// 最后一个参数,是否管理锚点的删除
|
||||
MarkerHelper.INSTANCE.updateBatchMarkerPositon(markerOptionsArrayList, false, FunctionBuildConfig.isBeautyMode ? 8.0f : 0f, 1, time, 1);
|
||||
aiBatchMarkerOptions.list = markerOptionsArrayList;
|
||||
aiBatchMarkerOptions.delayStrategy = false;
|
||||
aiBatchMarkerOptions.ruleAngle = FunctionBuildConfig.isBeautyMode ? 8.0f : 0f;
|
||||
aiBatchMarkerOptions.controlIcon = 1;
|
||||
aiBatchMarkerOptions.duration = (int) time;
|
||||
aiBatchMarkerOptions.deleteRule = 1;
|
||||
MarkerHelper.INSTANCE.updateBatchMarkerPositon(aiBatchMarkerOptions);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user