[Update]自动驾驶速度输入时边框高亮

This commit is contained in:
chenfufeng
2022-03-17 17:37:49 +08:00
parent 639950ccc5
commit 6a0a7faefd
3 changed files with 9 additions and 1 deletions

View File

@@ -60,7 +60,9 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
ToastUtils.showShort("超过最大限速值60设置失败")
}
else -> {
llSpeedPosition.background = resources.getDrawable(R.drawable.pilot_speed_bg)
keyBoardUtil?.hideKeyboard()
etInputSpeed.clearFocus()
// 设置自动驾驶速度
val isSuccess = CallerAutoPilotManager.setAutoPilotSpeed(speed)
when {
@@ -94,6 +96,7 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
keyBoardUtil?.hideKeyboard()
return@setOnTouchListener true
} else {
llSpeedPosition.background = resources.getDrawable(R.drawable.pilot_speed_high_light_bg)
if (etInputSpeed.hasFocusable()) {
if (keyBoardUtil == null) {
keyBoardUtil = KeyBoardUtil(sKeyBoardView, etInputSpeed)

View File

@@ -2,5 +2,4 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#263869" />
<corners android:radius="20px" />
<stroke android:color="#5EBFFF" android:width="2px" />
</shape>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#263869" />
<corners android:radius="20px" />
<stroke android:color="#5EBFFF" android:width="2px" />
</shape>