[乘客屏版本号]
This commit is contained in:
yangyakun
2024-03-11 10:20:01 +08:00
parent 700435f69f
commit 52bf7d9473
11 changed files with 103 additions and 54 deletions

View File

@@ -2,22 +2,19 @@ package com.mogo.och.bus.passenger.ui
import android.annotation.*
import android.content.Context
import android.graphics.Color
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.constraintlayout.widget.ConstraintLayout
import chassis.ChassisStatesOuterClass
import com.mogo.eagle.core.function.api.autopilot.IMoGoBatteryManagementSystemListener
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
import com.mogo.eagle.core.function.call.autopilot.CallerBatteryManagementSystemListenerManager
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
import com.mogo.eagle.core.utilcode.kotlin.*
import com.mogo.eagle.core.utilcode.util.ClickUtils
import com.mogo.eagle.core.utilcode.util.AppUtils
import com.mogo.och.bus.passenger.R
import kotlinx.android.synthetic.main.p_bus_view_status_bar.view.tv_bus_b1_p_version
import kotlinx.coroutines.*
import me.jessyan.autosize.utils.AutoSizeUtils
@@ -38,6 +35,8 @@ class BusPStatusBarView @JvmOverloads constructor(
setBackgroundResource(R.drawable.bg_status_bar)
isClickable = true
isFocusable = true
tv_bus_b1_p_version.text = "版本:${AppUtils.getAppVersionName()}"
}

View File

