[dev_arch_opt_3.0]版本号显示View改为两行显示

This commit is contained in:
xuxinchao
2023-02-28 17:12:38 +08:00
parent 5a8e5e3934
commit c94043344e
2 changed files with 8 additions and 17 deletions

View File

@@ -6,13 +6,11 @@ import android.util.AttributeSet
import android.view.LayoutInflater
import android.widget.LinearLayout
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.main.AppListActivity
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.util.ActivityUtils
import com.mogo.eagle.core.utilcode.util.AppUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
@@ -41,11 +39,8 @@ class VersionNameView @JvmOverloads constructor(
}
private fun initView(){
//版本水印只在司机端展示
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
showCurrentPadVersion()
showCurrentMapVersion()
}
showCurrentPadVersion()
showCurrentMapVersion()
// 调试入口应对M1、M2没有安装Launcher的情况
setOnLongClickListener {
@@ -72,7 +67,7 @@ class VersionNameView @JvmOverloads constructor(
UiThreadHandler.post {
tvMapVersionName?.let {
if (!dockerVersion.isNullOrEmpty()) {
it.text = " ; MAP:${dockerVersion}"
it.text = "MAP:${dockerVersion}"
}
}
}
@@ -80,18 +75,12 @@ class VersionNameView @JvmOverloads constructor(
override fun onAttachedToWindow() {
super.onAttachedToWindow()
//版本水印只在司机端展示
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
}
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
//版本水印只在司机端展示
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
CallerAutoPilotStatusListenerManager.removeListener(TAG)
}
CallerAutoPilotStatusListenerManager.removeListener(TAG)
}
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {

View File

@@ -2,7 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:orientation="vertical">
<TextView
android:id="@+id/tvAppVersionName"
@@ -10,6 +10,7 @@
android:layout_height="wrap_content"
android:textSize="@dimen/dp_28"
android:textColor="#FFBEC6EF"
android:layout_gravity="center_horizontal"
/>
<TextView
@@ -18,6 +19,7 @@
android:layout_height="wrap_content"
android:textSize="@dimen/dp_28"
android:textColor="#FFBEC6EF"
android:layout_gravity="center_horizontal"
/>
</LinearLayout>