From ec7ef2161d58335260d421119c76a8e44a07fc94 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Thu, 16 Feb 2023 07:56:44 +0800 Subject: [PATCH] =?UTF-8?q?[1.0.0]=20[m1]=20[=E6=96=87=E6=A1=88=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E3=80=81=E6=97=B6=E9=97=B4=E6=98=BE=E7=A4=BA=E6=97=B6?= =?UTF-8?q?=E5=88=86=E7=A7=92]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/BusPassengerFunctionSoftFragment.kt | 5 +++++ .../och/bus/passenger/view/ConsultVideoPlayer.kt | 4 ++-- .../core/utilcode/util/TimeTransformUtils.java | 14 ++++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt index dcd51a20d0..98e144f6b3 100644 --- a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt @@ -85,6 +85,11 @@ class BusPassengerFunctionSoftFragment : if(!buttonView.isPressed){ return@setOnCheckedChangeListener } + if(isChecked){ + tv_aircondition_switch.setText("关闭空调") + }else{ + tv_aircondition_switch.setText("打开空调") + } SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.bus_di) if (rg_setting_pattern.checkedRadioButtonId == R.id.rb_pattern_heating) { if (isChecked) {// 打开暖风机 diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/view/ConsultVideoPlayer.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/view/ConsultVideoPlayer.kt index d351df0d90..f011f40ae5 100644 --- a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/view/ConsultVideoPlayer.kt +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/view/ConsultVideoPlayer.kt @@ -184,8 +184,8 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer { ) { super.setProgressAndTime(progress, secProgress, currentTime, totalTime, forceChange) //时间显示 - currentTimeTextView.text = TimeTransformUtils.stringForTime(currentTime) - totalTimeTextView.text = TimeTransformUtils.stringForTime(totalTime) + currentTimeTextView.text = TimeTransformUtils.stringForTimeWithHours(currentTime) + totalTimeTextView.text = TimeTransformUtils.stringForTimeWithHours(totalTime) if(currentTime>=totalTime-3000){// this.currentTime = -1 }else{ diff --git a/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/util/TimeTransformUtils.java b/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/util/TimeTransformUtils.java index 6c2848c71a..c7f2ce6ced 100644 --- a/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/util/TimeTransformUtils.java +++ b/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/util/TimeTransformUtils.java @@ -26,5 +26,19 @@ public final class TimeTransformUtils { } } + public static String stringForTimeWithHours(int timeMs) { + if (timeMs <= 0 || timeMs >= 24 * 60 * 60 * 1000) { + return "00:00"; + } + int totalSeconds = timeMs / 1000; + int seconds = totalSeconds % 60; + int minutes = (totalSeconds / 60) % 60; + int hours = totalSeconds / 3600; + StringBuilder stringBuilder = new StringBuilder(); + Formatter mFormatter = new Formatter(stringBuilder, Locale.getDefault()); + return mFormatter.format("%d:%02d:%02d", hours, minutes, seconds).toString(); + + } + }