diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/PM2DrivingInfoFragment.kt b/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/PM2DrivingInfoFragment.kt index a9abc4ee54..78d9568c90 100644 --- a/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/PM2DrivingInfoFragment.kt +++ b/OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/PM2DrivingInfoFragment.kt @@ -13,12 +13,14 @@ import com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugView import com.mogo.eagle.core.utilcode.kotlin.onClick import com.mogo.eagle.core.utilcode.util.DateTimeUtils import com.mogo.eagle.core.utilcode.util.UiThreadHandler +import com.mogo.eagle.core.widget.media.video.TextureVideoViewOutlineProvider import com.mogo.och.bus.passenger.R import com.mogo.och.bus.passenger.bean.PM2Station import com.mogo.och.bus.passenger.presenter.PM2DrivingPresenter import com.mogo.och.common.module.utils.DateTimeUtil.* import com.mogo.och.common.module.utils.NumberFormatUtil import kotlinx.android.synthetic.m2.p_m2_driving_info_fragment.* +import me.jessyan.autosize.utils.AutoSizeUtils import java.lang.ref.WeakReference import kotlin.math.ceil import kotlin.math.roundToInt @@ -77,13 +79,15 @@ class PM2DrivingInfoFragment : // ) // BPRouteDataTestUtils.converToRouteData() // } - updateCurrentTime() } override fun initViews(savedInstanceState: Bundle?) { super.initViews(savedInstanceState) overMapView?.let { it.onCreateView(savedInstanceState) + val radius = AutoSizeUtils.dp2px(requireContext(), 38f) + it.outlineProvider = TextureVideoViewOutlineProvider(radius.toFloat()) + it.clipToOutline = true } } @@ -125,18 +129,6 @@ class PM2DrivingInfoFragment : line_during_tv.text = time } - private fun updateCurrentTime(){ - current_time_tv.text = formatCalendarToString( - DateTimeUtils.getCurrentDateTime(),HH_mm) - - val date = formatCalendarToString( - DateTimeUtils.getCurrentDateTime(), yy_MM_dd) - val weekDay = DateTimeUtils.getWeekDayFromCalendar1(DateTimeUtils.getCurrentDateTime()) - "$date $weekDay".also { current_weekday_tv.text = it } - - sendUpdateTimeTask() // 每10s更新一次 - } - fun changeOperationStatus(status:Boolean){ if (!status){ updateNoOrderUI() @@ -149,18 +141,14 @@ class PM2DrivingInfoFragment : private fun setLineInfoView(isShow: Boolean){ if (isShow){ - line_name_tv.visibility = View.VISIBLE - line_during_tv.visibility = View.VISIBLE - no_line_tv.visibility = View.GONE + }else{ updateNoOrderUI() } } private fun updateNoOrderUI() { - line_name_tv.visibility = View.GONE - line_during_tv.visibility = View.GONE - no_line_tv.visibility = View.VISIBLE + line_name_tv.text = resources.getString(R.string.m2_p_not_select_line_content) updateNoStationView() overMapView?.let { it.clearSiteMarkers() @@ -172,9 +160,9 @@ class PM2DrivingInfoFragment : private fun updateNoStationView(){ 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) + tv_distance.text = resources.getString(R.string.m2_p_empty_remain_km) + tv_left_time.text = resources.getString(R.string.m2_p_empty_remain_minute) } override fun createPresenter(): PM2DrivingPresenter { @@ -211,10 +199,15 @@ class PM2DrivingInfoFragment : station_name_tv.text = stations[i].name } if (isArrived){//到站 - station_name_title_tv.text = resources.getString(R.string.m2_p_station_title_arrived_tv) - remain_mt.text = resources.getString(R.string.m2_p_empty_remain_km_minute) + tv_distance.text = resources.getString(R.string.m2_p_empty_remain_km) + tv_left_time.text = resources.getString(R.string.m2_p_empty_remain_minute) + tv_next_station_title.text = resources.getString(R.string.m2_p_station_title_arrived_tv) + tv_arrived_notice.visibility = View.VISIBLE + clg_distance_left_time.visibility = View.GONE }else{ //前往目的地中 - station_name_title_tv.text = resources.getString(R.string.m2_p_station_title_tv) + tv_next_station_title.text = resources.getString(R.string.shuttle_p_next_station_title) + tv_arrived_notice.visibility = View.GONE + clg_distance_left_time.visibility = View.VISIBLE } } @@ -237,13 +230,8 @@ class PM2DrivingInfoFragment : val time = ceil(timeInSecond / 60f).toInt() - "$remainDis$disUnit | $time 分钟".also { remain_mt.text = it } - } - - private fun sendUpdateTimeTask() { - UiThreadHandler.postDelayed({ - updateCurrentTime() - },LOOP_TIME_TEXT) + "$remainDis$disUnit".also { tv_distance.text = it } + "$time 分钟".also { tv_left_time.text = it } } companion object { diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/res/drawable-nodpi/shuttle_p_card_split.png b/OCH/mogo-och-shuttle-passenger/src/m2/res/drawable-nodpi/shuttle_p_card_split.png new file mode 100644 index 0000000000..6bd8fb0f60 Binary files /dev/null and b/OCH/mogo-och-shuttle-passenger/src/m2/res/drawable-nodpi/shuttle_p_card_split.png differ diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/res/drawable-nodpi/shuttle_p_line_name.png b/OCH/mogo-och-shuttle-passenger/src/m2/res/drawable-nodpi/shuttle_p_line_name.png new file mode 100644 index 0000000000..e395ed8419 Binary files /dev/null and b/OCH/mogo-och-shuttle-passenger/src/m2/res/drawable-nodpi/shuttle_p_line_name.png differ diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/res/drawable-nodpi/shuttle_p_line_noselect.png b/OCH/mogo-och-shuttle-passenger/src/m2/res/drawable-nodpi/shuttle_p_line_noselect.png new file mode 100644 index 0000000000..bda5e1d105 Binary files /dev/null and b/OCH/mogo-och-shuttle-passenger/src/m2/res/drawable-nodpi/shuttle_p_line_noselect.png differ diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/res/drawable-nodpi/shuttle_p_line_tile.png b/OCH/mogo-och-shuttle-passenger/src/m2/res/drawable-nodpi/shuttle_p_line_tile.png new file mode 100644 index 0000000000..29914bfc8c Binary files /dev/null and b/OCH/mogo-och-shuttle-passenger/src/m2/res/drawable-nodpi/shuttle_p_line_tile.png differ diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/res/drawable/bg_driving_arrived_notice.xml b/OCH/mogo-och-shuttle-passenger/src/m2/res/drawable/bg_driving_arrived_notice.xml new file mode 100644 index 0000000000..30d343900d --- /dev/null +++ b/OCH/mogo-och-shuttle-passenger/src/m2/res/drawable/bg_driving_arrived_notice.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/res/drawable/bg_driving_distance_lefttime.xml b/OCH/mogo-och-shuttle-passenger/src/m2/res/drawable/bg_driving_distance_lefttime.xml new file mode 100644 index 0000000000..a7412494a3 --- /dev/null +++ b/OCH/mogo-och-shuttle-passenger/src/m2/res/drawable/bg_driving_distance_lefttime.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/res/drawable/bg_driving_info.xml b/OCH/mogo-och-shuttle-passenger/src/m2/res/drawable/bg_driving_info.xml new file mode 100644 index 0000000000..788c472187 --- /dev/null +++ b/OCH/mogo-och-shuttle-passenger/src/m2/res/drawable/bg_driving_info.xml @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/res/layout/p_m2_driving_info_fragment.xml b/OCH/mogo-och-shuttle-passenger/src/m2/res/layout/p_m2_driving_info_fragment.xml index eb8eed4b1f..dfd6973a86 100644 --- a/OCH/mogo-och-shuttle-passenger/src/m2/res/layout/p_m2_driving_info_fragment.xml +++ b/OCH/mogo-och-shuttle-passenger/src/m2/res/layout/p_m2_driving_info_fragment.xml @@ -2,234 +2,351 @@ + android:layout_width="match_parent" + android:layout_height="match_parent"> - - + + - + - - + - + - + - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/res/layout/p_m2_fragment.xml b/OCH/mogo-och-shuttle-passenger/src/m2/res/layout/p_m2_fragment.xml index c4a848c6bd..a6316b0b7c 100644 --- a/OCH/mogo-och-shuttle-passenger/src/m2/res/layout/p_m2_fragment.xml +++ b/OCH/mogo-och-shuttle-passenger/src/m2/res/layout/p_m2_fragment.xml @@ -2,28 +2,48 @@ - - - + + + + + @@ -31,8 +51,10 @@ android:id="@+id/video_fragment" android:layout_width="match_parent" android:layout_height="0dp" + android:paddingBottom="@dimen/dp_40" + android:paddingEnd="@dimen/dp_40" + android:paddingStart="@dimen/dp_40" app:layout_constraintHeight_percent="0.290" - app:layout_constraintTop_toBottomOf="@+id/hd_map_fragment" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent"/> diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/res/values/colors.xml b/OCH/mogo-och-shuttle-passenger/src/m2/res/values/colors.xml index c752b78caf..a0f8207330 100644 --- a/OCH/mogo-och-shuttle-passenger/src/m2/res/values/colors.xml +++ b/OCH/mogo-och-shuttle-passenger/src/m2/res/values/colors.xml @@ -23,4 +23,14 @@ #FFFF9B00 #59FFFFFF #8895B7 + + + #C8EFFF + #203555 + #99AFC9E7 + #6617417B + #17417B + #2D3E5F + #1F860D + #B9E7C0 \ No newline at end of file diff --git a/OCH/mogo-och-shuttle-passenger/src/m2/res/values/strings.xml b/OCH/mogo-och-shuttle-passenger/src/m2/res/values/strings.xml index e113235a28..9f2f2d5094 100644 --- a/OCH/mogo-och-shuttle-passenger/src/m2/res/values/strings.xml +++ b/OCH/mogo-och-shuttle-passenger/src/m2/res/values/strings.xml @@ -15,9 +15,15 @@ m2_map_style_extra.data Auto 下一站: - 已到站: + 已到站 暂无站点 —公里 | —分钟 + 前方到站 + —公里 + —分钟 + 请按秩序下车 + 路线加载中… + \ No newline at end of file