Merge branch 'dev_robotaxi-d_240912_6.7.0' of gitlab.zhidaoauto.com:SCA/L4HA/AndroidApp/MoGoEagleEye into dev_robotaxi-d_240912_6.7.0
@@ -2,15 +2,19 @@ package com.mogo.och.common.module.wigets.map.orderstatus
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.RelativeLayout
|
||||
import androidx.appcompat.widget.AppCompatImageView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.lifecycle.findViewTreeViewModelStoreOwner
|
||||
import com.mogo.och.common.module.R
|
||||
import kotlinx.android.synthetic.main.common_order_status_view.view.iv_order_status
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class OrderStatusView : AppCompatImageView, OrderStatusViewModel.IVisualCallback {
|
||||
class OrderStatusView : RelativeLayout, OrderStatusViewModel.IVisualCallback {
|
||||
|
||||
private val TAG = "VisualView"
|
||||
|
||||
@@ -25,7 +29,7 @@ class OrderStatusView : AppCompatImageView, OrderStatusViewModel.IVisualCallback
|
||||
)
|
||||
|
||||
private fun initView() {
|
||||
setImageResource(R.drawable.common_status_unorder)
|
||||
LayoutInflater.from(context).inflate(R.layout.common_order_status_view, this, true)
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
@@ -48,8 +52,20 @@ class OrderStatusView : AppCompatImageView, OrderStatusViewModel.IVisualCallback
|
||||
}
|
||||
}
|
||||
|
||||
override fun setImageViewResource(name: Int) {
|
||||
setImageResource(name)
|
||||
override fun setImageViewResource(name: Int,ordering:Boolean) {
|
||||
iv_order_status.setImageResource(name)
|
||||
if (iv_order_status.layoutParams is RelativeLayout.LayoutParams) {
|
||||
val temp = iv_order_status.layoutParams as RelativeLayout.LayoutParams
|
||||
temp.removeRule(RelativeLayout.ALIGN_PARENT_START)
|
||||
temp.addRule(ALIGN_PARENT_END)
|
||||
iv_order_status.layoutParams = temp
|
||||
}else{
|
||||
val temp = iv_order_status.layoutParams as RelativeLayout.LayoutParams
|
||||
temp.removeRule(RelativeLayout.ALIGN_PARENT_END)
|
||||
temp.addRule(ALIGN_PARENT_START)
|
||||
iv_order_status.layoutParams = temp
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -32,16 +32,17 @@ class OrderStatusViewModel : ViewModel(), ILoginCallback {
|
||||
override fun onOpenOrderStatusEnumChange(businessEnum: OpenOrderStatusEnum?) {
|
||||
UiThreadHandler.post({
|
||||
if (LoginStatusManager.isOpenOrderType()) {
|
||||
this.viewCallback?.setImageViewResource(R.drawable.common_status_ordinging)
|
||||
this.viewCallback?.setImageViewResource(R.drawable.common_order_status,true)
|
||||
} else {
|
||||
this.viewCallback?.setImageViewResource(R.drawable.common_status_unorder)
|
||||
this.viewCallback?.setImageViewResource(R.drawable.common_unorder_status,false)
|
||||
}
|
||||
|
||||
}, UiThreadHandler.MODE.QUEUE)
|
||||
}
|
||||
|
||||
|
||||
interface IVisualCallback {
|
||||
fun setImageViewResource(@DrawableRes name: Int)
|
||||
fun setImageViewResource(@DrawableRes name: Int,ordering:Boolean)
|
||||
|
||||
}
|
||||
}
|
||||
BIN
OCH/common/common/src/main/res/drawable-nodpi/common_order_status.png
Executable file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
OCH/common/common/src/main/res/drawable-nodpi/common_order_status_bg.png
Executable file
|
After Width: | Height: | Size: 394 B |
BIN
OCH/common/common/src/main/res/drawable-nodpi/common_unorder_status.png
Executable file
|
After Width: | Height: | Size: 925 B |
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:background="@color/acc_default_txt_color"
|
||||
android:layout_width="@dimen/dp_118"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
tools:parentTag="android.widget.RelativeLayout">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_118"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/common_order_status_bg"
|
||||
/>
|
||||
<ImageView
|
||||
android:id="@+id/iv_order_status"
|
||||
android:layout_width="@dimen/dp_80"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:layout_alignParentStart="true"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/common_unorder_status"
|
||||
/>
|
||||
</merge>
|
||||
@@ -4,8 +4,10 @@ import android.content.Context
|
||||
import android.view.View
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.och.common.module.biz.provider.CommonService
|
||||
import com.mogo.och.common.module.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.biz.provider.CommonServiceImpl
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics
|
||||
@@ -46,9 +48,20 @@ class TaxiUnmannedDriverProvider : CommonServiceImpl() {
|
||||
}
|
||||
|
||||
override fun createOchBusinessView(context: Context?): View? {
|
||||
CallerLogger.d(SceneConstant.M_TAXI + tag, "createOchBusinessView")
|
||||
return context?.let {
|
||||
SwitchBizView(it)
|
||||
}
|
||||
}
|
||||
|
||||
companion object{
|
||||
fun getFragmentInfo():Fragment?{
|
||||
(ARouter.getInstance().build(OchCommonConst.TAXI_UNMANNED_DRIVER)
|
||||
.navigation() as? CommonService)?.apply {
|
||||
return getFragment()
|
||||
}
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,13 +3,21 @@ package com.mogo.och.unmanned.taxi.ui.bizswitch
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.lifecycle.findViewTreeViewModelStoreOwner
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.common.module.utils.FlowBus
|
||||
import com.mogo.och.common.module.utils.ResourcesUtils
|
||||
import com.mogo.och.common.module.wigets.WindowRelativeLayout
|
||||
import com.mogo.och.unmanned.taxi.R
|
||||
import com.mogo.och.unmanned.taxi.TaxiUnmannedDriverProvider
|
||||
import com.mogo.och.unmanned.taxi.constant.TaxiDriverEventConst
|
||||
import kotlinx.android.synthetic.main.unmanned_switch_biz.view.loading_biz
|
||||
|
||||
class SwitchBizView: WindowRelativeLayout, SwtichBizeModel.SwtichLineViewCallback {
|
||||
@@ -30,16 +38,25 @@ class SwitchBizView: WindowRelativeLayout, SwtichBizeModel.SwtichLineViewCallbac
|
||||
|
||||
private var viewModel: SwtichBizeModel?=null
|
||||
|
||||
private var fragment: LifecycleOwner?=null
|
||||
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.unmanned_switch_biz, this, true)
|
||||
initView()
|
||||
initEventBus()
|
||||
}
|
||||
|
||||
private fun initView(){
|
||||
fragment = TaxiUnmannedDriverProvider.getFragmentInfo()
|
||||
loading_biz.setEmptyText(ResourcesUtils.getString(R.string.common_biz_loading))
|
||||
}
|
||||
|
||||
private fun initEventBus() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
viewModel = findViewTreeViewModelStoreOwner()?.let {
|
||||
@@ -54,48 +71,6 @@ class SwitchBizView: WindowRelativeLayout, SwtichBizeModel.SwtichLineViewCallbac
|
||||
override fun showLoadingView(){
|
||||
startLoading = System.currentTimeMillis()
|
||||
loading_biz.visibility = GONE
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 初始化数据
|
||||
*/
|
||||
override fun loadLineData() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 展示选择任务页面
|
||||
override fun showSwitchTaskInfo() {
|
||||
val endLoading = System.currentTimeMillis()
|
||||
|
||||
val dex = (100-(endLoading - startLoading)).takeIf { it>=0 }?:0
|
||||
CallerLogger.d(TAG,"展示任务 lading 展示了 ${dex}毫秒")
|
||||
|
||||
ThreadUtils.runOnUiThreadDelayed({
|
||||
loading_biz.visibility = GONE
|
||||
},dex,ThreadUtils.MODE.QUEUE)
|
||||
}
|
||||
|
||||
// 展示选择线路页面
|
||||
override fun showSwtichLineView() {
|
||||
val endLoading = System.currentTimeMillis()
|
||||
val dex = (100-(endLoading - startLoading)).takeIf { it>=0 }?:0
|
||||
CallerLogger.d(TAG,"展示线路 lading 展示了 ${dex}毫秒")
|
||||
ThreadUtils.runOnUiThreadDelayed({
|
||||
loading_biz.visibility = GONE
|
||||
},dex,ThreadUtils.MODE.QUEUE)
|
||||
|
||||
}
|
||||
// 展示正在进行的任务
|
||||
override fun loadRunningTask() {
|
||||
val endLoading = System.currentTimeMillis()
|
||||
val dex = (100-(endLoading - startLoading)).takeIf { it>=0 }?:0
|
||||
CallerLogger.d(TAG,"展示运行中任务 lading 展示了 ${dex}毫秒")
|
||||
ThreadUtils.runOnUiThreadDelayed({
|
||||
loading_biz.visibility = GONE
|
||||
},dex,ThreadUtils.MODE.QUEUE)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.och.unmanned.taxi.ui.bizswitch
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
import com.mogo.och.unmanned.taxi.ui.task.TaxiTaskModel
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
@@ -18,17 +19,17 @@ class SwtichBizeModel : ViewModel() {
|
||||
|
||||
}
|
||||
|
||||
fun changeOperationStatus(){
|
||||
TaxiTaskModel.updateCarServingStatus()
|
||||
}
|
||||
|
||||
fun setDistanceCallback(viewCallback: SwtichLineViewCallback) {
|
||||
this.viewCallback = viewCallback
|
||||
this.viewCallback?.showLoadingView()
|
||||
}
|
||||
|
||||
interface SwtichLineViewCallback {
|
||||
fun showSwtichLineView()
|
||||
fun showLoadingView()
|
||||
fun showSwitchTaskInfo()
|
||||
fun loadLineData()
|
||||
fun loadRunningTask()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.mogo.och.unmanned.taxi.ui.task
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description BadCase录包管理页面
|
||||
* @since: 2022/12/15
|
||||
*/
|
||||
class ItinerarySwitchModel : ViewModel() {
|
||||
|
||||
private val TAG = ItinerarySwitchModel::class.java.simpleName
|
||||
|
||||
private var viewCallback: SwtichLineViewCallback? = null
|
||||
|
||||
|
||||
override fun onCleared() {
|
||||
|
||||
}
|
||||
|
||||
fun changeOperationStatus(){
|
||||
TaxiTaskModel.updateCarServingStatus()
|
||||
}
|
||||
|
||||
fun setDistanceCallback(viewCallback: SwtichLineViewCallback) {
|
||||
this.viewCallback = viewCallback
|
||||
}
|
||||
|
||||
interface SwtichLineViewCallback {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
package com.mogo.och.unmanned.taxi.ui.task
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.lifecycle.findViewTreeViewModelStoreOwner
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.common.module.utils.FlowBus
|
||||
import com.mogo.och.common.module.utils.ResourcesUtils
|
||||
import com.mogo.och.unmanned.taxi.R
|
||||
import com.mogo.och.unmanned.taxi.TaxiUnmannedDriverProvider
|
||||
import com.mogo.och.unmanned.taxi.constant.TaxiDriverEventConst
|
||||
import com.mogo.och.unmanned.taxi.wigets.TaxiSelectViewGroup
|
||||
import kotlinx.android.synthetic.main.unmanned_switch_itinerary.view.currentItinerary
|
||||
import kotlinx.android.synthetic.main.unmanned_switch_itinerary.view.nextItinerary
|
||||
import kotlinx.android.synthetic.main.unmanned_switch_itinerary.view.order_operation_change
|
||||
import kotlinx.android.synthetic.main.unmanned_switch_itinerary.view.taxiServerSelector
|
||||
|
||||
class ItinerarySwitchView: ConstraintLayout, ItinerarySwitchModel.SwtichLineViewCallback {
|
||||
|
||||
|
||||
constructor(context: Context) : super(context)
|
||||
|
||||
constructor(context: Context, attributeSet: AttributeSet) : super(context, attributeSet)
|
||||
|
||||
constructor(context: Context, attributeSet: AttributeSet, defStyleAttr: Int) : super(context, attributeSet, defStyleAttr)
|
||||
|
||||
constructor(context: Context, attributeSet: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attributeSet, defStyleAttr, defStyleRes)
|
||||
|
||||
|
||||
companion object {
|
||||
const val TAG = "SwitchBizView"
|
||||
}
|
||||
|
||||
private var viewModel: ItinerarySwitchModel?=null
|
||||
|
||||
private var fragment: LifecycleOwner?=null
|
||||
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.unmanned_switch_itinerary, this, true)
|
||||
initView()
|
||||
initEventBus()
|
||||
}
|
||||
|
||||
private fun initView(){
|
||||
fragment = TaxiUnmannedDriverProvider.getFragmentInfo()
|
||||
order_operation_change.onClick {
|
||||
if (MogoStatusManager.getInstance().isTaxiUnmanedDriverLineRoutingVerifyMode) {
|
||||
ToastUtils.showLong("退出验证模式后再接单吧")
|
||||
return@onClick
|
||||
}
|
||||
viewModel?.changeOperationStatus()
|
||||
}
|
||||
taxiServerSelector.checkChangeListener = object : TaxiSelectViewGroup.CheckChangeListener{
|
||||
override fun changeCheck(newCheck: TaxiSelectViewGroup.ServerType?) {
|
||||
when (newCheck) {
|
||||
TaxiSelectViewGroup.ServerType.currentItinerary -> {
|
||||
currentItinerary.visibility = View.VISIBLE
|
||||
nextItinerary.visibility = View.GONE
|
||||
}
|
||||
TaxiSelectViewGroup.ServerType.nextItinerary -> {
|
||||
currentItinerary.visibility = View.GONE
|
||||
nextItinerary.visibility = View.VISIBLE
|
||||
}
|
||||
else ->{
|
||||
currentItinerary.visibility = View.GONE
|
||||
nextItinerary.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private fun initEventBus() {
|
||||
fragment?.let {
|
||||
FlowBus.with<Boolean>(TaxiDriverEventConst.TabFragmentEvent.EVENT_TYPE_SHOW_RED_POINT)
|
||||
.register(it) { show ->
|
||||
taxiServerSelector.setNextItineraryRedBagVisable( if (show) View.VISIBLE else View.GONE)
|
||||
}
|
||||
// FlowBus.with<QueryCurrentTaskRespBean.Result?>(TaxiDriverEventConst.TabFragmentEvent.EVENT_TYPE_TASK_WITH_ORDER_CHANGED)
|
||||
// .register(it) { taskWithOrder ->
|
||||
// nextTaskFragment?.onTaskDataChanged(taskWithOrder)
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
viewModel = findViewTreeViewModelStoreOwner()?.let {
|
||||
ViewModelProvider(it).get(ItinerarySwitchModel::class.java)
|
||||
}
|
||||
viewModel?.setDistanceCallback(this)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.mogo.och.unmanned.taxi.ui.itinerarycurrent
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description BadCase录包管理页面
|
||||
* @since: 2022/12/15
|
||||
*/
|
||||
class ItineraryCurrentModel : ViewModel() {
|
||||
|
||||
private val TAG = ItineraryCurrentModel::class.java.simpleName
|
||||
|
||||
private var viewCallback: SwtichLineViewCallback? = null
|
||||
|
||||
|
||||
override fun onCleared() {
|
||||
|
||||
}
|
||||
|
||||
fun setDistanceCallback(viewCallback: SwtichLineViewCallback) {
|
||||
this.viewCallback = viewCallback
|
||||
}
|
||||
|
||||
interface SwtichLineViewCallback {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.mogo.och.unmanned.taxi.ui.task.itinerarycurrent
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.lifecycle.findViewTreeViewModelStoreOwner
|
||||
import com.mogo.och.unmanned.taxi.R
|
||||
import com.mogo.och.unmanned.taxi.TaxiUnmannedDriverProvider
|
||||
import com.mogo.och.unmanned.taxi.ui.itinerarycurrent.ItineraryCurrentModel
|
||||
|
||||
class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineViewCallback {
|
||||
|
||||
|
||||
constructor(context: Context) : super(context)
|
||||
|
||||
constructor(context: Context, attributeSet: AttributeSet) : super(context, attributeSet)
|
||||
|
||||
constructor(context: Context, attributeSet: AttributeSet, defStyleAttr: Int) : super(context, attributeSet, defStyleAttr)
|
||||
|
||||
constructor(context: Context, attributeSet: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attributeSet, defStyleAttr, defStyleRes)
|
||||
|
||||
|
||||
companion object {
|
||||
const val TAG = "SwitchBizView"
|
||||
}
|
||||
|
||||
private var viewModel: ItineraryCurrentModel?=null
|
||||
|
||||
private var fragment: LifecycleOwner?=null
|
||||
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.unmanned_itinerary_current, this, true)
|
||||
initView()
|
||||
}
|
||||
|
||||
private fun initView(){
|
||||
fragment = TaxiUnmannedDriverProvider.getFragmentInfo()
|
||||
}
|
||||
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
viewModel = findViewTreeViewModelStoreOwner()?.let {
|
||||
ViewModelProvider(it).get(ItineraryCurrentModel::class.java)
|
||||
}
|
||||
viewModel?.setDistanceCallback(this)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.mogo.och.unmanned.taxi.ui.itinerarynext
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description BadCase录包管理页面
|
||||
* @since: 2022/12/15
|
||||
*/
|
||||
class ItineraryNextModel : ViewModel() {
|
||||
|
||||
private val TAG = ItineraryNextModel::class.java.simpleName
|
||||
|
||||
private var viewCallback: SwtichLineViewCallback? = null
|
||||
|
||||
|
||||
override fun onCleared() {
|
||||
|
||||
}
|
||||
|
||||
fun setDistanceCallback(viewCallback: SwtichLineViewCallback) {
|
||||
this.viewCallback = viewCallback
|
||||
}
|
||||
|
||||
interface SwtichLineViewCallback {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.mogo.och.unmanned.taxi.ui.task.itinerarynext
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.lifecycle.findViewTreeViewModelStoreOwner
|
||||
import com.mogo.och.common.module.wigets.WindowRelativeLayout
|
||||
import com.mogo.och.unmanned.taxi.R
|
||||
import com.mogo.och.unmanned.taxi.TaxiUnmannedDriverProvider
|
||||
import com.mogo.och.unmanned.taxi.ui.itinerarynext.ItineraryNextModel
|
||||
|
||||
class ItineraryNextView: ConstraintLayout, ItineraryNextModel.SwtichLineViewCallback {
|
||||
|
||||
|
||||
constructor(context: Context) : super(context)
|
||||
|
||||
constructor(context: Context, attributeSet: AttributeSet) : super(context, attributeSet)
|
||||
|
||||
constructor(context: Context, attributeSet: AttributeSet, defStyleAttr: Int) : super(context, attributeSet, defStyleAttr)
|
||||
|
||||
constructor(context: Context, attributeSet: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attributeSet, defStyleAttr, defStyleRes)
|
||||
|
||||
|
||||
companion object {
|
||||
const val TAG = "SwitchBizView"
|
||||
}
|
||||
|
||||
private var viewModel: ItineraryNextModel?=null
|
||||
|
||||
private var fragment: LifecycleOwner?=null
|
||||
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.unmanned_itinerary_next, this, true)
|
||||
initView()
|
||||
}
|
||||
|
||||
private fun initView() {
|
||||
fragment = TaxiUnmannedDriverProvider.getFragmentInfo()
|
||||
}
|
||||
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
viewModel = findViewTreeViewModelStoreOwner()?.let {
|
||||
ViewModelProvider(it)[ItineraryNextModel::class.java]
|
||||
}
|
||||
viewModel?.setDistanceCallback(this)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,16 +1,16 @@
|
||||
package com.mogo.och.unmanned.taxi.wigets
|
||||
|
||||
import android.content.Context
|
||||
import android.content.res.TypedArray
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.map.listener.IMogoMapListener
|
||||
import com.mogo.och.unmanned.taxi.R
|
||||
import kotlinx.android.synthetic.main.taxi_select_view.view.aciv_check_state
|
||||
import kotlinx.android.synthetic.main.taxi_select_view.view.actv_server_name
|
||||
import kotlinx.android.synthetic.main.taxi_select_view.view.wait_order_num
|
||||
|
||||
class TaxiSelectView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
@@ -23,6 +23,8 @@ class TaxiSelectView @JvmOverloads constructor(
|
||||
|
||||
private lateinit var taxiServerTitle:String
|
||||
|
||||
var checkChangeListener:CheckChangeListener?=null
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.taxi_select_view, this, true)
|
||||
try {
|
||||
@@ -39,19 +41,28 @@ class TaxiSelectView @JvmOverloads constructor(
|
||||
super.onAttachedToWindow()
|
||||
CallerLogger.d(TAG,"onAttachedToWindow")
|
||||
actv_server_name.text = taxiServerTitle
|
||||
actv_server_name.setOnCheckedChangeListener { buttonView, isChecked ->
|
||||
if(buttonView.id==R.id.actv_server_name){
|
||||
if(isChecked){
|
||||
aciv_check_state.visibility = VISIBLE
|
||||
}else{
|
||||
aciv_check_state.visibility = GONE
|
||||
}
|
||||
|
||||
onClick {
|
||||
if (actv_server_name.isChecked) {
|
||||
return@onClick
|
||||
}else{
|
||||
actv_server_name.isChecked = true
|
||||
aciv_check_state.visibility = VISIBLE
|
||||
checkChangeListener?.onCheckChangeListener(actv_server_name.isChecked)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun setCheck(isCheck:Boolean){
|
||||
actv_server_name.isChecked = isCheck
|
||||
if (isCheck) {
|
||||
actv_server_name.isChecked = true
|
||||
aciv_check_state.visibility = VISIBLE
|
||||
checkChangeListener?.onCheckChangeListener(actv_server_name.isChecked)
|
||||
}else{
|
||||
actv_server_name.isChecked = false
|
||||
aciv_check_state.visibility = GONE
|
||||
checkChangeListener?.onCheckChangeListener(actv_server_name.isChecked)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onVisibilityAggregated(isVisible: Boolean) {
|
||||
@@ -69,6 +80,13 @@ class TaxiSelectView @JvmOverloads constructor(
|
||||
CallerLogger.d(TAG,"onDetachedFromWindow")
|
||||
}
|
||||
|
||||
fun setRedBagVisable(visibility: Int) {
|
||||
wait_order_num.visibility = visibility
|
||||
}
|
||||
|
||||
interface CheckChangeListener{
|
||||
fun onCheckChangeListener(isCheck: Boolean)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.mogo.och.unmanned.taxi.wigets
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.map.listener.IMogoMapListener
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotStatusListenerManager.M_LISTENERS
|
||||
import com.mogo.och.unmanned.taxi.R
|
||||
import kotlinx.android.synthetic.main.taxi_select_view_group.view.textCurrentItinerary
|
||||
import kotlinx.android.synthetic.main.taxi_select_view_group.view.textNextItinerary
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
class TaxiSelectViewGroup @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr),IMogoMapListener {
|
||||
companion object {
|
||||
const val TAG = "LoadingMapStatusView"
|
||||
}
|
||||
|
||||
private var checkType:ServerType? by Delegates.observable(null) { _, oldValue, newValue ->
|
||||
if (oldValue != newValue) {
|
||||
checkChangeListener?.changeCheck(newValue)
|
||||
}
|
||||
}
|
||||
var checkChangeListener:CheckChangeListener?=null
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.taxi_select_view_group, this, true)
|
||||
initView()
|
||||
}
|
||||
|
||||
private fun initView() {
|
||||
textCurrentItinerary.checkChangeListener = object : TaxiSelectView.CheckChangeListener{
|
||||
override fun onCheckChangeListener(isCheck: Boolean) {
|
||||
if(isCheck){
|
||||
checkType = ServerType.currentItinerary
|
||||
textNextItinerary.setCheck(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
textNextItinerary.checkChangeListener = object : TaxiSelectView.CheckChangeListener{
|
||||
override fun onCheckChangeListener(isCheck: Boolean) {
|
||||
if(isCheck){
|
||||
checkType = ServerType.nextItinerary
|
||||
textCurrentItinerary.setCheck(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerLogger.d(TAG,"onAttachedToWindow")
|
||||
}
|
||||
|
||||
|
||||
override fun onVisibilityAggregated(isVisible: Boolean) {
|
||||
super.onVisibilityAggregated(isVisible)
|
||||
if(isVisible){
|
||||
|
||||
}else{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerLogger.d(TAG,"onDetachedFromWindow")
|
||||
}
|
||||
|
||||
fun setNextItineraryRedBagVisable(visibility: Int) {
|
||||
textNextItinerary.setRedBagVisable(visibility)
|
||||
}
|
||||
|
||||
enum class ServerType{
|
||||
currentItinerary,
|
||||
nextItinerary
|
||||
}
|
||||
|
||||
interface CheckChangeListener{
|
||||
fun changeCheck(newCheck:ServerType?)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
BIN
OCH/taxi/unmanned-driver/src/main/res/drawable-nodpi/taxi_new_message.png
Executable file
|
After Width: | Height: | Size: 665 B |
BIN
OCH/taxi/unmanned-driver/src/main/res/drawable-nodpi/taxi_task_close.png
Executable file
|
After Width: | Height: | Size: 650 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 762 B |
BIN
OCH/taxi/unmanned-driver/src/main/res/drawable-nodpi/taxi_task_exercise.png
Executable file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
OCH/taxi/unmanned-driver/src/main/res/drawable-nodpi/taxi_task_nav.png
Executable file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
OCH/taxi/unmanned-driver/src/main/res/drawable-nodpi/taxi_task_order.png
Executable file
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 610 B |
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid
|
||||
android:color="@color/taxi_color_4D000000" />
|
||||
<corners android:radius="@dimen/dp_30"/>
|
||||
</shape>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<corners android:radius="@dimen/dp_10"/>
|
||||
|
||||
<stroke android:width="@dimen/dp_2" android:color="@color/white"/>
|
||||
</shape>
|
||||
@@ -17,11 +17,11 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:src="@drawable/taxi_selected_head" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
<androidx.appcompat.widget.AppCompatCheckedTextView
|
||||
android:id="@+id/actv_server_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
tools:checked="true"
|
||||
android:button="@null"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -29,4 +29,15 @@
|
||||
android:text="@string/task_current_itinerary"
|
||||
android:textColor="@color/taxi_biz_text_color_selector"
|
||||
android:textSize="@dimen/dp_45" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/wait_order_num"
|
||||
android:layout_width="@dimen/dp_32"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:visibility="gone"
|
||||
android:src="@drawable/taxi_new_message"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintTop_toTopOf="@+id/actv_server_name"
|
||||
app:layout_constraintStart_toEndOf="@+id/actv_server_name"
|
||||
/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/ll_loaing_view"
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.mogo.och.unmanned.taxi.wigets.TaxiSelectView
|
||||
android:id="@+id/textCurrentItinerary"
|
||||
app:taxi_server_title="@string/task_current_itinerary"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_24"
|
||||
android:layout_width="@dimen/dp_253"
|
||||
android:layout_height="@dimen/dp_113"/>
|
||||
|
||||
<com.mogo.och.unmanned.taxi.wigets.TaxiSelectView
|
||||
android:id="@+id/textNextItinerary"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:taxi_server_title="@string/task_next_itinerary"
|
||||
android:layout_marginStart="@dimen/dp_237"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</merge>
|
||||
@@ -0,0 +1,164 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"
|
||||
android:layout_width="@dimen/dp_880"
|
||||
android:layout_height="@dimen/dp_966"
|
||||
tools:background="@drawable/shape_itinerary_bg_default"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_order_status"
|
||||
android:textSize="@dimen/dp_40"
|
||||
android:textColor="@color/white"
|
||||
android:text="前往接驾"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_54"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_order_close"
|
||||
app:layout_constraintTop_toTopOf="@+id/actv_order_status"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/actv_order_status"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginEnd="@dimen/dp_53"
|
||||
android:src="@drawable/taxi_task_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_order_phone"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_order_status"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_9"
|
||||
android:layout_marginStart="@dimen/dp_54"
|
||||
android:textSize="@dimen/dp_40"
|
||||
android:textColor="@color/white"
|
||||
tools:text="137****8159"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_order_count"
|
||||
app:layout_constraintTop_toTopOf="@+id/actv_order_phone"
|
||||
app:layout_constraintStart_toEndOf="@+id/actv_order_phone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/actv_order_phone"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
android:paddingTop="@dimen/dp_4"
|
||||
android:paddingBottom="@dimen/dp_4"
|
||||
android:textSize="@dimen/dp_30"
|
||||
android:textColor="@color/white"
|
||||
android:background="@drawable/shape_itinerary_bg_order_count"
|
||||
tools:text="2人"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_task_type_order"
|
||||
app:layout_constraintTop_toTopOf="@+id/actv_order_phone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/actv_order_phone"
|
||||
app:layout_constraintStart_toEndOf="@+id/actv_order_count"
|
||||
android:src="@drawable/taxi_task_order"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_width="@dimen/dp_120"
|
||||
android:layout_height="@dimen/dp_50"/>
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/group_order_info"
|
||||
app:constraint_referenced_ids="aciv_task_type_order,actv_order_count,actv_order_phone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/v_bg_itinerary_info"
|
||||
app:layout_constraintTop_toBottomOf="@+id/aciv_task_type_order"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_27"
|
||||
android:layout_marginStart="@dimen/dp_54"
|
||||
android:layout_marginEnd="@dimen/dp_52"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@drawable/shape_itinerary_bg_default"
|
||||
android:layout_height="@dimen/dp_351"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_current_itinerary_start_point"
|
||||
app:layout_constraintTop_toTopOf="@+id/v_bg_itinerary_info"
|
||||
app:layout_constraintStart_toStartOf="@+id/v_bg_itinerary_info"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_34"
|
||||
android:layout_width="@dimen/dp_45"
|
||||
android:layout_height="@dimen/dp_45"
|
||||
android:src="@drawable/taxi_task_current_start_station_point" />
|
||||
|
||||
<View
|
||||
android:id="@+id/v_line_current_start_end"
|
||||
app:layout_constraintTop_toBottomOf="@+id/aciv_current_itinerary_start_point"
|
||||
app:layout_constraintStart_toStartOf="@+id/aciv_current_itinerary_start_point"
|
||||
app:layout_constraintEnd_toEndOf="@+id/aciv_current_itinerary_start_point"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:background="@color/taxi_color_4D000000"
|
||||
android:layout_width="@dimen/dp_6"
|
||||
android:layout_height="@dimen/dp_171"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_current_itinerary_end_point"
|
||||
app:layout_constraintTop_toBottomOf="@+id/v_line_current_start_end"
|
||||
app:layout_constraintStart_toStartOf="@+id/v_line_current_start_end"
|
||||
app:layout_constraintEnd_toEndOf="@+id/v_line_current_start_end"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:layout_width="@dimen/dp_45"
|
||||
android:layout_height="@dimen/dp_45"
|
||||
android:src="@drawable/taxi_task_current_end_station_point" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_current_itinerary_start_name"
|
||||
app:layout_constraintTop_toTopOf="@+id/aciv_current_itinerary_start_point"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/aciv_current_itinerary_start_point"
|
||||
app:layout_constraintStart_toEndOf="@+id/aciv_current_itinerary_start_point"
|
||||
android:layout_marginStart="@dimen/dp_29"
|
||||
android:text="天安门"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_40"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_distance_end"
|
||||
android:text="5.2公里"
|
||||
android:textSize="@dimen/dp_32"
|
||||
android:textColor="@color/taxi_color_CCCCCC"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_current_itinerary_start_name"
|
||||
app:layout_constraintStart_toStartOf="@+id/actv_current_itinerary_start_name"
|
||||
app:layout_constraintBottom_toTopOf="@+id/actv_time_end"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_time_end"
|
||||
android:text="1小时36分钟"
|
||||
android:textSize="@dimen/dp_32"
|
||||
android:textColor="@color/taxi_color_CCCCCC"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_distance_end"
|
||||
app:layout_constraintStart_toStartOf="@+id/actv_current_itinerary_start_name"
|
||||
app:layout_constraintBottom_toTopOf="@+id/actv_current_itinerary_end_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_current_itinerary_end_name"
|
||||
app:layout_constraintTop_toTopOf="@+id/aciv_current_itinerary_end_point"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/aciv_current_itinerary_end_point"
|
||||
app:layout_constraintStart_toEndOf="@+id/aciv_current_itinerary_end_point"
|
||||
android:layout_marginStart="@dimen/dp_29"
|
||||
android:text="环球贸易中心"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_40"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
</merge>
|
||||
@@ -0,0 +1,143 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"
|
||||
android:layout_width="@dimen/dp_774"
|
||||
android:layout_height="@dimen/dp_300"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<View
|
||||
android:id="@+id/v_next_itinerary_bg"
|
||||
android:background="@drawable/shape_itinerary_bg_default"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_54"
|
||||
android:layout_marginEnd="@dimen/dp_52"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_300"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_order_phone"
|
||||
app:layout_constraintTop_toTopOf="@+id/v_next_itinerary_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/v_next_itinerary_bg"
|
||||
android:layout_marginTop="@dimen/dp_26"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:textSize="@dimen/dp_40"
|
||||
android:textColor="@color/white"
|
||||
tools:text="137****8159"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_order_count"
|
||||
app:layout_constraintTop_toTopOf="@+id/actv_order_phone"
|
||||
app:layout_constraintStart_toEndOf="@+id/actv_order_phone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/actv_order_phone"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
android:paddingTop="@dimen/dp_4"
|
||||
android:paddingBottom="@dimen/dp_4"
|
||||
android:textSize="@dimen/dp_30"
|
||||
android:textColor="@color/white"
|
||||
android:background="@drawable/shape_itinerary_bg_order_count"
|
||||
tools:text="2人"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_task_type_order"
|
||||
app:layout_constraintTop_toTopOf="@+id/actv_order_phone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/actv_order_phone"
|
||||
app:layout_constraintStart_toEndOf="@+id/actv_order_count"
|
||||
android:src="@drawable/taxi_task_order"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_width="@dimen/dp_120"
|
||||
android:layout_height="@dimen/dp_50"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_order_close"
|
||||
app:layout_constraintTop_toTopOf="@+id/aciv_task_type_order"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/aciv_task_type_order"
|
||||
app:layout_constraintEnd_toEndOf="@+id/v_next_itinerary_bg"
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
android:src="@drawable/taxi_task_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/group_order_info"
|
||||
app:constraint_referenced_ids="aciv_task_type_order,actv_order_count,actv_order_phone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_task_type_exercise"
|
||||
app:layout_constraintTop_toTopOf="@+id/v_next_itinerary_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/v_next_itinerary_bg"
|
||||
android:layout_marginTop="@dimen/dp_29"
|
||||
android:src="@drawable/taxi_task_exercise"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_width="@dimen/dp_120"
|
||||
android:layout_height="@dimen/dp_50"/>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_next_start_station_point"
|
||||
android:src="@drawable/taxi_task_start_station_point"
|
||||
app:layout_constraintStart_toStartOf="@+id/v_next_itinerary_bg"
|
||||
app:layout_constraintTop_toTopOf="@+id/v_next_itinerary_bg"
|
||||
android:layout_marginTop="@dimen/dp_113"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
app:layout_constraintTop_toTopOf="@+id/aciv_next_start_station_point"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/aciv_next_start_station_point"
|
||||
app:layout_constraintStart_toEndOf="@+id/aciv_next_start_station_point"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_36"
|
||||
android:padding="0dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="天安门"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/v_line_next_start_end"
|
||||
app:layout_constraintTop_toBottomOf="@+id/aciv_next_start_station_point"
|
||||
app:layout_constraintStart_toStartOf="@+id/aciv_next_start_station_point"
|
||||
app:layout_constraintEnd_toEndOf="@+id/aciv_next_start_station_point"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:background="@color/taxi_color_4D000000"
|
||||
android:layout_width="@dimen/dp_2"
|
||||
android:layout_height="@dimen/dp_80"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_next_end_station_point"
|
||||
android:src="@drawable/taxi_task_end_station_point"
|
||||
app:layout_constraintTop_toBottomOf="@+id/v_line_next_start_end"
|
||||
app:layout_constraintStart_toStartOf="@+id/v_line_next_start_end"
|
||||
app:layout_constraintEnd_toEndOf="@+id/v_line_next_start_end"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
app:layout_constraintTop_toTopOf="@+id/aciv_next_end_station_point"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/aciv_next_end_station_point"
|
||||
app:layout_constraintStart_toEndOf="@+id/aciv_next_end_station_point"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_36"
|
||||
android:padding="0dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="环球贸易中心"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
</merge>
|
||||
@@ -20,6 +20,13 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_v_right"
|
||||
app:layout_constraintGuide_end="@dimen/dp_41"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:src="@drawable/taxi_biz_bg_header"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -29,6 +36,12 @@
|
||||
android:layout_width="@dimen/dp_856"
|
||||
android:layout_height="@dimen/dp_100"/>
|
||||
|
||||
<com.mogo.och.unmanned.taxi.ui.task.ItinerarySwitchView
|
||||
app:layout_constraintTop_toTopOf="@+id/guideline_h_top"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline_v_left"
|
||||
app:layout_constraintEnd_toEndOf="@+id/guideline_v_right"
|
||||
android:layout_width="@dimen/dp_880"
|
||||
android:layout_height="@dimen/dp_966"/>
|
||||
|
||||
<com.mogo.och.common.module.wigets.loading.LoadingViewBig
|
||||
android:id="@+id/loading_biz"
|
||||
@@ -40,20 +53,4 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<com.mogo.och.unmanned.taxi.wigets.TaxiSelectView
|
||||
app:taxi_server_title="@string/task_current_itinerary"
|
||||
app:layout_constraintTop_toBottomOf="@+id/guideline_h_top"
|
||||
app:layout_constraintStart_toEndOf="@+id/guideline_v_left"
|
||||
android:layout_marginStart="@dimen/dp_24"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<com.mogo.och.unmanned.taxi.wigets.TaxiSelectView
|
||||
app:layout_constraintTop_toBottomOf="@+id/guideline_h_top"
|
||||
app:layout_constraintStart_toEndOf="@+id/guideline_v_left"
|
||||
app:taxi_server_title="@string/task_next_itinerary"
|
||||
android:layout_marginStart="@dimen/dp_237"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="@dimen/dp_880"
|
||||
android:layout_height="@dimen/dp_966"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
|
||||
|
||||
|
||||
<com.mogo.och.unmanned.taxi.wigets.TaxiSelectViewGroup
|
||||
android:id="@+id/taxiServerSelector"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<com.mogo.och.common.module.wigets.map.orderstatus.OrderStatusView
|
||||
android:id="@+id/order_operation_change"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginEnd="@dimen/dp_47"
|
||||
android:layout_width="@dimen/dp_118"
|
||||
android:layout_height="@dimen/dp_50"/>
|
||||
|
||||
<com.mogo.och.unmanned.taxi.ui.task.itinerarycurrent.ItineraryCurrentView
|
||||
android:id="@+id/currentItinerary"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_28"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toBottomOf="@+id/taxiServerSelector"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<com.mogo.och.unmanned.taxi.ui.task.itinerarynext.ItineraryNextView
|
||||
android:id="@+id/nextItinerary"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_87"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toBottomOf="@+id/taxiServerSelector"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</merge>
|
||||
@@ -35,4 +35,6 @@
|
||||
<color name="taxi_color_ccb9c3e9">#CCB9C3E9</color>
|
||||
<color name="taxi_color_2eacff">#2EACFF</color>
|
||||
<color name="taxi_color_4dffffff">#4Dffffff</color>
|
||||
<color name="taxi_color_4D000000">#4D000000</color>
|
||||
<color name="taxi_color_CCCCCC">#CCCCCC</color>
|
||||
</resources>
|
||||
@@ -39,6 +39,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84Lis
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.ClickUtils
|
||||
import com.mogo.eagle.core.utilcode.util.JsonParser
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
@@ -110,6 +111,9 @@ class FaultReasonView @JvmOverloads constructor(
|
||||
|
||||
private val type = 1 //故障类接口请求Type值为1
|
||||
|
||||
private val iconDown = ContextCompat.getDrawable(context, R.drawable.icon_fault_expand)
|
||||
private val iconUp = ContextCompat.getDrawable(context, R.drawable.icon_fault_retract)
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_fault_reason, this, true)
|
||||
initView()
|
||||
@@ -166,9 +170,7 @@ class FaultReasonView @JvmOverloads constructor(
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun initEvent() {
|
||||
CallerDevaToolsListenerManager.addListener(TAG, this)
|
||||
val iconDown = ContextCompat.getDrawable(context, R.drawable.icon_fault_expand)
|
||||
iconDown?.setBounds(0, 0, iconDown.minimumWidth, iconDown.minimumHeight)
|
||||
val iconUp = ContextCompat.getDrawable(context, R.drawable.icon_fault_retract)
|
||||
iconUp?.setBounds(0, 0, iconUp.minimumWidth, iconUp.minimumHeight)
|
||||
//获取一级分类
|
||||
CallerDevaToolsManager.getCategories(BadCaseConfig.tenantId, 1, 0, type, 0)
|
||||
@@ -300,53 +302,57 @@ class FaultReasonView @JvmOverloads constructor(
|
||||
}
|
||||
//上报
|
||||
tvFaultReport.setOnClickListener {
|
||||
if (level2Name.isEmpty()) {
|
||||
ToastUtils.showShort("请完整填写再上报")
|
||||
return@setOnClickListener
|
||||
}
|
||||
if (hasLevel3 && level3Name.isEmpty()) {
|
||||
ToastUtils.showShort("请完整填写再上报")
|
||||
return@setOnClickListener
|
||||
}
|
||||
reportNote = etNoteInput.text.toString()
|
||||
//故障码列表赋值
|
||||
BadCaseConfig.newFMInfoMsg?.fmInfoList?.forEach {
|
||||
faultCodeList.add(it.faultId)
|
||||
}
|
||||
val geocodeSearch = GeocodeSearch(context)
|
||||
geocodeSearch.setOnGeocodeSearchListener(object :
|
||||
GeocodeSearch.OnGeocodeSearchListener {
|
||||
override fun onRegeocodeSearched(regeocodeResult: RegeocodeResult?, p1: Int) {
|
||||
regeocodeResult?.regeocodeAddress?.formatAddress?.let {
|
||||
address = it
|
||||
}
|
||||
val padProblemList = ArrayList<PadProblemInfo>()
|
||||
val note = if (reportNote.isEmpty()) {
|
||||
"$level1Name-$level2Name-$level3Name"
|
||||
} else {
|
||||
"$level1Name-$level2Name-$level3Name($reportNote)"
|
||||
}
|
||||
val padProblemInfo = PadProblemInfo(
|
||||
address, faultCodeList, millis2String(workOrderOccurrenceTime), level1Id,
|
||||
level2Id, level3Id, BadCaseConfig.lineName, note, reportType,
|
||||
SharedPrefsMgr.getInstance().getString("och_account", "")
|
||||
)
|
||||
padProblemList.add(padProblemInfo)
|
||||
val padAddProblemReq =
|
||||
PadAddProblemReq(padProblemList, AppConfigInfo.plateNumber)
|
||||
CallerDevaToolsManager.problemPadAdd(padAddProblemReq)
|
||||
if(ClickUtils.isFastClick()){
|
||||
if (level2Name.isEmpty()) {
|
||||
ToastUtils.showShort("请完整填写再上报")
|
||||
return@setOnClickListener
|
||||
}
|
||||
|
||||
override fun onGeocodeSearched(p0: GeocodeResult?, p1: Int) {
|
||||
|
||||
if (hasLevel3 && level3Name.isEmpty()) {
|
||||
ToastUtils.showShort("请完整填写再上报")
|
||||
return@setOnClickListener
|
||||
}
|
||||
})
|
||||
val latLon = LatLonPoint(
|
||||
CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().latitude,
|
||||
CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().longitude
|
||||
)
|
||||
val q = RegeocodeQuery(latLon, 200f, GeocodeSearch.AMAP)
|
||||
geocodeSearch.getFromLocationAsyn(q)
|
||||
reportNote = etNoteInput.text.toString()
|
||||
//故障码列表赋值
|
||||
BadCaseConfig.newFMInfoMsg?.fmInfoList?.forEach {
|
||||
faultCodeList.add(it.faultId)
|
||||
}
|
||||
val geocodeSearch = GeocodeSearch(context)
|
||||
geocodeSearch.setOnGeocodeSearchListener(object :
|
||||
GeocodeSearch.OnGeocodeSearchListener {
|
||||
override fun onRegeocodeSearched(regeocodeResult: RegeocodeResult?, p1: Int) {
|
||||
regeocodeResult?.regeocodeAddress?.formatAddress?.let {
|
||||
address = it
|
||||
}
|
||||
val padProblemList = ArrayList<PadProblemInfo>()
|
||||
val note = if (reportNote.isEmpty()) {
|
||||
"$level1Name-$level2Name-$level3Name"
|
||||
} else {
|
||||
"$level1Name-$level2Name-$level3Name($reportNote)"
|
||||
}
|
||||
val padProblemInfo = PadProblemInfo(
|
||||
address, faultCodeList, millis2String(workOrderOccurrenceTime), level1Id,
|
||||
level2Id, level3Id, BadCaseConfig.lineName, note, reportType,
|
||||
SharedPrefsMgr.getInstance().getString("och_account", "")
|
||||
)
|
||||
padProblemList.add(padProblemInfo)
|
||||
val padAddProblemReq =
|
||||
PadAddProblemReq(padProblemList, AppConfigInfo.plateNumber)
|
||||
CallerDevaToolsManager.problemPadAdd(padAddProblemReq)
|
||||
}
|
||||
|
||||
override fun onGeocodeSearched(p0: GeocodeResult?, p1: Int) {
|
||||
|
||||
}
|
||||
})
|
||||
val latLon = LatLonPoint(
|
||||
CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().latitude,
|
||||
CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().longitude
|
||||
)
|
||||
val q = RegeocodeQuery(latLon, 200f, GeocodeSearch.AMAP)
|
||||
geocodeSearch.getFromLocationAsyn(q)
|
||||
}else{
|
||||
ToastUtils.showShort("请勿连续上报,稍后再试")
|
||||
}
|
||||
}
|
||||
|
||||
//取消
|
||||
@@ -531,4 +537,34 @@ class FaultReasonView @JvmOverloads constructor(
|
||||
ToastUtils.showShort("故障列表获取失败:$msg")
|
||||
}
|
||||
|
||||
override fun onVisibilityAggregated(isVisible: Boolean) {
|
||||
super.onVisibilityAggregated(isVisible)
|
||||
if(visibility == View.VISIBLE){
|
||||
//弹窗展示时间
|
||||
tvFaultTime.text =
|
||||
millis2String(System.currentTimeMillis(), TimeUtils.getHourMinSecondFormat())
|
||||
//故障发生时间
|
||||
workOrderOccurrenceTime = System.currentTimeMillis()
|
||||
tvOccurrenceTime.text = millis2String(workOrderOccurrenceTime, TimeUtils.getHourMinFormat())
|
||||
//关闭故障类型选择
|
||||
faultTypeSelectStatus = false
|
||||
tvFaultType.setCompoundDrawables(null, null, iconDown, null)
|
||||
//关闭故障原因选择
|
||||
faultReasonSelectStatus = false
|
||||
tvFaultReason.setCompoundDrawables(null, null, iconDown, null)
|
||||
//隐藏列表
|
||||
rvFaultList.visibility = View.GONE
|
||||
//补充描述
|
||||
etNoteInput.setText("")
|
||||
//问题描述录音
|
||||
ivNoteAudio.setImageDrawable(
|
||||
ContextCompat.getDrawable(
|
||||
context,
|
||||
R.drawable.icon_reason_audio_normal
|
||||
)
|
||||
)
|
||||
setAudio(false)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -13,6 +13,7 @@ import android.view.animation.Animation
|
||||
import android.view.animation.ScaleAnimation
|
||||
import android.widget.EditText
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.iflytek.cloud.ErrorCode
|
||||
import com.iflytek.cloud.InitListener
|
||||
import com.iflytek.cloud.RecognizerListener
|
||||
@@ -31,6 +32,7 @@ import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManage
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.ClickUtils
|
||||
import com.mogo.eagle.core.utilcode.util.JsonParser
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
@@ -159,41 +161,59 @@ class WorkOrderView @JvmOverloads constructor(
|
||||
//问题描述录音
|
||||
iv_describe_audio.setOnClickListener {
|
||||
audioStatus = !audioStatus
|
||||
if (audioStatus) {
|
||||
iv_describe_audio.setImageDrawable(
|
||||
ContextCompat.getDrawable(
|
||||
context,
|
||||
R.drawable.icon_reason_audio_pressed
|
||||
)
|
||||
)
|
||||
} else {
|
||||
iv_describe_audio.setImageDrawable(
|
||||
ContextCompat.getDrawable(
|
||||
context,
|
||||
R.drawable.icon_reason_audio_normal
|
||||
)
|
||||
)
|
||||
}
|
||||
setAudio(audioStatus)
|
||||
}
|
||||
|
||||
//上报
|
||||
tv_work_order_report.setOnClickListener {
|
||||
//工单问题类型必选,没有选择,进行提示
|
||||
if(workOrderType.isEmpty()){
|
||||
ToastUtils.showShort("请选择问题类型")
|
||||
return@setOnClickListener
|
||||
}
|
||||
if(et_describe_input.text.toString().isEmpty()){
|
||||
ToastUtils.showShort("请填写问题描述")
|
||||
return@setOnClickListener
|
||||
}
|
||||
GlobalScope.launch(Dispatchers.IO){
|
||||
val msgBoxList = CallerMsgBoxManager.queryFMInfoList(context,
|
||||
workOrderOccurrenceTime-120000,workOrderOccurrenceTime+120000)
|
||||
val faultList = ArrayList<FaultInfo>()
|
||||
msgBoxList?.forEach { msgBoxBean ->
|
||||
val fmInfoMsg = msgBoxBean.bean as FMInfoMsg
|
||||
fmInfoMsg.fmInfoList?.forEach { fault ->
|
||||
val faultBean = FaultInfo(false,fault.faultId,fault.faultName,
|
||||
fault.faultTime.toString(), FaultDetailInfo(fault.faultDesc)
|
||||
)
|
||||
faultList.add(faultBean)
|
||||
}
|
||||
if(ClickUtils.isFastClick()){
|
||||
//工单问题类型必选,没有选择,进行提示
|
||||
if(workOrderType.isEmpty()){
|
||||
ToastUtils.showShort("请选择问题类型")
|
||||
return@setOnClickListener
|
||||
}
|
||||
val workOrderReportInfo = WorkOrderReportInfo(workOrderType,workOrderOccurrenceTime.toString(),
|
||||
et_describe_input.text.toString(), CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().longitude.toString(),
|
||||
CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().latitude.toString(),
|
||||
AppConfigInfo.plateNumber, SharedPrefsMgr.getInstance().getString("och_account","") ,
|
||||
BadCaseConfig.dockerVersion ?:"",faultList)
|
||||
CallerDevaToolsManager.workOrderReport(workOrderReportInfo)
|
||||
if(et_describe_input.text.toString().isEmpty()){
|
||||
ToastUtils.showShort("请填写问题描述")
|
||||
return@setOnClickListener
|
||||
}
|
||||
GlobalScope.launch(Dispatchers.IO){
|
||||
val msgBoxList = CallerMsgBoxManager.queryFMInfoList(context,
|
||||
workOrderOccurrenceTime-120000,workOrderOccurrenceTime+120000)
|
||||
val faultList = ArrayList<FaultInfo>()
|
||||
msgBoxList?.forEach { msgBoxBean ->
|
||||
val fmInfoMsg = msgBoxBean.bean as FMInfoMsg
|
||||
fmInfoMsg.fmInfoList?.forEach { fault ->
|
||||
val faultBean = FaultInfo(false,fault.faultId,fault.faultName,
|
||||
fault.faultTime.toString(), FaultDetailInfo(fault.faultDesc)
|
||||
)
|
||||
faultList.add(faultBean)
|
||||
}
|
||||
}
|
||||
val workOrderReportInfo = WorkOrderReportInfo(workOrderType,workOrderOccurrenceTime.toString(),
|
||||
et_describe_input.text.toString(), CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().longitude.toString(),
|
||||
CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().latitude.toString(),
|
||||
AppConfigInfo.plateNumber, SharedPrefsMgr.getInstance().getString("och_account","") ,
|
||||
BadCaseConfig.dockerVersion ?:"",faultList)
|
||||
CallerDevaToolsManager.workOrderReport(workOrderReportInfo)
|
||||
}
|
||||
}else{
|
||||
ToastUtils.showShort("请勿连续上报,稍后再试")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//取消
|
||||
@@ -321,4 +341,28 @@ class WorkOrderView @JvmOverloads constructor(
|
||||
this.clickListener = clickListener
|
||||
}
|
||||
|
||||
override fun onVisibilityChanged(changedView: View, visibility: Int) {
|
||||
super.onVisibilityChanged(changedView, visibility)
|
||||
if(visibility == View.VISIBLE){
|
||||
//弹窗展示时间
|
||||
tv_work_order_time.text =
|
||||
millis2String(System.currentTimeMillis(), TimeUtils.getHourMinSecondFormat())
|
||||
//问题类型
|
||||
wrap_radio_group.clearCheck()
|
||||
//发生时间
|
||||
workOrderOccurrenceTime = System.currentTimeMillis()
|
||||
tv_occurrence_time.text = millis2String(workOrderOccurrenceTime, TimeUtils.getHourMinFormat())
|
||||
et_describe_input.setText("")
|
||||
//问题描述录音
|
||||
iv_describe_audio.setImageDrawable(
|
||||
ContextCompat.getDrawable(
|
||||
context,
|
||||
R.drawable.icon_reason_audio_normal
|
||||
)
|
||||
)
|
||||
setAudio(false)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -19,6 +19,7 @@ import androidx.preference.SwitchPreferenceCompat
|
||||
import androidx.preference.TwoStatePreference
|
||||
import androidx.preference.forEach
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.data.multidisplay.TelematicConstant
|
||||
@@ -52,6 +53,7 @@ import com.mogo.eagle.core.function.hmi.ui.utils.SOPAnalyticsManager.clickEventA
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.mogo.vehicle.SweeperVehicleConfigUtils
|
||||
import com.mogo.eagle.core.utilcode.rv.divider.CommonDividerItemDecoration
|
||||
import com.mogo.eagle.core.utilcode.util.AppStateManager
|
||||
@@ -960,7 +962,12 @@ class OperatePanelLayout : LinearLayout {
|
||||
private const val KEY_OVERTAKE_SPEED_THRESHOLDSS = "overtake_speed_thresholds"
|
||||
}
|
||||
|
||||
private var prevCheckedKeyForFusionMode: String? = null
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
|
||||
if (AppConfigInfo.isConnectAutopilot) {
|
||||
CallerAutoPilotControlManager.getCarConfig()
|
||||
}
|
||||
CallerAutopilotCarConfigListenerManager.addListener(TAG, this)
|
||||
CallerSopSettingManager.addListener(TAG, this)
|
||||
CallerHmiViewControlListenerManager.addListener(TAG, this)
|
||||
@@ -1038,19 +1045,39 @@ class OperatePanelLayout : LinearLayout {
|
||||
return FunctionBuildConfig.isFaultSlowDown
|
||||
}
|
||||
KEY_ALL_MERGE_MODE -> {
|
||||
return FunctionBuildConfig.fusionMode == 1
|
||||
val checked = FunctionBuildConfig.fusionMode == 1
|
||||
if (checked) {
|
||||
prevCheckedKeyForFusionMode = KEY_ALL_MERGE_MODE
|
||||
}
|
||||
return checked
|
||||
}
|
||||
KEY_BLIND_AREA_MODE -> {
|
||||
return FunctionBuildConfig.fusionMode == 2
|
||||
val checked = FunctionBuildConfig.fusionMode == 2
|
||||
if (checked) {
|
||||
prevCheckedKeyForFusionMode = KEY_BLIND_AREA_MODE
|
||||
}
|
||||
return checked
|
||||
}
|
||||
KEY_BEYOND_VISUAL_RANGE_MODE -> {
|
||||
return FunctionBuildConfig.fusionMode == 3
|
||||
val checked = FunctionBuildConfig.fusionMode == 3
|
||||
if (checked) {
|
||||
prevCheckedKeyForFusionMode = KEY_BEYOND_VISUAL_RANGE_MODE
|
||||
}
|
||||
return checked
|
||||
}
|
||||
KEY_TRANSPARENT_TRANSFER_MODE -> {
|
||||
return FunctionBuildConfig.fusionMode == 4
|
||||
val checked = FunctionBuildConfig.fusionMode == 4
|
||||
if (checked) {
|
||||
prevCheckedKeyForFusionMode = KEY_TRANSPARENT_TRANSFER_MODE
|
||||
}
|
||||
return checked
|
||||
}
|
||||
KEY_PURE_OBU_MODE -> {
|
||||
return FunctionBuildConfig.fusionMode == 5
|
||||
val checked = FunctionBuildConfig.fusionMode == 5
|
||||
if (checked) {
|
||||
prevCheckedKeyForFusionMode = KEY_PURE_OBU_MODE
|
||||
}
|
||||
return checked
|
||||
}
|
||||
KEY_AUTO_PILOT_SPEED_THRESHOLDS -> {
|
||||
return listOf("0.0", "60.0", "${FunctionBuildConfig.maxSpeedLimit}", "5.0")
|
||||
@@ -1066,10 +1093,11 @@ class OperatePanelLayout : LinearLayout {
|
||||
}
|
||||
|
||||
override fun onPreferenceClick(preference: Preference): Boolean {
|
||||
Log.d(TAG, "-- onPreferenceClick --:pref -> $preference")
|
||||
Logger.d(TAG, "-- onPreferenceClick --:pref -> ${preference.key}")
|
||||
when (preference.key) {
|
||||
KEY_AUTO_PILOT_SPEED_THRESHOLDS -> {
|
||||
FunctionBuildConfig.maxSpeedLimit = preference.extras.getDouble(PreferenceWithSpeedSetting.KEY_BUNDLE_CURRENT_VALUE, FunctionBuildConfig.maxSpeedLimit)
|
||||
val currentValue = preference.extras.getDouble(PreferenceWithSpeedSetting.KEY_BUNDLE_CURRENT_VALUE, FunctionBuildConfig.maxSpeedLimit)
|
||||
FunctionBuildConfig.maxSpeedLimit = currentValue
|
||||
val isSuccess = CallerAutoPilotControlManager.setAutoPilotSpeed(FunctionBuildConfig.maxSpeedLimit.toInt())
|
||||
when {
|
||||
isSuccess -> {
|
||||
@@ -1180,39 +1208,84 @@ class OperatePanelLayout : LinearLayout {
|
||||
return true
|
||||
}
|
||||
KEY_ALL_MERGE_MODE -> {
|
||||
FunctionBuildConfig.fusionMode = 1
|
||||
hmiAction("SOP 融合模式, ", FunctionBuildConfig.fusionMode)
|
||||
clickEventAnalytics("融合模式", true)
|
||||
CallerAutoPilotControlManager.sendFusionMode(FunctionBuildConfig.fusionMode)
|
||||
return true
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
if (isChecked) {
|
||||
FunctionBuildConfig.fusionMode = 1
|
||||
prevCheckedKeyForFusionMode?.takeIf { it != KEY_ALL_MERGE_MODE }?.let {
|
||||
preferenceScreen.findPreferenceReal<TwoStatePreference>(it)
|
||||
}?.also {
|
||||
prevCheckedKeyForFusionMode = KEY_ALL_MERGE_MODE
|
||||
changeValue(it, false)
|
||||
}
|
||||
hmiAction("SOP 融合模式, ", FunctionBuildConfig.fusionMode)
|
||||
clickEventAnalytics("融合模式", true)
|
||||
CallerAutoPilotControlManager.sendFusionMode(FunctionBuildConfig.fusionMode)
|
||||
}
|
||||
return isChecked
|
||||
}
|
||||
KEY_BLIND_AREA_MODE -> {
|
||||
FunctionBuildConfig.fusionMode = 2
|
||||
hmiAction("SOP 融合模式, ", FunctionBuildConfig.fusionMode)
|
||||
clickEventAnalytics("融合模式", true)
|
||||
CallerAutoPilotControlManager.sendFusionMode(FunctionBuildConfig.fusionMode)
|
||||
return true
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
if (isChecked) {
|
||||
FunctionBuildConfig.fusionMode = 2
|
||||
prevCheckedKeyForFusionMode?.takeIf { it != KEY_BLIND_AREA_MODE }?.let {
|
||||
preferenceScreen.findPreferenceReal<TwoStatePreference>(it)
|
||||
}?.also {
|
||||
prevCheckedKeyForFusionMode = KEY_BLIND_AREA_MODE
|
||||
changeValue(it, false)
|
||||
}
|
||||
hmiAction("SOP 融合模式, ", FunctionBuildConfig.fusionMode)
|
||||
clickEventAnalytics("融合模式", true)
|
||||
CallerAutoPilotControlManager.sendFusionMode(FunctionBuildConfig.fusionMode)
|
||||
}
|
||||
return isChecked
|
||||
}
|
||||
KEY_BEYOND_VISUAL_RANGE_MODE -> {
|
||||
FunctionBuildConfig.fusionMode = 3
|
||||
hmiAction("SOP 融合模式, ", FunctionBuildConfig.fusionMode)
|
||||
clickEventAnalytics("融合模式", true)
|
||||
CallerAutoPilotControlManager.sendFusionMode(FunctionBuildConfig.fusionMode)
|
||||
return true
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
if (isChecked) {
|
||||
FunctionBuildConfig.fusionMode = 3
|
||||
prevCheckedKeyForFusionMode?.takeIf { it != KEY_BEYOND_VISUAL_RANGE_MODE }?.let {
|
||||
preferenceScreen.findPreferenceReal<TwoStatePreference>(it)
|
||||
}?.also {
|
||||
prevCheckedKeyForFusionMode = KEY_BEYOND_VISUAL_RANGE_MODE
|
||||
changeValue(it, false)
|
||||
}
|
||||
hmiAction("SOP 融合模式, ", FunctionBuildConfig.fusionMode)
|
||||
clickEventAnalytics("融合模式", true)
|
||||
CallerAutoPilotControlManager.sendFusionMode(FunctionBuildConfig.fusionMode)
|
||||
}
|
||||
return isChecked
|
||||
}
|
||||
KEY_TRANSPARENT_TRANSFER_MODE -> {
|
||||
FunctionBuildConfig.fusionMode = 4
|
||||
hmiAction("SOP 融合模式, ", FunctionBuildConfig.fusionMode)
|
||||
clickEventAnalytics("融合模式", true)
|
||||
CallerAutoPilotControlManager.sendFusionMode(FunctionBuildConfig.fusionMode)
|
||||
return true
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
if (isChecked) {
|
||||
FunctionBuildConfig.fusionMode = 4
|
||||
prevCheckedKeyForFusionMode?.takeIf { it != KEY_TRANSPARENT_TRANSFER_MODE }?.let {
|
||||
preferenceScreen.findPreferenceReal<TwoStatePreference>(it)
|
||||
}?.also {
|
||||
prevCheckedKeyForFusionMode = KEY_TRANSPARENT_TRANSFER_MODE
|
||||
changeValue(it, false)
|
||||
}
|
||||
hmiAction("SOP 融合模式, ", FunctionBuildConfig.fusionMode)
|
||||
clickEventAnalytics("融合模式", true)
|
||||
CallerAutoPilotControlManager.sendFusionMode(FunctionBuildConfig.fusionMode)
|
||||
}
|
||||
return isChecked
|
||||
}
|
||||
KEY_PURE_OBU_MODE -> {
|
||||
FunctionBuildConfig.fusionMode = 5
|
||||
hmiAction("SOP 融合模式, ", FunctionBuildConfig.fusionMode)
|
||||
clickEventAnalytics("融合模式", true)
|
||||
CallerAutoPilotControlManager.sendFusionMode(FunctionBuildConfig.fusionMode)
|
||||
return true
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
if (isChecked) {
|
||||
FunctionBuildConfig.fusionMode = 5
|
||||
prevCheckedKeyForFusionMode?.takeIf { it != KEY_PURE_OBU_MODE }?.let {
|
||||
preferenceScreen.findPreferenceReal<TwoStatePreference>(it)
|
||||
}?.also {
|
||||
prevCheckedKeyForFusionMode = KEY_PURE_OBU_MODE
|
||||
changeValue(it, false)
|
||||
}
|
||||
hmiAction("SOP 融合模式, ", FunctionBuildConfig.fusionMode)
|
||||
clickEventAnalytics("融合模式", true)
|
||||
CallerAutoPilotControlManager.sendFusionMode(FunctionBuildConfig.fusionMode)
|
||||
}
|
||||
return isChecked
|
||||
}
|
||||
}
|
||||
return super.onPreferenceChange(preference, newValue)
|
||||
|
||||
@@ -4,131 +4,122 @@
|
||||
android:layout_width="@dimen/dp_960"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clBoneTabChild"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
<com.mogo.eagle.core.function.hmi.bone.tab.CarInfoTabView
|
||||
android:id="@+id/carInfoTabView"
|
||||
android:layout_width="@dimen/dp_960"
|
||||
android:layout_height="@dimen/dp_1214"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.bone.tab.CarInfoTabView
|
||||
android:id="@+id/carInfoTabView"
|
||||
android:layout_width="@dimen/dp_960"
|
||||
android:layout_height="@dimen/dp_1214"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<com.mogo.eagle.core.function.hmi.bone.tab.MsgBoxTabView
|
||||
android:id="@+id/msgBoxTabView"
|
||||
android:layout_width="@dimen/dp_960"
|
||||
android:layout_height="@dimen/dp_1214"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.bone.tab.MsgBoxTabView
|
||||
android:id="@+id/msgBoxTabView"
|
||||
android:layout_width="@dimen/dp_960"
|
||||
android:layout_height="@dimen/dp_1214"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
<com.mogo.eagle.core.function.hmi.bone.tab.FaultReasonView
|
||||
android:id="@+id/faultReasonView"
|
||||
android:layout_width="@dimen/dp_960"
|
||||
android:layout_height="@dimen/dp_1137"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.bone.tab.FaultReasonView
|
||||
android:id="@+id/faultReasonView"
|
||||
android:layout_width="@dimen/dp_960"
|
||||
android:layout_height="@dimen/dp_1137"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
<com.mogo.eagle.core.function.hmi.bone.tab.WorkOrderView
|
||||
android:id="@+id/workOrderView"
|
||||
android:layout_width="@dimen/dp_960"
|
||||
android:layout_height="@dimen/dp_1137"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.bone.tab.WorkOrderView
|
||||
android:id="@+id/workOrderView"
|
||||
android:layout_width="@dimen/dp_960"
|
||||
android:layout_height="@dimen/dp_1137"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
<com.mogo.eagle.core.function.hmi.bone.tab.ToolKitTabView
|
||||
android:id="@+id/toolKitTabView"
|
||||
android:layout_width="@dimen/dp_960"
|
||||
android:layout_height="@dimen/dp_1214"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.bone.tab.ToolKitTabView
|
||||
android:id="@+id/toolKitTabView"
|
||||
android:layout_width="@dimen/dp_960"
|
||||
android:layout_height="@dimen/dp_1214"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<com.mogo.eagle.core.function.hmi.bone.tab.ReportTypeView
|
||||
android:id="@+id/reportTypeView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_270"
|
||||
android:layout_marginBottom="@dimen/dp_102"
|
||||
android:elevation="@dimen/dp_1000"
|
||||
/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.bone.tab.ReportTypeView
|
||||
android:id="@+id/reportTypeView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_270"
|
||||
android:layout_marginBottom="@dimen/dp_170"
|
||||
android:elevation="@dimen/dp_100"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<View
|
||||
android:id="@+id/viewBottomContainer"
|
||||
android:layout_width="@dimen/dp_960"
|
||||
android:layout_height="@dimen/dp_216"
|
||||
android:background="@drawable/bg_tab_switch"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
app:layout_constraintLeft_toLeftOf="parent">
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.bone.TabSwitchView
|
||||
android:id="@+id/tabSwitchCarInfo"
|
||||
android:layout_width="@dimen/dp_220"
|
||||
android:layout_height="@dimen/dp_140"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
app:clickRes="@drawable/icon_tab_car_info_click"
|
||||
app:defaultRes="@drawable/icon_tab_car_info"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<com.mogo.eagle.core.function.hmi.bone.TabSwitchView
|
||||
android:id="@+id/tabSwitchCarInfo"
|
||||
android:layout_width="@dimen/dp_220"
|
||||
android:layout_height="@dimen/dp_140"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
app:clickRes="@drawable/icon_tab_car_info_click"
|
||||
app:defaultRes="@drawable/icon_tab_car_info"
|
||||
app:layout_constraintLeft_toLeftOf="@id/viewBottomContainer"
|
||||
app:layout_constraintTop_toTopOf="@id/viewBottomContainer" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.bone.TabSwitchView
|
||||
android:id="@+id/tabSwitchMsgBox"
|
||||
android:layout_width="@dimen/dp_220"
|
||||
android:layout_height="@dimen/dp_140"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
app:clickRes="@drawable/icon_tab_msg_box_click"
|
||||
app:defaultRes="@drawable/icon_tab_msg_box"
|
||||
app:layout_constraintLeft_toRightOf="@+id/tabSwitchCarInfo"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<com.mogo.eagle.core.function.hmi.bone.TabSwitchView
|
||||
android:id="@+id/tabSwitchMsgBox"
|
||||
android:layout_width="@dimen/dp_220"
|
||||
android:layout_height="@dimen/dp_140"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
app:clickRes="@drawable/icon_tab_msg_box_click"
|
||||
app:defaultRes="@drawable/icon_tab_msg_box"
|
||||
app:layout_constraintLeft_toRightOf="@+id/tabSwitchCarInfo"
|
||||
app:layout_constraintTop_toTopOf="@id/viewBottomContainer" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.bone.TabSwitchView
|
||||
android:id="@+id/tabSwitchReport"
|
||||
android:layout_width="@dimen/dp_220"
|
||||
android:layout_height="@dimen/dp_140"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
app:clickRes="@drawable/icon_tab_report_click"
|
||||
app:defaultRes="@drawable/icon_tab_report"
|
||||
app:layout_constraintLeft_toRightOf="@+id/tabSwitchMsgBox"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<com.mogo.eagle.core.function.hmi.bone.TabSwitchView
|
||||
android:id="@+id/tabSwitchReport"
|
||||
android:layout_width="@dimen/dp_220"
|
||||
android:layout_height="@dimen/dp_140"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
app:clickRes="@drawable/icon_tab_report_click"
|
||||
app:defaultRes="@drawable/icon_tab_report"
|
||||
app:layout_constraintLeft_toRightOf="@+id/tabSwitchMsgBox"
|
||||
app:layout_constraintTop_toTopOf="@id/viewBottomContainer" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.bone.TabSwitchView
|
||||
android:id="@+id/tabSwitchMore"
|
||||
android:layout_width="@dimen/dp_220"
|
||||
android:layout_height="@dimen/dp_140"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
app:clickRes="@drawable/icon_tab_more_click"
|
||||
app:defaultRes="@drawable/icon_tab_more"
|
||||
app:layout_constraintLeft_toRightOf="@+id/tabSwitchReport"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<com.mogo.eagle.core.function.hmi.bone.TabSwitchView
|
||||
android:id="@+id/tabSwitchMore"
|
||||
android:layout_width="@dimen/dp_220"
|
||||
android:layout_height="@dimen/dp_140"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
app:clickRes="@drawable/icon_tab_more_click"
|
||||
app:defaultRes="@drawable/icon_tab_more"
|
||||
app:layout_constraintLeft_toRightOf="@+id/tabSwitchReport"
|
||||
app:layout_constraintTop_toTopOf="@id/viewBottomContainer" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -94,7 +94,7 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/tvFaultType"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_103"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_33"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -136,7 +136,7 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/tvFaultReason"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_103"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_33"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -144,7 +144,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/fault_time"
|
||||
android:textSize="@dimen/sp_32"
|
||||
android:textSize="@dimen/sp_38"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toTopOf="@id/viewFaultTimeLabel"
|
||||
@@ -207,7 +207,7 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/viewTimeBg"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_103"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_33"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -254,13 +254,13 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_describe_audio"
|
||||
android:layout_width="@dimen/dp_45"
|
||||
android:layout_height="@dimen/dp_59"
|
||||
android:src="@drawable/icon_work_order_audio"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/icon_reason_audio_normal"
|
||||
app:layout_constraintTop_toTopOf="@id/et_describe_input"
|
||||
app:layout_constraintBottom_toBottomOf="@id/et_describe_input"
|
||||
app:layout_constraintEnd_toEndOf="@id/et_describe_input"
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
android:padding="@dimen/dp_30"
|
||||
android:contentDescription="@string/take_over_note_audio"
|
||||
/>
|
||||
|
||||
|
||||
@@ -31,10 +31,10 @@
|
||||
android:key="mofang"
|
||||
android:layout="@layout/layout_operate_panel_preference_header"
|
||||
android:title="蘑方" />
|
||||
<Preference
|
||||
android:fragment="com.mogo.eagle.core.function.hmi.ui.operate.OperatePanelLayout$WelcomeWordsPreferenceCompat"
|
||||
android:key="welcome_words"
|
||||
android:layout="@layout/layout_operate_panel_preference_header"
|
||||
android:title="欢迎语"/>
|
||||
<!-- <Preference-->
|
||||
<!-- android:fragment="com.mogo.eagle.core.function.hmi.ui.operate.OperatePanelLayout$WelcomeWordsPreferenceCompat"-->
|
||||
<!-- android:key="welcome_words"-->
|
||||
<!-- android:layout="@layout/layout_operate_panel_preference_header"-->
|
||||
<!-- android:title="欢迎语"/>-->
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
||||
@@ -227,6 +227,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
@Volatile
|
||||
private var isSmallMap: Boolean = true
|
||||
private var iconRes = R.drawable.small_map_car
|
||||
@Volatile
|
||||
private var globalPathResp: MessagePad.GlobalPathResp? = null
|
||||
private val mCoordinatesLatLng: MutableList<LatLng> = ArrayList()
|
||||
private var mSmallCarMarker: Marker? = null
|
||||
@@ -324,13 +325,22 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
}
|
||||
// 显示小地图样式
|
||||
changeMapSettings(true)
|
||||
globalPathResp?.let {
|
||||
if (it.wayPointsList.size > 0) {
|
||||
drawRotting()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
clearPolyline()
|
||||
hideSmallCarMarker()
|
||||
// 显示行程总览地图样式
|
||||
changeMapSettings(false)
|
||||
val globalPath = reqData
|
||||
if (!globalPath.isNullOrEmpty()) {
|
||||
requestData(globalPath as ArrayList<Point>)
|
||||
}
|
||||
if (!isRoadTrackReq) {
|
||||
handleRoadTrajectories(roadTrackList, null)
|
||||
handleRoadTrajectories(roadTrackList, globalPath)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -559,10 +569,6 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
super.onVisibilityChanged(changedView, visibility)
|
||||
if (visibility == VISIBLE) {
|
||||
Log.d(TAG, "onVisibilityChanged:VISIBLE!")
|
||||
val globalPath: List<Point>? = reqData
|
||||
if (!globalPath.isNullOrEmpty()) {
|
||||
requestData(globalPath as ArrayList<Point>)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -585,6 +591,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
// 注册定位监听
|
||||
CallerChassisLocationGCJ02ListenerManager.removeListener("${TAG}${this.hashCode()}")
|
||||
CallerPlanningRottingListenerManager.removeListener("${TAG}${this.hashCode()}")
|
||||
CallerAutoPilotStatusListenerManager.removeListener("${TAG}${this.hashCode()}")
|
||||
nonFrequentHandler?.looper?.quitSafely()
|
||||
nonFrequentHandler = null
|
||||
travelNetWorkModel.cancelAllRequest()
|
||||
@@ -1446,6 +1453,16 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAutopilotRouteLineId(lineId: Long) {
|
||||
super.onAutopilotRouteLineId(lineId)
|
||||
if (lineId == 0L) {
|
||||
this.globalPathResp = null
|
||||
UiThreadHandler.post {
|
||||
clearPolyline()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun drawRotting() {
|
||||
globalPathResp?.let {
|
||||
val latLngList: MutableList<MogoLatLng> = ArrayList()
|
||||
|
||||
@@ -29,7 +29,6 @@ object CallerAutopilotCarConfigListenerManager : CallerBase<IMoGoAutopilotCarCon
|
||||
@Synchronized
|
||||
fun invokeAutopilotCarConfigData(carConfigResp: MessagePad.CarConfigResp) {
|
||||
mCarConfigResp = carConfigResp
|
||||
FunctionBuildConfig.maxSpeedLimit = carConfigResp.maxSpeedLimit
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
try {
|
||||
|
||||