Merge remote-tracking branch 'origin/dev_robobus-m1-p-app-module_1.1.0_230112_1.1.0' into dev_robobus-m1-p-app-module_1.1.0_230112_1.1.0

This commit is contained in:
yangyakun
2023-03-09 23:13:47 +08:00
14 changed files with 85 additions and 59 deletions

View File

@@ -2,7 +2,9 @@ package com.mogo.och.bus.passenger.presenter
import androidx.lifecycle.LifecycleOwner
import com.mogo.commons.mvp.Presenter
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.och.bus.passenger.bean.PM2Station
import com.mogo.och.bus.passenger.callback.AutoPilotStatusCallback
import com.mogo.och.bus.passenger.callback.DrivingInfoCallback
@@ -36,38 +38,41 @@ class PM2DrivingPresenter(view: PM2DrivingInfoFragment?) :
}
override fun updateSpeed(speed: Int) {
UiThreadHandler.post {
CallerLogger.d(
SceneConstant.M_BUS_P + "speed = ",speed.toString()
)
ThreadUtils.runOnUiThread {
mView?.updateSpeed(speed)
}
}
override fun updatePlateNumber(carNum: String) {
UiThreadHandler.post {
ThreadUtils.runOnUiThread {
mView?.updateCarPlateNum(carNum)
}
}
override fun updateLine(lineName: String, lineDuring: String) {
UiThreadHandler.post {
ThreadUtils.runOnUiThread {
mView?.updateTaskName(lineName)
mView?.updateTaskDuringTime(lineDuring)
}
}
override fun updateRemainMT(meters: Long, timeInSecond: Long) {
UiThreadHandler.post {
ThreadUtils.runOnUiThread {
mView?.updateRemainMT(meters, timeInSecond) //米,秒
}
}
override fun changeOperationStatus(loginStatus: Boolean) {
UiThreadHandler.post {
ThreadUtils.runOnUiThread {
mView?.changeOperationStatus(loginStatus)
}
}
override fun showNoTaskView(isTrue: Boolean) {
UiThreadHandler.post {
ThreadUtils.runOnUiThread {
mView?.showNoTaskView(!isTrue)
}
if (isTrue){
@@ -76,20 +81,20 @@ class PM2DrivingPresenter(view: PM2DrivingInfoFragment?) :
}
override fun updateLineStations(stations: MutableList<PM2Station>) {
UiThreadHandler.post {
ThreadUtils.runOnUiThread {
mView?.updateLineStations(stations)
}
PM2ADASModel.INSTANCE.updateHDMapStations(stations)
}
override fun updateStationsInfo(stations: MutableList<PM2Station>, i: Int, isArrived: Boolean) {
UiThreadHandler.post {
ThreadUtils.runOnUiThread {
mView?.updateStationsInfo(stations,i,isArrived)
}
}
override fun updateAutoStatus(isOpen: Boolean) {
UiThreadHandler.post {
ThreadUtils.runOnUiThread {
mView?.updateAutoStatus(isOpen)
}
}

View File

@@ -153,7 +153,7 @@ class PM2DrivingInfoFragment :
}
private fun updateNoStationView(){
station_name_tv.setTextColor(resources.getColor(R.color.m2_no_line_tv_color))
station_name_tv.setTextColor(resources.getColor(R.color.m2_next_tv_color))
station_name_title_tv.text = resources.getString(R.string.m2_p_station_title_tv)
station_name_tv.text = resources.getString(R.string.m2_p_empty_tv)
remain_mt.text = resources.getString(R.string.m2_p_empty_remain_km_minute)
@@ -187,7 +187,7 @@ class PM2DrivingInfoFragment :
fun updateStationsInfo(stations: MutableList<PM2Station>, i: Int, isArrived: Boolean){
if (stations.size == 0) return
if (0<= i && i<stations.size){
station_name_tv.setTextColor(resources.getColor(R.color.m2_line_name_tv_color))
station_name_tv.setTextColor(resources.getColor(R.color.m2_next_tv_color))
station_name_tv.text = stations[i].name
}
if (isArrived){//到站
@@ -240,7 +240,7 @@ class PM2DrivingInfoFragment :
companion object {
private val TAG = PM2DrivingInfoFragment::class.java.simpleName
const val LOOP_TIME_TEXT = 60 * 1000L
const val LOOP_TIME_TEXT = 10 * 1000L
const val WHAT_TIME_CURRENT = 10001 //MSG_WHAT
}
}

View File

@@ -67,25 +67,18 @@ class AdvanceGSYVideoPlayer: StandardGSYVideoPlayer {
mLockScreen, INVISIBLE
)
setViewShowState(mThumbImageViewLayout, INVISIBLE)
setViewShowState(mThumbImageView, INVISIBLE)
setIsTouchWiget(false)
isFocusableInTouchMode = false
}
fun setCacheImageViewVisible() {
if (mThumbImageViewLayout.visibility == INVISIBLE){
setViewShowState(mThumbImageViewLayout, VISIBLE)
setViewShowState(mThumbImageView, VISIBLE)
}
setViewShowState(mThumbImageViewLayout, VISIBLE)
setViewShowState(mThumbImageView, VISIBLE)
}
fun setCacheImageViewGone() {
if (mThumbImageViewLayout.visibility == VISIBLE){
setViewShowState(mThumbImageViewLayout, INVISIBLE)
setViewShowState(mThumbImageView, INVISIBLE)
}
setViewShowState(mThumbImageViewLayout, INVISIBLE)
setViewShowState(mThumbImageView, INVISIBLE)
}
//失去焦点声音压低

View File

@@ -152,7 +152,7 @@ class AdvancePagerAdapter(context: Context, viewPager: ViewPager) : PagerAdapter
val videoView = (viewList[mViewPager.currentItem] as AdvanceVideoView)
UiThreadHandler.postDelayed(Runnable {
videoView.setCacheImageViewGone()
},500)
},1500)
}
}

View File

@@ -207,10 +207,22 @@ class AdvanceVideoView @JvmOverloads constructor(
}
override fun onFinished(url: String?, threadBean: ThreadBean?) {
Logger.d(ImageAndVideoRotation.TAG, "download-onFinished")
//下载完成
ThreadUtils.runOnUiThread {
startPlay()
Logger.d(ImageAndVideoRotation.TAG, "download-onFinished = $url")
if (url.equals(fileNetPath)){ //发现下载工具在断网又连网后,已完成的任务又都下载,跳转播放出现问题
//下载完成
ThreadUtils.runOnUiThread {
startPlay()
}
}else{//如果当前文件不存在再次去下载当前的
Logger.d(ImageAndVideoRotation.TAG, "download-onFinished = not current" +
",currentUrl = $fileNetPath ")
if (FileUtils.isFileExists(mVideoDirPath+downloadVideoName)){
Logger.d(ImageAndVideoRotation.TAG, "have download startPlay")
startPlay()
return
}else{
startDownLoadVideo()
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<gradient android:angle="180" android:endColor="#A2C3EB" android:centerColor="#A2CAEB" android:startColor="#00C0E1F0" />
</shape>
</item>
</selector>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#b2afc9e7" />
<solid android:color="@color/m2_button_un_auto_bg_color" />
<corners android:radius="@dimen/dp_18" />
</shape>

View File

@@ -2,8 +2,9 @@
<androidx.constraintlayout.widget.ConstraintLayout 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="match_parent">
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@drawable/bg_driving_selector">
<!-- 全览地图带站点-->
<com.mogo.eagle.core.function.view.OverMapView
@@ -23,12 +24,12 @@
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/img_drive_bg"
android:layout_width="@dimen/dp_290"
android:layout_height="@dimen/dp_140"
android:layout_marginTop="@dimen/dp_66"
android:layout_marginLeft="@dimen/dp_24"
android:layout_width="@dimen/dp_350"
android:layout_height="@dimen/dp_210"
android:layout_marginTop="@dimen/dp_36"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:scaleType="fitXY"
android:src="@drawable/img_drive_bg"/>
<!-- 行车卡片-->
@@ -40,9 +41,9 @@
android:textColor="@color/m2_p_speed_tv_color"
android:textSize="@dimen/dp_56"
android:textStyle="bold"
android:layout_marginTop="@dimen/dp_4"
android:layout_marginTop="@dimen/dp_36"
app:layout_constraintLeft_toLeftOf="@+id/img_drive_bg"
android:layout_marginLeft="@dimen/dp_24"
android:layout_marginLeft="@dimen/dp_48"
app:layout_constraintTop_toTopOf="@+id/img_drive_bg"
tools:ignore="SpUsage" />
@@ -52,6 +53,7 @@
android:layout_marginLeft="@dimen/dp_8"
android:layout_marginBottom="@dimen/dp_12"
android:textSize="@dimen/dp_18"
android:textColor="@color/m2_line_during_tv_color"
android:text="@string/m2_p_speed_unit_txt"
app:layout_constraintBottom_toBottomOf="@+id/speed_tv"
app:layout_constraintLeft_toRightOf="@+id/speed_tv" />
@@ -91,18 +93,19 @@
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/img_line_bg"
android:layout_width="@dimen/dp_290"
android:layout_height="@dimen/dp_140"
android:layout_marginTop="@dimen/dp_22"
app:layout_constraintTop_toBottomOf="@+id/img_drive_bg"
android:layout_width="@dimen/dp_350"
android:layout_height="@dimen/dp_210"
android:layout_marginTop="@dimen/dp_12"
app:layout_constraintTop_toBottomOf="@+id/auto_tv"
app:layout_constraintLeft_toLeftOf="@+id/img_drive_bg"
android:scaleType="fitXY"
android:src="@drawable/img_line_bg"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/img_line_location_bg"
android:layout_width="@dimen/dp_77"
android:layout_height="@dimen/dp_96"
android:layout_marginRight="@dimen/dp_20"
android:layout_marginRight="@dimen/dp_60"
android:scaleType="fitXY"
app:layout_constraintTop_toTopOf="@+id/img_line_bg"
app:layout_constraintBottom_toBottomOf="@+id/img_line_bg"
@@ -117,7 +120,7 @@
android:textSize="@dimen/dp_18"
app:layout_constraintTop_toTopOf="@+id/img_line_location_bg"
app:layout_constraintLeft_toLeftOf="@+id/speed_tv"
android:textColor="@color/m2_line_during_tv_color"/>
android:textColor="@color/m2_next_tv_color"/>
<com.mogo.och.common.module.wigets.MoreFocusMarqueeTextView
android:id="@+id/station_name_tv"
@@ -132,7 +135,7 @@
app:layout_constraintRight_toRightOf="@+id/img_line_location_bg"
app:layout_constraintTop_toBottomOf="@+id/station_name_title_tv"
app:layout_constraintLeft_toLeftOf="@+id/speed_tv"
android:textColor="@color/m2_no_line_tv_color"/>
android:textColor="@color/m2_next_tv_color"/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/remain_mt"
@@ -143,15 +146,16 @@
android:layout_marginTop="@dimen/dp_8"
app:layout_constraintBottom_toBottomOf="@+id/img_line_location_bg"
app:layout_constraintLeft_toLeftOf="@+id/speed_tv"
android:textColor="@color/m2_no_line_tv_color"/>
android:textColor="@color/m2_next_tv_color"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/img_time_bg"
android:layout_width="@dimen/dp_290"
android:layout_height="@dimen/dp_140"
android:layout_marginTop="@dimen/dp_22"
app:layout_constraintTop_toBottomOf="@+id/img_line_bg"
android:layout_width="@dimen/dp_350"
android:layout_height="@dimen/dp_210"
android:layout_marginTop="@dimen/dp_16"
app:layout_constraintTop_toBottomOf="@+id/remain_mt"
app:layout_constraintLeft_toLeftOf="@+id/img_drive_bg"
android:scaleType="fitXY"
android:src="@drawable/img_time_bg"/>
<View
@@ -159,7 +163,7 @@
android:layout_width="@dimen/dp_251"
android:layout_height="@dimen/dp_10"
android:background="@drawable/bg_dashed_line"
android:layout_marginTop="@dimen/dp_76"
android:layout_marginTop="@dimen/dp_104"
app:layout_constraintTop_toTopOf="@+id/img_time_bg"
app:layout_constraintStart_toStartOf="@+id/speed_tv"
app:layout_constraintEnd_toEndOf="@+id/img_line_location_bg"/>
@@ -171,10 +175,11 @@
android:textStyle="bold"
android:text="@string/m2_p_no_line"
android:textSize="@dimen/dp_22"
android:layout_marginTop="@dimen/dp_28"
app:layout_constraintTop_toTopOf="@+id/img_time_bg"
app:layout_constraintBottom_toBottomOf="@+id/dashed_line"
app:layout_constraintLeft_toLeftOf="@+id/speed_tv"
android:textColor="@color/m2_no_line_tv_color"/>
android:textColor="@color/m2_next_tv_color"/>
<com.mogo.och.common.module.wigets.MoreFocusMarqueeTextView
@@ -185,7 +190,7 @@
android:singleLine="true"
android:marqueeRepeatLimit="marquee_forever"
android:ellipsize="marquee"
android:layout_marginTop="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_56"
android:textSize="@dimen/dp_22"
app:layout_constraintRight_toRightOf="@+id/img_line_location_bg"
app:layout_constraintTop_toTopOf="@+id/img_time_bg"
@@ -223,6 +228,6 @@
android:layout_marginBottom="@dimen/dp_6"
android:textSize="@dimen/dp_16"
android:text="--"
android:textColor="@color/m2_line_during_tv_color"/>
android:textColor="@color/m2_text_time_tv_color"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -9,7 +9,7 @@
android:id="@+id/driving_fragment"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintHeight_percent="0.289"
app:layout_constraintHeight_percent="0.295"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@+id/hd_map_fragment"
app:layout_constraintLeft_toLeftOf="parent"/>
@@ -19,7 +19,7 @@
android:id="@+id/hd_map_fragment"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintHeight_percent="0.417"
app:layout_constraintHeight_percent="0.415"
app:layout_constraintTop_toBottomOf="@+id/driving_fragment"
app:layout_constraintBottom_toTopOf="@+id/video_fragment"
app:layout_constraintLeft_toLeftOf="parent"/>
@@ -31,7 +31,7 @@
android:id="@+id/video_fragment"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintHeight_percent="0.294"
app:layout_constraintHeight_percent="0.290"
app:layout_constraintTop_toBottomOf="@+id/hd_map_fragment"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"/>

View File

@@ -3,7 +3,8 @@
<color name="m2_p_white_color">#FFFFFF</color>
<color name="m2_p_speed_tv_color">#0B1E38</color>
<color name="m2_button_auto_tv_color">#2D3E5F</color>
<color name="m2_button_un_auto_bg_color">#B3C0D4ED</color>
<!-- <color name="m2_button_un_auto_bg_color">#B3C0D4ED</color>-->
<color name="m2_button_un_auto_bg_color">#BBDAFB</color>
<color name="m2_line_name_tv_color">#0B1E38</color>
<color name="m2_line_during_tv_color">#5D7199</color>
<color name="m2_current_time_tv_color">#0B1E38</color>
@@ -11,6 +12,8 @@
<color name="m2_light_tv_color">#2D3E5F</color>
<color name="m2_pnc_bg_color">#A5D8FF</color>
<color name="m2_power_tv_color">#1B2546</color>
<color name="m2_next_tv_color">#23355D</color>
<color name="m2_text_time_tv_color">#374E7F</color>
<color name="bus_traffic_light_red_color_up">#FFFFA28B</color>
<color name="bus_traffic_light_red_color_down">#FFDA1100</color>
@@ -19,5 +22,5 @@
<color name="bus_traffic_light_yellow_color_up">#FFFFE198</color>
<color name="bus_traffic_light_yellow_color_down">#FFFF9B00</color>
<color name="bus_arrived_btn_un_clickable_color">#59FFFFFF</color>
<color name="bus_dashed_line_color">#979797</color>
<color name="bus_dashed_line_color">#8895B7</color>
</resources>