[Update]Bus能设置自动驾驶最大速度
This commit is contained in:
@@ -74,7 +74,8 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
|
|||||||
ToastUtils.showShort("超过最大限速值60,设置失败")
|
ToastUtils.showShort("超过最大限速值60,设置失败")
|
||||||
}
|
}
|
||||||
else -> {
|
else -> {
|
||||||
llSpeedPosition.background = resources.getDrawable(R.drawable.pilot_speed_bg)
|
llSpeedPosition.background =
|
||||||
|
resources.getDrawable(R.drawable.pilot_speed_bg)
|
||||||
keyBoardUtil?.hideKeyboard()
|
keyBoardUtil?.hideKeyboard()
|
||||||
etInputSpeed.clearFocus()
|
etInputSpeed.clearFocus()
|
||||||
// 设置自动驾驶速度
|
// 设置自动驾驶速度
|
||||||
@@ -107,13 +108,15 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
|
|||||||
etInputSpeed.setOnFocusChangeListener { v, hasFocus ->
|
etInputSpeed.setOnFocusChangeListener { v, hasFocus ->
|
||||||
when {
|
when {
|
||||||
hasFocus -> {
|
hasFocus -> {
|
||||||
llSpeedPosition.background = resources.getDrawable(R.drawable.pilot_speed_high_light_bg)
|
llSpeedPosition.background =
|
||||||
|
resources.getDrawable(R.drawable.pilot_speed_high_light_bg)
|
||||||
if (keyBoardUtil == null) {
|
if (keyBoardUtil == null) {
|
||||||
keyBoardUtil = KeyBoardUtil(sKeyBoardView, etInputSpeed)
|
keyBoardUtil = KeyBoardUtil(sKeyBoardView, etInputSpeed)
|
||||||
}
|
}
|
||||||
keyBoardUtil?.showKeyboard()
|
keyBoardUtil?.showKeyboard()
|
||||||
}
|
}
|
||||||
else -> llSpeedPosition.background = resources.getDrawable(R.drawable.pilot_speed_bg)
|
else -> llSpeedPosition.background =
|
||||||
|
resources.getDrawable(R.drawable.pilot_speed_bg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
etInputSpeed.setOnTouchListener { v, event ->
|
etInputSpeed.setOnTouchListener { v, event ->
|
||||||
@@ -150,28 +153,16 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
|
|||||||
this.clickListener = clickListener
|
this.clickListener = clickListener
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Bus不可设置自动驾驶速度,而Taxi可以
|
|
||||||
*/
|
|
||||||
private fun updateSpeedSettingViews() {
|
private fun updateSpeedSettingViews() {
|
||||||
when {
|
tvSpeedTitle.visibility = View.VISIBLE
|
||||||
AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) -> {
|
llSpeedPosition.visibility = View.VISIBLE
|
||||||
tvSpeedTitle.visibility = View.GONE
|
|
||||||
llSpeedPosition.visibility = View.GONE
|
|
||||||
}
|
|
||||||
else -> {
|
|
||||||
tvSpeedTitle.visibility = View.VISIBLE
|
|
||||||
llSpeedPosition.visibility = View.VISIBLE
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun showAdUpgradeStatus(ipcUpgradeStateInfo: IPCUpgradeStateInfo){
|
fun showAdUpgradeStatus(ipcUpgradeStateInfo: IPCUpgradeStateInfo) {
|
||||||
systemVersionView?.showAdUpgradeStatus(ipcUpgradeStateInfo)
|
systemVersionView?.showAdUpgradeStatus(ipcUpgradeStateInfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
override fun onAttachedToWindow() {
|
override fun onAttachedToWindow() {
|
||||||
super.onAttachedToWindow()
|
super.onAttachedToWindow()
|
||||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||||
|
|||||||
Reference in New Issue
Block a user