[6.5.0] fix ui problem
This commit is contained in:
@@ -110,7 +110,7 @@ class IdentifyOriginDataDrawer : Identify {
|
||||
mFilterTrafficData[uuid] = temp
|
||||
mMarkersCaches[uuid] = temp
|
||||
trafficDataUuidList.add(uuid)
|
||||
TrackerSourceFilterHelper.filterZombieMarker(data)
|
||||
// TrackerSourceFilterHelper.filterZombieMarker(data)
|
||||
}
|
||||
return mFilterTrafficData
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ public class TrackManager {
|
||||
cellIdCaches.forcePut(uuid, trackObj.getCellIdPos());
|
||||
mMarkersCaches.put(uuid, trackObj);
|
||||
trafficDataUuid.add(uuid);
|
||||
TrackerSourceFilterHelper.INSTANCE.filterZombieMarker(data);
|
||||
// TrackerSourceFilterHelper.INSTANCE.filterZombieMarker(data);
|
||||
}
|
||||
//Log.i("costTime","" + (System.currentTimeMillis() - cost));
|
||||
}
|
||||
|
||||
@@ -104,16 +104,19 @@ object TrackerSourceFilterHelper {
|
||||
}
|
||||
|
||||
//僵尸车
|
||||
// if (data.addAttribute == AdditionalAttribute.ATTR_ZOMBIE) {
|
||||
// color = "#7A8499FF"
|
||||
// if (FunctionBuildConfig.skinMode == 1) {
|
||||
// color = "#9BA8BCFF"
|
||||
// }
|
||||
// }
|
||||
if (data.addAttribute == MessagePad.AdditionalAttribute.ATTR_ZOMBIE) {
|
||||
color = "#7A8499FF"
|
||||
if (FunctionBuildConfig.skinMode == 1) {
|
||||
color = "#9BA8BCFF"
|
||||
}
|
||||
}
|
||||
|
||||
return color
|
||||
}
|
||||
|
||||
/**
|
||||
* native实现逻辑遗留问题,后续解决
|
||||
*/
|
||||
fun filterZombieMarker(data: TrackedObject){
|
||||
if (data.addAttribute == MessagePad.AdditionalAttribute.ATTR_ZOMBIE) {
|
||||
if (!cacheZombieMap.contains(data.uuid.toString())) {
|
||||
|
||||
@@ -35,7 +35,7 @@ public class MogoRouteOverlayManager implements
|
||||
private final IViewControlListener listener = new IViewControlListener() {
|
||||
|
||||
@Override
|
||||
public void v2xEventVisible(int v) {
|
||||
public void v2xEventVisible(int v, String tag) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.eagle.core.function.view
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
@@ -21,6 +22,12 @@ class RoadCrossRoamListAdapter(private val mContext: Context, private val lightM
|
||||
items.add("路口危险车辆分析")
|
||||
items.add("路口交通事故分析")
|
||||
items.add("路口行人碰撞分析")
|
||||
Log.i("emArrow","lightmode:$lightMode")
|
||||
if(lightMode){
|
||||
items.add("路口非机动车分析")
|
||||
items.add("路口灯态分析")
|
||||
Log.i("emArrow","day mode add, list size : ${items.size}")
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||
@@ -29,10 +36,12 @@ class RoadCrossRoamListAdapter(private val mContext: Context, private val lightM
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int {
|
||||
return items.size
|
||||
Log.i("emArrow","count mode: $lightMode")
|
||||
return if(lightMode) 6 else 4
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
Log.i("emArrow","onBindViewHolder item size: ${items.size} , count:${itemCount}")
|
||||
val item = items[position]
|
||||
if(lightMode){
|
||||
holder.textView.setTextColor(mContext.getColor(R.color.color_191A1C))
|
||||
|
||||
@@ -8,6 +8,7 @@ import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.os.Message
|
||||
import android.util.AttributeSet
|
||||
import android.util.TypedValue
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.animation.LinearInterpolator
|
||||
@@ -17,9 +18,9 @@ import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.V2X_EVENT_TAG
|
||||
import com.mogo.eagle.core.function.api.map.road.IMoGoMapRoadListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerV2nNioEventListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapIdentifyManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager
|
||||
@@ -35,8 +36,11 @@ import kotlinx.android.synthetic.main.view_road_cross_roam.view.ivCoverRoam
|
||||
import kotlinx.android.synthetic.main.view_road_cross_roam.view.ivRoadRoamClose
|
||||
import kotlinx.android.synthetic.main.view_road_cross_roam.view.lvRoadCrossRoamTip
|
||||
import kotlinx.android.synthetic.main.view_road_cross_roam.view.mapRoamView
|
||||
import kotlinx.android.synthetic.main.view_road_cross_roam_light.view.clScanningBg
|
||||
import kotlinx.android.synthetic.main.view_road_cross_roam_light.view.ivZhiRoadRoamSet
|
||||
import kotlinx.android.synthetic.main.view_road_cross_roam_light.view.ivZhiRoadRoamView
|
||||
import kotlinx.android.synthetic.main.view_road_cross_roam_light.view.tvRoadRoamTitle
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
|
||||
@@ -61,6 +65,7 @@ class RoadCrossRoamView @JvmOverloads constructor(
|
||||
private var animator: ObjectAnimator? = null
|
||||
private var rotationAnim: ObjectAnimator? = null
|
||||
private var lightMode = CallerSkinModeListenerManager.getMode() == 1
|
||||
private var animScale = false
|
||||
|
||||
private val handler = object : Handler(Looper.getMainLooper()) {
|
||||
override fun handleMessage(msg: Message) {
|
||||
@@ -78,7 +83,7 @@ class RoadCrossRoamView @JvmOverloads constructor(
|
||||
R.layout.view_road_cross_roam
|
||||
}
|
||||
LayoutInflater.from(context).inflate(res, this, true)
|
||||
lvRoadCrossRoamTip.layoutManager = LinearLayoutManager(context)
|
||||
lvRoadCrossRoamTip.layoutManager = NoScrollLayoutManager(context)
|
||||
lvRoadCrossRoamTip.addItemDecoration(object : RecyclerView.ItemDecoration() {
|
||||
override fun getItemOffsets(
|
||||
outRect: Rect,
|
||||
@@ -102,6 +107,51 @@ class RoadCrossRoamView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override fun v2xEventVisible(v: Int, tag: String) {
|
||||
super.v2xEventVisible(v, tag)
|
||||
if (this.visibility == View.GONE) {
|
||||
return
|
||||
}
|
||||
if (animScale) {
|
||||
return
|
||||
}
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
if (tag == V2X_EVENT_TAG && v == View.VISIBLE) {
|
||||
val anim = ValueAnimator.ofInt(height, 475)
|
||||
anim.duration = 500
|
||||
anim.addUpdateListener { animation ->
|
||||
val value = animation.animatedValue as Int
|
||||
setHeight(value)
|
||||
}
|
||||
anim.start()
|
||||
|
||||
val animMap = ValueAnimator.ofInt(160, 80)
|
||||
animMap.duration = 500
|
||||
animMap.addUpdateListener { animation ->
|
||||
val value = animation.animatedValue as Int
|
||||
(mapRoamView.layoutParams as? MarginLayoutParams)?.topMargin = value
|
||||
(clScanningBg.layoutParams as? MarginLayoutParams)?.topMargin = value
|
||||
}
|
||||
animMap.start()
|
||||
|
||||
lvRoadCrossRoamTip.visibility = View.GONE
|
||||
ivZhiRoadRoamSet.visibility = View.GONE
|
||||
ivZhiRoadRoamView.visibility = View.GONE
|
||||
tvRoadRoamTitle.setTextSize(
|
||||
TypedValue.COMPLEX_UNIT_PX,
|
||||
AutoSizeUtils.dp2px(context, 30f).toFloat()
|
||||
)
|
||||
tvRoadRoamTitle.text = "为您全面扫描潜在风险"
|
||||
animScale = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun setHeight(height: Int) {
|
||||
layoutParams.height = height
|
||||
requestLayout()
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerMapRoadListenerManager.addListener(TAG, this)
|
||||
@@ -130,7 +180,7 @@ class RoadCrossRoamView @JvmOverloads constructor(
|
||||
|
||||
private fun attachView() {
|
||||
// 没有路线不做提示
|
||||
if(CallerAutoPilotStatusListenerManager.getLineId() == 0L){
|
||||
if (CallerAutoPilotStatusListenerManager.getLineId() == 0L) {
|
||||
return
|
||||
}
|
||||
// 处于漫游模式下不做处理
|
||||
@@ -141,11 +191,11 @@ class RoadCrossRoamView @JvmOverloads constructor(
|
||||
return
|
||||
}
|
||||
// 首页被遮挡不做提示
|
||||
if(!CallerHmiViewControlListenerManager.getMainPageVisible()){
|
||||
if (!CallerHmiViewControlListenerManager.getMainPageVisible()) {
|
||||
CallerLogger.d("$M_MAP$TAG", "attachView return , mainPageVisible is false")
|
||||
return
|
||||
}
|
||||
CallerHmiViewControlListenerManager.invokeV2XEvent(TAG, View.VISIBLE)
|
||||
CallerHmiViewControlListenerManager.invokeV2XEvent(View.VISIBLE, TAG)
|
||||
bringToFront()
|
||||
CallerMapIdentifyManager.roam = Pair(TAG, true)
|
||||
this.visibility = View.VISIBLE
|
||||
@@ -194,7 +244,7 @@ class RoadCrossRoamView @JvmOverloads constructor(
|
||||
if (this.visibility == View.GONE) {
|
||||
return
|
||||
}
|
||||
if(handler.hasMessages(MSG_HIDE_VIEW)){
|
||||
if (handler.hasMessages(MSG_HIDE_VIEW)) {
|
||||
handler.removeMessages(MSG_HIDE_VIEW)
|
||||
}
|
||||
mapRoamView.closeRoam()
|
||||
@@ -205,7 +255,22 @@ class RoadCrossRoamView @JvmOverloads constructor(
|
||||
if (lightMode) {
|
||||
ivZhiRoadRoamView.clearAnimation()
|
||||
}
|
||||
CallerHmiViewControlListenerManager.invokeV2XEvent(TAG, View.GONE)
|
||||
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) && animScale) {
|
||||
setHeight(AutoSizeUtils.dp2px(context, 945f))
|
||||
(mapRoamView.layoutParams as? MarginLayoutParams)?.topMargin = 160
|
||||
(clScanningBg.layoutParams as? MarginLayoutParams)?.topMargin = 160
|
||||
lvRoadCrossRoamTip.visibility = View.VISIBLE
|
||||
ivZhiRoadRoamSet.visibility = View.VISIBLE
|
||||
tvRoadRoamTitle.setTextSize(
|
||||
TypedValue.COMPLEX_UNIT_PX,
|
||||
AutoSizeUtils.dp2px(context, 24f).toFloat()
|
||||
)
|
||||
ivZhiRoadRoamView.visibility = View.VISIBLE
|
||||
tvRoadRoamTitle.text = context.resources.getString(R.string.road_cross_roam_tip)
|
||||
animScale = false
|
||||
}
|
||||
CallerHmiViewControlListenerManager.invokeV2XEvent(View.GONE, TAG)
|
||||
this.visibility = View.GONE
|
||||
}
|
||||
|
||||
@@ -219,4 +284,13 @@ class RoadCrossRoamView @JvmOverloads constructor(
|
||||
CallerHmiViewControlListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
private class NoScrollLayoutManager(context: Context?) : LinearLayoutManager(context) {
|
||||
override fun canScrollVertically(): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun canScrollHorizontally(): Boolean {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,22 +3,22 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_30">
|
||||
android:layout_height="@dimen/dp_36">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvRoadItemTip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:textSize="@dimen/dp_22"
|
||||
android:textSize="@dimen/dp_26"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pbRoadItemTip"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_width="@dimen/dp_35"
|
||||
android:layout_height="@dimen/dp_35"
|
||||
android:progressDrawable="@drawable/icon_road_roam_progress"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
@@ -26,11 +26,11 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivRoadItemTip"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_width="@dimen/dp_35"
|
||||
android:layout_height="@dimen/dp_35"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/icon_road_roam_tip"
|
||||
android:visibility="gone"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clScanningBg"
|
||||
android:layout_width="@dimen/dp_540"
|
||||
android:layout_height="@dimen/dp_300"
|
||||
android:layout_marginTop="@dimen/dp_160"
|
||||
@@ -69,7 +70,7 @@
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/lvRoadCrossRoamTip"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_200"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginLeft="@dimen/dp_30"
|
||||
android:layout_marginRight="@dimen/dp_30"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:layout_marginTop="@dimen/dp_56"
|
||||
android:src="@drawable/bg_road_roam_anim_set"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
@@ -34,7 +34,7 @@
|
||||
android:layout_width="@dimen/dp_84"
|
||||
android:layout_height="@dimen/dp_84"
|
||||
android:layout_marginStart="@dimen/dp_24"
|
||||
android:layout_marginTop="@dimen/dp_24"
|
||||
android:layout_marginTop="@dimen/dp_38"
|
||||
android:background="@drawable/anim_road_roam"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
@@ -45,9 +45,10 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_24"
|
||||
android:layout_marginTop="@dimen/dp_32"
|
||||
android:lineSpacingExtra="@dimen/dp_10"
|
||||
android:text="@string/road_cross_roam_tip"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/color_131415"
|
||||
android:textSize="@dimen/dp_30"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivZhiRoadRoamView"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -64,6 +65,7 @@
|
||||
app:styleMode="MAP_STYLE_DAY_VR_TAXI" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clScanningBg"
|
||||
android:layout_width="@dimen/dp_540"
|
||||
android:layout_height="@dimen/dp_300"
|
||||
android:layout_marginStart="@dimen/dp_26"
|
||||
@@ -84,7 +86,7 @@
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/lvRoadCrossRoamTip"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_200"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginRight="@dimen/dp_30"
|
||||
|
||||
Reference in New Issue
Block a user