@@ -1,9 +1,11 @@
package com.mogo.och.bus.passenger.passenger.ui
import com.mogo.commons.mvp.MvpFragment
import com.mogo.eagle.core.utilcode.util.AppUtils
import com.mogo.och.bus.passenger.R
import com.mogo.och.bus.passenger.passenger.presenter.PM2Presenter
import com.mogo.och.common.module.wigets.media.MediaPlayerFragment
import kotlinx.android.synthetic.main.bus_p_m2_fragment.tv_bug_b2_p_version
/**
* @author: wangmingjun
@@ -27,7 +29,7 @@ class PM2BaseFragment :
override fun initViews() {
//横竖屏
// setScreenDirection()
tv_bug_b2_p_version.text = "版本:${AppUtils.getAppVersionName()}"
//隐藏小地图
initFragment()
}

View File

@@ -1,48 +1,57 @@
<?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:layout_width="match_parent"
android:layout_height="@dimen/dp_40"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"
android:background="@drawable/bg_status_bar"
tools:ignore="MissingDefaultResource"
android:background="@drawable/bg_status_bar">
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
<ImageView
android:id="@+id/status_bar_logo"
android:layout_width="@dimen/dp_94"
android:layout_height="@dimen/dp_25"
android:layout_marginLeft="@dimen/dp_40"
android:scaleType="fitXY"
android:src="@drawable/bus_p_status_bar_logo"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!--Wifi状态-->
<com.mogo.eagle.core.function.hmi.ui.widget.WifiStateView
android:id="@+id/wifiStateView"
android:layout_width="@dimen/dp_28"
android:layout_height="@dimen/dp_28"
app:layout_constraintTop_toTopOf="parent"
android:layout_gravity="center"
android:layout_marginStart="@dimen/dp_40"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@+id/status_bar_logo"
android:layout_gravity="center"
android:layout_marginStart="@dimen/dp_40" />
app:layout_constraintTop_toTopOf="parent" />
<!--魔方连接状态 蓝牙-->
<com.mogo.och.bus.passenger.ui.BusPBlueToothView
android:id="@+id/blueToothView"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/wifiStateView"
android:layout_width="@dimen/dp_15"
android:layout_height="@dimen/dp_22"
android:src="@drawable/bus_p_blue_tooth_open"
android:layout_gravity="center"
android:layout_marginStart="@dimen/dp_40" />
android:layout_marginStart="@dimen/dp_40"
android:src="@drawable/bus_p_blue_tooth_open"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/wifiStateView"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/status_bar_logo"
<TextView
android:id="@+id/tv_bus_b1_p_version"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:layout_marginLeft="@dimen/dp_40"
android:src="@drawable/bus_p_status_bar_logo"
android:scaleType="fitXY"
android:layout_width="@dimen/dp_94"
android:layout_height="@dimen/dp_25"/>
app:layout_constraintStart_toEndOf="@+id/blueToothView"
android:layout_marginStart="@dimen/dp_37"
android:textSize="@dimen/dp_18"
android:textColor="@color/bus_p_m2_color_17417B"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</merge>

View File

@@ -146,6 +146,17 @@
app:layout_constraintBottom_toTopOf="@+id/video_fragment"
app:layout_constraintEnd_toEndOf="parent" />
<TextView
android:id="@+id/tv_bug_b2_p_version"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/video_fragment"
android:textSize="@dimen/dp_14"
android:textColor="@color/bus_p_m2_color_80FFFFFF"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<!-- 16 9 -->
<!-- 1000 562.5 -->
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="bus_p_m2_white_color">#FFFFFF</color>
<color name="bus_p_m2_speed_tv_color">#0B1E38</color>
<color name="bus_p_m2_button_un_auto_bg_color">#BBDAFB</color>
<color name="bus_p_m2_line_name_tv_color">#0B1E38</color>
<color name="bus_p_m2_line_during_tv_color">#5D7199</color>
<color name="bus_p_m2_pnc_bg_color">#A5D8FF</color>
<color name="bus_p_m2_power_tv_color">#1B2546</color>
<color name="bus_p_m2_next_tv_color">#23355D</color>
<color name="bus_p_m2_dashed_line_color">#8895B7</color>
<color name="bus_p_m2_color_c8efff">#C8EFFF</color>
<color name="bus_p_m2_color_203555">#203555</color>
<color name="bus_p_m2_color_17417B">#17417B</color>
<color name="bus_p_m2_color_2d3e5f">#2D3E5F</color>
<color name="bus_p_m2_color_34A61F">#34A61F</color>
<color name="bus_p_m2_color_aeedb8">#AEEDB8</color>
<color name="bus_p_m2_color_43cefe">#43CEFE</color>
<color name="bus_p_m2_color_1466fb">#1466FB</color>
<color name="bus_p_m2_color_7094ad">#7094AD</color>
<color name="bus_p_m2_color_99afc9e7">#99AFC9E7</color>
<color name="bus_p_m2_color_6617417B">#6617417B</color>
</resources>

View File

@@ -1,5 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="bus_p_m2_white_color">#FFFFFF</color>
<color name="bus_p_m2_speed_tv_color">#0B1E38</color>
<color name="bus_p_m2_button_un_auto_bg_color">#BBDAFB</color>
<color name="bus_p_m2_line_name_tv_color">#0B1E38</color>
<color name="bus_p_m2_line_during_tv_color">#5D7199</color>
<color name="bus_p_m2_pnc_bg_color">#A5D8FF</color>
<color name="bus_p_m2_power_tv_color">#1B2546</color>
<color name="bus_p_m2_next_tv_color">#23355D</color>
<color name="bus_p_m2_dashed_line_color">#8895B7</color>
<color name="bus_p_m2_color_c8efff">#C8EFFF</color>
<color name="bus_p_m2_color_203555">#203555</color>
<color name="bus_p_m2_color_17417B">#17417B</color>
<color name="bus_p_m2_color_2d3e5f">#2D3E5F</color>
<color name="bus_p_m2_color_34A61F">#34A61F</color>
<color name="bus_p_m2_color_aeedb8">#AEEDB8</color>
<color name="bus_p_m2_color_43cefe">#43CEFE</color>
<color name="bus_p_m2_color_1466fb">#1466FB</color>
<color name="bus_p_m2_color_7094ad">#7094AD</color>
<color name="bus_p_m2_color_99afc9e7">#99AFC9E7</color>
<color name="bus_p_m2_color_6617417B">#6617417B</color>
<color name="bus_p_m2_color_80FFFFFF">#80FFFFFF</color>
<color name="bus_p_speed_txt_color">#5D7199</color>
<color name="bus_p_traffic_light_bg_color">#CCE9EFFC</color>
<color name="bus_p_traffic_light_bg_stroke">#C7D2E1</color>

View File

@@ -12,7 +12,9 @@ import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
import com.mogo.eagle.core.utilcode.kotlin.*
import com.mogo.eagle.core.utilcode.util.AppUtils
import com.mogo.och.shuttle.passenger.R
import kotlinx.android.synthetic.main.shuttle_p_jl_view_status_bar.view.tv_shuttle_b1_p_version
import kotlinx.coroutines.*
import me.jessyan.autosize.utils.AutoSizeUtils
@@ -33,6 +35,8 @@ class BusPStatusBarView @JvmOverloads constructor(
setBackgroundResource(R.drawable.shuttle_p_jl_bg_status_bar)
isClickable = true
isFocusable = true
tv_shuttle_b1_p_version.text = "版本:${AppUtils.getAppVersionName()}"
}

View File

@@ -1,9 +1,11 @@
package com.mogo.och.shuttle.passenger.ui
import com.mogo.commons.mvp.MvpFragment
import com.mogo.eagle.core.utilcode.util.AppUtils
import com.mogo.och.shuttle.passenger.R
import com.mogo.och.shuttle.passenger.presenter.PM2Presenter
import com.mogo.och.common.module.wigets.media.MediaPlayerFragment
import kotlinx.android.synthetic.main.shuttle_p_m2_fragment.tv_shuttle_b2_p_version
/**
@@ -28,7 +30,7 @@ class PM2BaseFragment :
override fun initViews() {
//横竖屏
// setScreenDirection()
tv_shuttle_b2_p_version.text = "版本:${AppUtils.getAppVersionName()}"
//隐藏小地图
initFragment()
}

View File

@@ -53,4 +53,15 @@
android:layout_gravity="center"
android:layout_marginStart="@dimen/dp_40"/>
<TextView
android:id="@+id/tv_shuttle_b1_p_version"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/scannerStateView"
android:layout_marginStart="@dimen/dp_37"
android:textSize="@dimen/dp_18"
android:textColor="@color/shuttle_p_m2_color_17417B"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</merge>

View File

@@ -146,6 +146,18 @@
app:layout_constraintBottom_toTopOf="@+id/video_fragment"
app:layout_constraintEnd_toEndOf="parent" />
<TextView
android:id="@+id/tv_shuttle_b2_p_version"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/video_fragment"
android:textSize="@dimen/dp_14"
android:textColor="@color/shuttle_p_m2_color_80FFFFFF"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<!-- 16 9 -->
<!-- 1000 562.5 -->
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -20,6 +20,7 @@
<color name="shuttle_p_m2_color_43cefe">#43CEFE</color>
<color name="shuttle_p_m2_color_1466fb">#1466FB</color>
<color name="shuttle_p_m2_color_7094ad">#7094AD</color>
<color name="shuttle_p_m2_color_80FFFFFF">#80FFFFFF</color>
<color name="shuttle_p_m2_color_99afc9e7">#99AFC9E7</color>
<color name="shuttle_p_m2_color_6617417B">#6617417B</color>