Merge branch 'dev_robobus_network_weak_230323' of gitlab.zhidaoauto.com:SCA/L4HA/AndroidApp/MoGoEagleEye into dev_robobus_network_weak_230323
# Conflicts: # OCH/mogo-och-shuttle-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/network/BusPassengerServiceManager.kt # OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/presenter/PM2DrivingPresenter.kt # OCH/mogo-och-shuttle-passenger/src/m2/java/com/mogo/och/bus/passenger/ui/PM2DrivingInfoFragment.kt
@@ -1,10 +0,0 @@
|
||||
package com.mogo.och.bus.passenger.constant
|
||||
|
||||
/**
|
||||
* Created on 2021/12/6
|
||||
*/
|
||||
class URLConst {
|
||||
companion object {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.mogo.och.bus.constant
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
|
||||
/**
|
||||
* Created on 2021/12/6
|
||||
*/
|
||||
class URLConst {
|
||||
companion object {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.och.bus.passenger.bean.BusPassengerQueryLineRequest
|
||||
import com.mogo.och.bus.passenger.bean.BusPassengerOperationStatusResponse
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.och.common.module.biz.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.biz.network.OchCommonServiceCallback
|
||||
import com.mogo.och.common.module.biz.network.OchCommonSubscribeImpl
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.och.bus.passenger.presenter
|
||||
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import com.amap.api.maps.model.LatLng
|
||||
import com.mogo.commons.mvp.Presenter
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
@@ -82,8 +83,29 @@ class PM2DrivingPresenter(view: PM2DrivingInfoFragment?) :
|
||||
}
|
||||
|
||||
override fun updateLineStations(stations: MutableList<BusStationBean>) {
|
||||
|
||||
val stationsList = mutableListOf<LatLng>()
|
||||
val stationsListPass = mutableListOf<LatLng>()
|
||||
|
||||
for (i in stations.indices){
|
||||
val station = stations[i]
|
||||
val latLng = LatLng(station.gcjLat,station.gcjLon)
|
||||
if(station.drivingStatus==1){//行驶信息,0初始值;1已经过;2当前站;3未到站
|
||||
stationsListPass.add(latLng)
|
||||
}else if(station.drivingStatus==2){
|
||||
if(station.isLeaving){
|
||||
stationsListPass.add(latLng)
|
||||
}else{
|
||||
stationsList.add(latLng)
|
||||
}
|
||||
}else{
|
||||
stationsList.add(latLng)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ThreadUtils.runOnUiThread {
|
||||
mView?.updateLineStations(stations)
|
||||
mView?.updateLineStations(stationsList,stationsListPass)
|
||||
}
|
||||
PM2ADASModel.INSTANCE.updateHDMapStations(stations)
|
||||
}
|
||||
|
||||
@@ -2,17 +2,13 @@ package com.mogo.och.bus.passenger.ui
|
||||
|
||||
import android.graphics.BitmapFactory
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.os.Message
|
||||
import android.view.View
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.amap.api.maps.model.LatLng
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
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.function.view.SiteMarkerBean
|
||||
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
|
||||
@@ -20,7 +16,7 @@ import com.mogo.och.common.module.utils.DateTimeUtil.*
|
||||
import com.mogo.och.common.module.utils.NumberFormatUtil
|
||||
import com.mogo.och.data.bean.BusStationBean
|
||||
import kotlinx.android.synthetic.m2.p_m2_driving_info_fragment.*
|
||||
import java.lang.ref.WeakReference
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
import kotlin.math.ceil
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
@@ -54,6 +50,12 @@ class PM2DrivingInfoFragment :
|
||||
|
||||
line_name_tv.setTextColor(resources.getColor(R.color.m2_line_name_tv_color))
|
||||
station_name_tv.setTextColor(resources.getColor(R.color.m2_line_name_tv_color))
|
||||
speed_tv.setVertrial(true)
|
||||
val intArrayOf = intArrayOf(
|
||||
requireContext().resources.getColor(R.color.shuttle_color_43cefe),
|
||||
requireContext().resources.getColor(R.color.shuttle_color_1466fb)
|
||||
)
|
||||
speed_tv.setmColorList(intArrayOf)
|
||||
|
||||
// current_time_tv.onClick {
|
||||
|
||||
@@ -78,13 +80,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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,18 +130,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()
|
||||
@@ -150,18 +142,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()
|
||||
@@ -173,9 +161,10 @@ 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)
|
||||
noLineShow()
|
||||
}
|
||||
|
||||
override fun createPresenter(): PM2DrivingPresenter {
|
||||
@@ -192,16 +181,18 @@ class PM2DrivingInfoFragment :
|
||||
}
|
||||
}
|
||||
|
||||
fun updateLineStations(stations: MutableList<BusStationBean>){
|
||||
var stationsList = mutableListOf<LatLng>()
|
||||
for (i in stations.indices){
|
||||
val station = stations[i]
|
||||
var latLng = LatLng(station.gcjLat,station.gcjLon)
|
||||
stationsList.add(latLng)
|
||||
}
|
||||
fun updateLineStations(stations: MutableList<LatLng>,stationsPass: MutableList<LatLng>){
|
||||
overMapView?.let {
|
||||
it.drawSiteMarkers(stationsList,
|
||||
BitmapFactory.decodeResource(resources,R.drawable.m2_map_staton_icon),0.5f,0.9f)
|
||||
val stationsList: MutableList<SiteMarkerBean> = mutableListOf()
|
||||
val stationIcon = BitmapFactory.decodeResource(resources, R.drawable.m2_map_staton_icon)
|
||||
val stationPassIcon = BitmapFactory.decodeResource(resources, R.drawable.m2_map_staton_arrived_icon)
|
||||
for (stationsPass in stationsPass) {
|
||||
stationsList.add(SiteMarkerBean(stationsPass,stationPassIcon,0.5f,0.5f))
|
||||
}
|
||||
for (stationsPass in stations) {
|
||||
stationsList.add(SiteMarkerBean(stationsPass,stationIcon,0.5f,0.5f))
|
||||
}
|
||||
it.drawSiteMarkers(stationsList)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,10 +203,13 @@ 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)
|
||||
haveLineAndArrivedStation()
|
||||
}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)
|
||||
haveLineAndArriveingStation()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -238,13 +232,33 @@ class PM2DrivingInfoFragment :
|
||||
|
||||
val time = ceil(timeInSecond / 60f).toInt()
|
||||
|
||||
"$remainDis$disUnit | $time 分钟".also { remain_mt.text = it }
|
||||
"$remainDis$disUnit".also { tv_distance.text = it }
|
||||
"$time 分钟".also { tv_left_time.text = it }
|
||||
}
|
||||
|
||||
private fun sendUpdateTimeTask() {
|
||||
UiThreadHandler.postDelayed({
|
||||
updateCurrentTime()
|
||||
},LOOP_TIME_TEXT)
|
||||
fun noLineShow(){
|
||||
// 没有线路展示
|
||||
group_not_select_line.visibility = View.VISIBLE
|
||||
// 下一个站点
|
||||
group_stationinfo.visibility = View.GONE
|
||||
// 距离和剩余大概时间
|
||||
clg_distance_left_time.visibility = View.GONE
|
||||
// 到达站点
|
||||
tv_arrived_notice.visibility = View.GONE
|
||||
}
|
||||
// 有线路正在到站点
|
||||
fun haveLineAndArriveingStation(){
|
||||
group_not_select_line.visibility = View.GONE
|
||||
group_stationinfo.visibility = View.VISIBLE
|
||||
clg_distance_left_time.visibility = View.VISIBLE
|
||||
tv_arrived_notice.visibility = View.GONE
|
||||
}
|
||||
// 有线路到达站点
|
||||
fun haveLineAndArrivedStation(){
|
||||
group_not_select_line.visibility = View.GONE
|
||||
group_stationinfo.visibility = View.VISIBLE
|
||||
clg_distance_left_time.visibility = View.GONE
|
||||
tv_arrived_notice.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 973 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1018 B |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 818 B |
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="@dimen/dp_24" />
|
||||
<solid android:color="@color/shuttle_color_b9e7c0"/>
|
||||
</shape>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="@dimen/dp_24" />
|
||||
<solid android:color="@color/shuttle_color_99afc9e7"/>
|
||||
</shape>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:bottomLeftRadius="@dimen/dp_38"
|
||||
android:topLeftRadius="@dimen/dp_38"/>
|
||||
<gradient android:startColor="@android:color/white"
|
||||
android:endColor="@color/shuttle_color_c8efff"
|
||||
android:angle="315"
|
||||
/>
|
||||
</shape>
|
||||
@@ -2,234 +2,354 @@
|
||||
<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="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_driving_selector">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!-- 全览地图带站点-->
|
||||
<com.mogo.eagle.core.function.view.OverMapView
|
||||
android:id="@+id/overMapView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:mapStyleExtraPath="@string/m2_over_map_style_extra_path"
|
||||
app:mapStylePath="@string/m2_over_map_style_path"
|
||||
app:isClearArrived="true"
|
||||
app:resetDrawableMarginRight="@dimen/dp_34"
|
||||
app:resetDrawableMarginBottom="@dimen/dp_54"
|
||||
app:carDrawable = "@drawable/m2_map_car_icon"
|
||||
app:startPointDrawable="@drawable/m2_map_start_icon"
|
||||
app:endPointDrawable="@drawable/m2_map_end_icon"
|
||||
app:leftPadding="400"
|
||||
/>
|
||||
<!-- 全览地图带站点-->
|
||||
<com.mogo.eagle.core.function.view.OverMapView
|
||||
android:id="@+id/overMapView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
app:carDrawable="@drawable/m2_map_car_icon"
|
||||
app:endPointDrawable="@drawable/m2_map_end_icon"
|
||||
app:isClearArrived="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintWidth_percent="0.6"
|
||||
app:mapStyleExtraPath="@string/m2_over_map_style_extra_path"
|
||||
app:mapStylePath="@string/m2_over_map_style_path"
|
||||
app:resetDrawableMarginBottom="@dimen/dp_54"
|
||||
app:resetDrawableMarginRight="@dimen/dp_34"
|
||||
app:startPointDrawable="@drawable/m2_map_start_icon" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/img_drive_bg"
|
||||
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"/>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_left_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_driving_info"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintWidth_percent="0.5">
|
||||
|
||||
<!-- 行车卡片-->
|
||||
<TextView
|
||||
android:id="@+id/speed_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="--"
|
||||
android:textColor="@color/m2_p_speed_tv_color"
|
||||
android:textSize="@dimen/dp_56"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginTop="@dimen/dp_36"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/img_drive_bg"
|
||||
android:layout_marginLeft="@dimen/dp_48"
|
||||
app:layout_constraintTop_toTopOf="@+id/img_drive_bg"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
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" />
|
||||
<ImageView
|
||||
android:id="@+id/iv_line_name_container"
|
||||
android:layout_width="@dimen/dp_661"
|
||||
android:layout_height="@dimen/dp_95"
|
||||
android:src="@drawable/shuttle_p_line_name"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/auto_tv"
|
||||
android:layout_width="@dimen/dp_66"
|
||||
android:layout_height="@dimen/dp_38"
|
||||
android:background="@drawable/bg_p_m2_auto"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:text="@string/m2_p_auto_tv"
|
||||
android:textSize="@dimen/dp_18"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/m2_button_auto_tv_color"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/speed_tv"
|
||||
app:layout_constraintTop_toBottomOf="@+id/speed_tv" />
|
||||
<ImageView
|
||||
android:id="@+id/iv_line_icon"
|
||||
android:layout_width="@dimen/dp_26"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
android:layout_marginEnd="@dimen/dp_14"
|
||||
android:src="@drawable/shuttle_p_line_tile"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/line_name_tv"
|
||||
app:layout_constraintEnd_toStartOf="@+id/line_name_tv"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_line_name_container"
|
||||
app:layout_constraintTop_toTopOf="@+id/line_name_tv" />
|
||||
|
||||
<!-- 转向灯 IMoGoChassisLamplightListener-->
|
||||
<com.mogo.och.bus.passenger.ui.widget.M2TurnLightView
|
||||
android:id="@+id/turn_light_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
app:layout_constraintLeft_toRightOf="@+id/auto_tv"
|
||||
app:layout_constraintTop_toTopOf="@+id/auto_tv"
|
||||
app:visible="true"
|
||||
app:day_light_mode="true"/>
|
||||
|
||||
<!-- 红绿灯-->
|
||||
<com.mogo.och.bus.passenger.ui.widget.M2PTrafficLightView
|
||||
android:id="@+id/traffic_light_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
app:layout_constraintLeft_toRightOf="@+id/turn_light_view"
|
||||
app:layout_constraintTop_toTopOf="@+id/auto_tv" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/img_line_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_60"
|
||||
android:scaleType="fitXY"
|
||||
app:layout_constraintTop_toTopOf="@+id/img_line_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/img_line_bg"
|
||||
app:layout_constraintRight_toRightOf="@+id/img_line_bg"
|
||||
android:src="@drawable/m2_line_location_bg"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/station_name_title_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/m2_p_station_title_tv"
|
||||
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_next_tv_color"/>
|
||||
|
||||
<com.mogo.och.common.module.wigets.MarqueeTextView
|
||||
android:id="@+id/station_name_tv"
|
||||
android:layout_width="@dimen/dp_240"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
app:customGap="0.2"
|
||||
app:useCustomGap="true"
|
||||
android:text="@string/m2_p_empty_tv"
|
||||
android:textSize="@dimen/dp_22"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
app:layout_constraintTop_toBottomOf="@+id/station_name_title_tv"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/speed_tv"
|
||||
android:textColor="@color/m2_line_name_tv_color"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/remain_mt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/m2_p_empty_remain_km_minute"
|
||||
android:textSize="@dimen/dp_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_next_tv_color"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/img_time_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
|
||||
android:id="@+id/dashed_line"
|
||||
android:layout_width="@dimen/dp_251"
|
||||
android:layout_height="@dimen/dp_10"
|
||||
android:background="@drawable/bg_dashed_line"
|
||||
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"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/no_line_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
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_next_tv_color"/>
|
||||
<com.mogo.och.common.module.wigets.MarqueeTextView
|
||||
android:id="@+id/line_name_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_24"
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:maxWidth="@dimen/dp_600"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/m2_line_name_tv_color"
|
||||
android:textSize="@dimen/dp_26"
|
||||
android:textStyle="bold"
|
||||
app:customGap="0.2"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_line_name_container"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_line_icon"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_line_name_container"
|
||||
app:useCustomGap="true" />
|
||||
|
||||
|
||||
<com.mogo.och.common.module.wigets.MarqueeTextView
|
||||
android:id="@+id/line_name_tv"
|
||||
android:layout_width="@dimen/dp_240"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
app:customGap="0.2"
|
||||
app:useCustomGap="true"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:textSize="@dimen/dp_22"
|
||||
app:layout_constraintTop_toTopOf="@+id/img_time_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/speed_tv"
|
||||
android:textColor="@color/m2_line_name_tv_color"/>
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/group_not_select_line"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="visible"
|
||||
app:constraint_referenced_ids="aciv_not_select_line,m2_p_not_select_line_content" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/line_during_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:textSize="@dimen/dp_16"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/line_name_tv"
|
||||
app:layout_constraintTop_toBottomOf="@+id/line_name_tv"
|
||||
android:textColor="@color/m2_line_during_tv_color"/>
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_not_select_line"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_105"
|
||||
app:layout_constraintStart_toStartOf="@+id/m2_p_not_select_line_content"
|
||||
app:layout_constraintEnd_toEndOf="@+id/m2_p_not_select_line_content"
|
||||
app:layout_constraintBottom_toTopOf="@+id/m2_p_not_select_line_content"
|
||||
android:layout_marginBottom="@dimen/dp_14"
|
||||
android:src="@drawable/shuttle_p_line_noselect" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/current_time_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp_36"
|
||||
android:textStyle="bold"
|
||||
android:text="--"
|
||||
app:layout_constraintTop_toBottomOf="@+id/dashed_line"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/speed_tv"
|
||||
android:textColor="@color/m2_current_time_tv_color"/>
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/m2_p_not_select_line_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/m2_p_not_select_line_content"
|
||||
android:textColor="@color/m2_line_during_tv_color"
|
||||
android:textSize="@dimen/dp_18"
|
||||
android:layout_marginBottom="@dimen/dp_43"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/cl_left_container"
|
||||
app:layout_constraintBottom_toTopOf="@+id/aciv_speed_time_bg"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/current_weekday_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
app:layout_constraintLeft_toRightOf="@+id/current_time_tv"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/current_time_tv"
|
||||
android:layout_marginBottom="@dimen/dp_6"
|
||||
android:textSize="@dimen/dp_16"
|
||||
android:text="--"
|
||||
android:textColor="@color/m2_text_time_tv_color"/>
|
||||
<!-- region 站点信息 -->
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/group_stationinfo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="bg_distance_lefttime,bg_distance_lefttime_split,tv_distance,tv_left_time,tv_next_station_title,station_name_tv" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_next_station_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_50"
|
||||
android:layout_marginTop="@dimen/dp_96"
|
||||
android:text="@string/shuttle_p_next_station_title"
|
||||
android:textColor="@color/shuttle_color_203555"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.mogo.och.common.module.wigets.MarqueeTextView
|
||||
android:id="@+id/station_name_tv"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_18"
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:gravity="left"
|
||||
android:singleLine="true"
|
||||
android:text="@string/m2_p_empty_tv"
|
||||
android:textColor="@color/shuttle_color_17417B"
|
||||
android:textSize="@dimen/dp_34"
|
||||
android:textStyle="bold"
|
||||
app:customGap="0.2"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_next_station_title"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_next_station_title"
|
||||
app:layout_constraintEnd_toEndOf="@+id/cl_left_container"
|
||||
app:useCustomGap="true" />
|
||||
|
||||
<!-- region 到下一站距离和时间 -->
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/clg_distance_left_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="bg_distance_lefttime,bg_distance_lefttime_split,tv_distance,tv_left_time" />
|
||||
|
||||
<View
|
||||
android:id="@+id/bg_distance_lefttime"
|
||||
android:layout_width="@dimen/dp_182"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:layout_marginTop="@dimen/dp_22"
|
||||
android:background="@drawable/bg_driving_distance_lefttime"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_next_station_title"
|
||||
app:layout_constraintTop_toBottomOf="@+id/station_name_tv" />
|
||||
|
||||
<View
|
||||
android:id="@+id/bg_distance_lefttime_split"
|
||||
android:layout_width="@dimen/dp_1"
|
||||
android:layout_height="@dimen/dp_23"
|
||||
android:background="@color/shuttle_color_6617417B"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/bg_distance_lefttime"
|
||||
app:layout_constraintEnd_toEndOf="@+id/bg_distance_lefttime"
|
||||
app:layout_constraintStart_toStartOf="@+id/bg_distance_lefttime"
|
||||
app:layout_constraintTop_toTopOf="@+id/bg_distance_lefttime" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_distance"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="--"
|
||||
android:textColor="@color/shuttle_color_2d3e5f"
|
||||
android:textSize="@dimen/dp_20"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/bg_distance_lefttime"
|
||||
app:layout_constraintEnd_toStartOf="@+id/bg_distance_lefttime_split"
|
||||
app:layout_constraintStart_toStartOf="@+id/bg_distance_lefttime"
|
||||
app:layout_constraintTop_toTopOf="@+id/bg_distance_lefttime" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_left_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="--"
|
||||
android:textColor="@color/shuttle_color_2d3e5f"
|
||||
android:textSize="@dimen/dp_20"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/bg_distance_lefttime"
|
||||
app:layout_constraintEnd_toEndOf="@+id/bg_distance_lefttime"
|
||||
app:layout_constraintStart_toEndOf="@+id/bg_distance_lefttime_split"
|
||||
app:layout_constraintTop_toTopOf="@+id/bg_distance_lefttime" />
|
||||
|
||||
<!-- endregion -->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_arrived_notice"
|
||||
android:layout_width="@dimen/dp_147"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:background="@drawable/bg_driving_arrived_notice"
|
||||
android:gravity="center"
|
||||
android:text="@string/m2_p_arrived_station_title"
|
||||
android:textColor="@color/shuttle_color_1f860d"
|
||||
android:layout_marginTop="@dimen/dp_22"
|
||||
android:textSize="@dimen/dp_18"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_next_station_title"
|
||||
app:layout_constraintTop_toBottomOf="@+id/station_name_tv" />
|
||||
|
||||
<!-- endregion -->
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_speed_time_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_181"
|
||||
android:src="@drawable/shuttle_p_card_split"
|
||||
app:layout_constraintEnd_toEndOf="@+id/cl_left_container"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
|
||||
<!-- 行车卡片-->
|
||||
<com.mogo.och.common.module.wigets.OCHGradientTextView
|
||||
android:id="@+id/speed_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_50"
|
||||
android:layout_marginTop="@dimen/dp_27"
|
||||
android:text="60"
|
||||
android:textColor="@color/m2_p_speed_tv_color"
|
||||
android:textSize="@dimen/dp_60"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="@+id/aciv_speed_time_bg"
|
||||
app:layout_constraintTop_toTopOf="@+id/aciv_speed_time_bg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_speed_unit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_8"
|
||||
android:text="@string/m2_p_speed_unit_txt"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/speed_tv"
|
||||
android:textColor="@color/m2_line_during_tv_color"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/speed_tv"
|
||||
android:textSize="@dimen/dp_18"
|
||||
app:layout_constraintStart_toEndOf="@+id/speed_tv" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/auto_tv"
|
||||
android:layout_width="@dimen/dp_66"
|
||||
android:layout_height="@dimen/dp_38"
|
||||
android:layout_marginTop="@dimen/dp_21"
|
||||
android:background="@drawable/bg_p_m2_auto"
|
||||
android:gravity="center"
|
||||
android:text="@string/m2_p_auto_tv"
|
||||
android:textColor="@color/m2_button_auto_tv_color"
|
||||
android:layout_marginBottom="@dimen/dp_34"
|
||||
android:textSize="@dimen/dp_18"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/speed_tv"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<!-- 转向灯 IMoGoChassisLamplightListener-->
|
||||
<com.mogo.och.bus.passenger.ui.widget.M2TurnLightView
|
||||
android:id="@+id/turn_light_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
app:day_light_mode="true"
|
||||
app:layout_constraintLeft_toRightOf="@+id/auto_tv"
|
||||
app:layout_constraintTop_toTopOf="@+id/auto_tv"
|
||||
app:visible="true" />
|
||||
|
||||
<!-- 红绿灯-->
|
||||
<!-- <com.mogo.och.bus.passenger.ui.widget.M2PTrafficLightView-->
|
||||
<!-- android:id="@+id/traffic_light_view"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="@dimen/dp_12"-->
|
||||
<!-- app:layout_constraintLeft_toRightOf="@+id/turn_light_view"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="@+id/auto_tv" />-->
|
||||
|
||||
<!-- 被删除的 -->
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/line_during_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:textColor="@color/m2_line_during_tv_color"
|
||||
android:textSize="@dimen/dp_16"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/line_name_tv"
|
||||
app:layout_constraintTop_toBottomOf="@+id/line_name_tv" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_split"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
app:layout_constraintTop_toTopOf="@+id/aciv_speed_time_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/turn_light_view"
|
||||
app:layout_constraintStart_toStartOf="@+id/aciv_speed_time_bg"
|
||||
app:layout_constraintEnd_toEndOf="@+id/aciv_speed_time_bg"
|
||||
android:background="@color/shuttle_color_6617417B"
|
||||
android:layout_width="@dimen/dp_1"
|
||||
android:layout_height="0dp"/>
|
||||
|
||||
<TextClock
|
||||
android:layout_marginStart="@dimen/dp_21"
|
||||
android:id="@+id/viewTextClockHouerMin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:format12Hour="HH:mm"
|
||||
android:format24Hour="HH:mm"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="@dimen/dp_25"
|
||||
app:layout_constraintTop_toTopOf="@+id/aciv_speed_time_bg"
|
||||
app:layout_constraintStart_toEndOf="@+id/view_split"
|
||||
android:layout_marginEnd="@dimen/dp_90"
|
||||
android:textColor="@color/shuttle_color_17417B"
|
||||
android:includeFontPadding="false"
|
||||
android:textSize="@dimen/dp_46" />
|
||||
|
||||
<TextClock
|
||||
android:layout_marginStart="@dimen/dp_21"
|
||||
android:id="@+id/viewTextClockDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:format12Hour="yyyy年MM月dd日"
|
||||
android:format24Hour="yyyy年MM月dd日"
|
||||
android:gravity="center"
|
||||
app:layout_constraintBottom_toTopOf="@+id/viewTextClockWeek"
|
||||
app:layout_constraintStart_toEndOf="@+id/view_split"
|
||||
android:layout_marginEnd="@dimen/dp_90"
|
||||
android:textColor="@color/shuttle_color_17417B"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:includeFontPadding="false"
|
||||
android:textSize="@dimen/dp_18" />
|
||||
|
||||
|
||||
<TextClock
|
||||
android:layout_marginStart="@dimen/dp_21"
|
||||
android:id="@+id/viewTextClockWeek"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:format12Hour="EEEE"
|
||||
android:format24Hour="EEEE"
|
||||
android:gravity="center"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_split"
|
||||
app:layout_constraintStart_toEndOf="@+id/view_split"
|
||||
android:layout_marginEnd="@dimen/dp_90"
|
||||
android:textColor="@color/shuttle_color_17417B"
|
||||
android:includeFontPadding="false"
|
||||
android:textSize="@dimen/dp_18" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -2,28 +2,48 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@android:color/white"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!-- 行车卡片--><!-- 全览地图带站点-->
|
||||
<FrameLayout
|
||||
android:id="@+id/driving_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintHeight_percent="0.295"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/hd_map_fragment"
|
||||
app:layout_constraintLeft_toLeftOf="parent"/>
|
||||
|
||||
<!-- 高精地图-->
|
||||
<FrameLayout
|
||||
android:id="@+id/hd_map_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintHeight_percent="0.415"
|
||||
app:layout_constraintTop_toBottomOf="@+id/driving_fragment"
|
||||
app:layout_constraintBottom_toTopOf="@+id/video_fragment"
|
||||
android:layout_height="1396dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"/>
|
||||
|
||||
<com.mogo.och.common.module.wigets.OCHBorderShadowLayout
|
||||
android:id="@+id/och_shadow_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_520"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_61"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
app:blurRadius="@dimen/dp_20"
|
||||
app:shadowColor="#80000000"
|
||||
app:shadowRadius="@dimen/dp_38"
|
||||
app:shadow_position="outer"
|
||||
app:xOffset="0dp"
|
||||
app:yOffset="0dp"/>
|
||||
|
||||
<!-- 行车卡片--><!-- 全览地图带站点-->
|
||||
<FrameLayout
|
||||
android:id="@+id/driving_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:layout_marginEnd="@dimen/dp_40"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_480"
|
||||
app:layout_constraintTop_toTopOf="@+id/och_shadow_layout"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/och_shadow_layout"
|
||||
app:layout_constraintEnd_toEndOf="@+id/och_shadow_layout"
|
||||
app:layout_constraintStart_toStartOf="@+id/och_shadow_layout"/>
|
||||
|
||||
|
||||
<!-- 图片或视频广告-->
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
|
||||
@@ -23,4 +23,16 @@
|
||||
<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">#8895B7</color>
|
||||
|
||||
|
||||
<color name="shuttle_color_c8efff">#C8EFFF</color>
|
||||
<color name="shuttle_color_203555">#203555</color>
|
||||
<color name="shuttle_color_99afc9e7">#99AFC9E7</color>
|
||||
<color name="shuttle_color_6617417B">#6617417B</color>
|
||||
<color name="shuttle_color_17417B">#17417B</color>
|
||||
<color name="shuttle_color_2d3e5f">#2D3E5F</color>
|
||||
<color name="shuttle_color_1f860d">#1F860D</color>
|
||||
<color name="shuttle_color_b9e7c0">#B9E7C0</color>
|
||||
<color name="shuttle_color_43cefe">#43CEFE</color>
|
||||
<color name="shuttle_color_1466fb">#1466FB</color>
|
||||
</resources>
|
||||
@@ -15,9 +15,15 @@
|
||||
<string name="m2_over_map_style_extra_path">m2_map_style_extra.data</string>
|
||||
<string name="m2_p_auto_tv">Auto</string>
|
||||
<string name="m2_p_station_title_tv">下一站:</string>
|
||||
<string name="m2_p_station_title_arrived_tv">已到站:</string>
|
||||
<string name="m2_p_station_title_arrived_tv">已到站</string>
|
||||
<string name="m2_p_empty_tv">暂无站点</string>
|
||||
<string name="m2_p_empty_remain_km_minute">—公里 | —分钟</string>
|
||||
<string name="shuttle_p_next_station_title">前方到站</string>
|
||||
<string name="m2_p_empty_remain_km">—公里</string>
|
||||
<string name="m2_p_empty_remain_minute">—分钟</string>
|
||||
<string name="m2_p_arrived_station_title">请按秩序下车</string>
|
||||
<string name="m2_p_not_select_line_content">路线加载中…</string>
|
||||
|
||||
|
||||
|
||||
</resources>
|
||||
@@ -132,7 +132,8 @@ public class BusFragment extends BaseBusTabFragment<BusFragment, BusPresenter>
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG,"changeOverview Event消息去登出");
|
||||
mPresenter.logout();
|
||||
}else if (eventLogout.getMessgae() == EventLogout.SHOW_QR_TYPE){ //显示二维码
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG,"changeOverview Event qrcode");
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG,"changeOverview Event qrcode,sn = "
|
||||
+ MoGoAiCloudClientConfig.getInstance().getSn());
|
||||
String qrUrl = String.format(FunctionBuildConfig.urlJson.getBindDriverQRUrl(),
|
||||
MoGoAiCloudClientConfig.getInstance().getSn());
|
||||
Bitmap bmQr = QRUtilsKt.createQRCodeWithPicture(
|
||||
|
||||
@@ -215,6 +215,25 @@ class OverMapView @JvmOverloads constructor(
|
||||
siteMarkerList = mAMap!!.addMarkers(markerOptionsList, false)
|
||||
}
|
||||
|
||||
@MainThread
|
||||
fun drawSiteMarkers(
|
||||
siteMarkers: List<SiteMarkerBean>?,
|
||||
) {
|
||||
if (siteMarkers.isNullOrEmpty()) return
|
||||
clearSiteMarkers()
|
||||
val markerOptionsList = ArrayList<MarkerOptions>()
|
||||
for (siteMarkerBean in siteMarkers) {
|
||||
val markerOption = MarkerOptions()
|
||||
markerOption.position(siteMarkerBean.latLng)
|
||||
markerOption.anchor(siteMarkerBean.anchorX, siteMarkerBean.anchorY)
|
||||
markerOption.icon(
|
||||
BitmapDescriptorFactory.fromBitmap(siteMarkerBean.bitmap)
|
||||
)
|
||||
markerOptionsList.add(markerOption)
|
||||
}
|
||||
siteMarkerList = mAMap!!.addMarkers(markerOptionsList, false)
|
||||
}
|
||||
|
||||
@MainThread
|
||||
fun clearSiteMarkers() {
|
||||
if (siteMarkerList != null) {
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.mogo.eagle.core.function.view
|
||||
|
||||
import android.graphics.Bitmap
|
||||
import com.amap.api.maps.model.LatLng
|
||||
|
||||
data class SiteMarkerBean(var latLng: LatLng, var bitmap: Bitmap, var anchorX: Float, var anchorY: Float)
|
||||