[6.5.0] ui fu
This commit is contained in:
@@ -9,6 +9,7 @@ import com.mogo.eagle.core.function.api.map.roma.IMogoRoma
|
||||
import com.mogo.eagle.core.function.business.MapPointCloudSubscriber
|
||||
import com.mogo.eagle.core.function.business.SpeedLimitDataManager
|
||||
import com.mogo.eagle.core.function.business.ai.AiCloudIdentifyDataManager.Companion.aiCloudIdentifyDataManager
|
||||
import com.mogo.eagle.core.function.business.ai.RomaManager
|
||||
import com.mogo.eagle.core.function.business.ai.RomaManager.Companion.romaManager
|
||||
import com.mogo.eagle.core.function.business.identify.MapIdentifySubscriber
|
||||
import com.mogo.eagle.core.function.business.roadcross.RoadCrossCameraManager
|
||||
@@ -33,6 +34,7 @@ class MapBizProvider :IMoGoFunctionServerProvider, IMogoRoma {
|
||||
RoadCrossCameraManager.instance.init(context)
|
||||
SpeedLimitDataManager.getInstance().start()
|
||||
if(DeviceUtils.isLenovoModel() || DeviceUtils.isEB5Model()){ //todo 新增稳定设备类型需要添加,目的避免在nuc设备上使用此类功能
|
||||
romaManager.init()
|
||||
aiCloudIdentifyDataManager.initServer(AbsMogoApplication.getApp())
|
||||
}
|
||||
// 视角切换功能初始化,监听路口及停止线回调
|
||||
|
||||
@@ -77,7 +77,7 @@ class RomaManager() : IMoGoPlanningRottingListener,
|
||||
@Volatile
|
||||
private var inRange = false
|
||||
|
||||
init {
|
||||
fun init(){
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
CallerPlanningRottingListenerManager.addListener(TAG, this)
|
||||
CallerMapRomaListener.addListener(TAG, this)
|
||||
|
||||
@@ -101,6 +101,16 @@ class MapRoamView(context: Context?, attrs: AttributeSet?) : MogoMapView(context
|
||||
}
|
||||
}
|
||||
|
||||
fun updateLoc(){
|
||||
val latLng = CallerMapRoadListenerManager.getStopLineLatLng()
|
||||
latLng?.let {
|
||||
val loc = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
|
||||
loc.latitude = latLng.first
|
||||
loc.longitude = latLng.second
|
||||
setExtraGPSData(loc)
|
||||
}
|
||||
}
|
||||
|
||||
override fun response(requestStatus: Boolean, errorMsg: String?) {
|
||||
trace(TAG, mapOf("response" to requestStatus, "errorMsg" to (errorMsg ?: "")))
|
||||
}
|
||||
|
||||
@@ -110,13 +110,6 @@ class RoadCrossRoamView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {
|
||||
super.onSizeChanged(w, h, oldw, oldh)
|
||||
Log.i("emArrow","roadCrossRoamView anim width : $w , old w : $oldw" +
|
||||
"height : $h , old h : $oldh" +
|
||||
"marginTop : ${this.marginTop} , marginBottom : ${this.marginBottom}")
|
||||
}
|
||||
|
||||
override fun v2xEventVisible(v: Int, tag: String) {
|
||||
super.v2xEventVisible(v, tag)
|
||||
if (this.visibility == View.GONE) {
|
||||
@@ -127,7 +120,7 @@ class RoadCrossRoamView @JvmOverloads constructor(
|
||||
}
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
if (tag == V2X_EVENT_TAG && v == View.VISIBLE) {
|
||||
val anim = ValueAnimator.ofInt(height, 460)
|
||||
val anim = ValueAnimator.ofInt(height, 410)
|
||||
anim.duration = 500
|
||||
anim.addUpdateListener { animation ->
|
||||
val value = animation.animatedValue as Int
|
||||
@@ -135,7 +128,7 @@ class RoadCrossRoamView @JvmOverloads constructor(
|
||||
}
|
||||
anim.start()
|
||||
|
||||
val animMap = ValueAnimator.ofInt(160, 90)
|
||||
val animMap = ValueAnimator.ofInt(160, 84)
|
||||
animMap.duration = 500
|
||||
animMap.addUpdateListener { animation ->
|
||||
val value = animation.animatedValue as Int
|
||||
@@ -143,18 +136,27 @@ class RoadCrossRoamView @JvmOverloads constructor(
|
||||
(clScanningBg.layoutParams as? MarginLayoutParams)?.topMargin = value
|
||||
}
|
||||
animMap.start()
|
||||
|
||||
val animTxt = ValueAnimator.ofInt(32, 22)
|
||||
animTxt.duration = 500
|
||||
animTxt.addUpdateListener { animation ->
|
||||
val value = animation.animatedValue as Int
|
||||
(tvRoadRoamTitle.layoutParams as? MarginLayoutParams)?.topMargin = value
|
||||
}
|
||||
animTxt.start()
|
||||
|
||||
(tvRoadRoamTitle.layoutParams as? MarginLayoutParams)?.leftMargin = 0
|
||||
(mapRoamView.layoutParams as? MarginLayoutParams)?.height = 280
|
||||
(clScanningBg.layoutParams as? MarginLayoutParams)?.height = 280
|
||||
mapRoamView.requestLayout()
|
||||
clScanningBg.requestLayout()
|
||||
tvRoadRoamTitle.requestLayout()
|
||||
|
||||
mapRoamView.updateLoc()
|
||||
|
||||
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
|
||||
}
|
||||
@@ -197,9 +199,6 @@ class RoadCrossRoamView @JvmOverloads constructor(
|
||||
return
|
||||
}
|
||||
|
||||
Log.i("emArrow","roadCrossRoamView width : ${this.layoutParams.width} , " +
|
||||
"height : ${this.layoutParams.height} , " +
|
||||
"margin : ${this.marginTop} , ${this.marginBottom}")
|
||||
// 没有路线不做提示
|
||||
// if (CallerAutoPilotStatusListenerManager.getLineId() == 0L) {
|
||||
// return
|
||||
@@ -278,15 +277,12 @@ class RoadCrossRoamView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) && animScale) {
|
||||
setHeight(AutoSizeUtils.dp2px(context, 948f))
|
||||
setHeight(AutoSizeUtils.dp2px(context, 900f))
|
||||
(mapRoamView.layoutParams as? MarginLayoutParams)?.topMargin = 160
|
||||
(clScanningBg.layoutParams as? MarginLayoutParams)?.topMargin = 160
|
||||
(tvRoadRoamTitle.layoutParams as? MarginLayoutParams)?.leftMargin = 35
|
||||
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)
|
||||
|
||||
@@ -294,6 +290,7 @@ class RoadCrossRoamView @JvmOverloads constructor(
|
||||
(clScanningBg.layoutParams as? MarginLayoutParams)?.height = 300
|
||||
mapRoamView.requestLayout()
|
||||
clScanningBg.requestLayout()
|
||||
tvRoadRoamTitle.requestLayout()
|
||||
animScale = false
|
||||
}
|
||||
CallerHmiViewControlListenerManager.invokeV2XEvent(View.GONE, TAG)
|
||||
|
||||
@@ -13,12 +13,13 @@
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivRoadRoamClose"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/bg_close_nor_light"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
@@ -40,10 +41,9 @@
|
||||
android:id="@+id/ivZhiRoadRoamView"
|
||||
android:layout_width="@dimen/dp_84"
|
||||
android:layout_height="@dimen/dp_84"
|
||||
android:layout_marginStart="@dimen/dp_26"
|
||||
android:layout_marginTop="@dimen/dp_38"
|
||||
android:background="@drawable/anim_road_roam"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/mapRoamView"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
@@ -93,14 +93,12 @@
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/lvRoadCrossRoamTip"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="@dimen/dp_500"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginRight="@dimen/dp_30"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/mapRoamView"
|
||||
app:layout_constraintRight_toRightOf="@+id/mapRoamView"
|
||||
app:layout_constraintTop_toBottomOf="@id/mapRoamView" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/mapRoamView" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user