迁移V2X中用到的工具类

Signed-off-by: 董宏宇 <martindhy@gmail.com>
This commit is contained in:
董宏宇
2021-10-11 18:52:50 +08:00
parent 7c164a6995
commit 98c3af3ac0
72 changed files with 221 additions and 5932 deletions

View File

@@ -3,13 +3,16 @@ package com.mogo.eagle.core.function.hmi.ui.setting
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.inputmethod.InputMethodManager
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.data.obu.ObuStatusInfo
import com.mogo.eagle.core.function.api.obu.IMoGoObuStatusListener
import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.util.GsonUtils
import com.mogo.eagle.core.utilcode.util.KeyboardUtils
import kotlinx.android.synthetic.main.view_debug_setting.view.*
import java.util.*
/**
* @author xiaoyuzhou
@@ -43,6 +46,12 @@ class DebugSettingView @JvmOverloads constructor(
private fun initView() {
tvObuInfo.text = CallerObuListenerManager.getObuStatusInfo()
etObuIP.setOnClickListener {
//获取焦点
etObuIP.isFocusable = true;
etObuIP.isFocusableInTouchMode = true;
etObuIP.requestFocus();
}
}
override fun onObuStatusResponse(obuStatusInfo: ObuStatusInfo) {

View File

@@ -9,9 +9,10 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/tvTitleObu"
@@ -24,6 +25,25 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/etObuIP"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#32009688"
android:gravity="center"
android:inputType="number"
android:padding="@dimen/dp_5"
android:text="192.168.1.199"
android:textSize="@dimen/dp_34" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="@dimen/dp_5"
android:text="设置IP"
android:textSize="@dimen/dp_34" />
<TextView
android:id="@+id/tvObuInfo"
android:layout_width="match_parent"
@@ -33,7 +53,7 @@
app:layout_constraintTop_toBottomOf="@+id/tvTitleObu" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</ScrollView>