[8.1.0]
[fea] [m2] [整体背景 速度 转向灯 自驾状态]
@@ -18,6 +18,7 @@
|
||||
|
||||
<color name="common_80000000">#80000000</color>
|
||||
<color name="common_80FFFFFF">#80FFFFFF</color>
|
||||
<color name="common_FFFFFF">#FFFFFF</color>
|
||||
<color name="common_1466FB">#1466FB</color>
|
||||
<color name="common_e0efff">#E0EFFF</color>
|
||||
<color name="common_b8c2d7">#B8C2D7</color>
|
||||
@@ -42,6 +43,7 @@
|
||||
<color name="common_FF4E41">#FF4E41</color>
|
||||
<color name="common_B3FFFFFF">#B3FFFFFF</color>
|
||||
<color name="common_cccccc">#CCCCCC</color>
|
||||
<color name="common_284F7E">#284F7E</color>
|
||||
<color name="common_f7151d41">#F7151D41</color>
|
||||
<color name="common_3B3D44">#3B3D44</color>
|
||||
<color name="common_2E323A">#2E323A</color>
|
||||
|
||||
@@ -37,11 +37,11 @@ class BaseBusPassengerPresenter(view: BusPassengerRouteFragment?) :
|
||||
}
|
||||
|
||||
private fun initListeners() {
|
||||
CommonModel.setRouteLineInfoCallback(this)
|
||||
CommonModel.setRouteLineInfoCallback(TAG,this)
|
||||
}
|
||||
|
||||
private fun releaseListeners() {
|
||||
CommonModel.setRouteLineInfoCallback(null)
|
||||
CommonModel.setRouteLineInfoCallback(TAG,null)
|
||||
}
|
||||
|
||||
override fun updateSpeed(location: Int) {
|
||||
|
||||
@@ -1,26 +1,36 @@
|
||||
package com.mogo.och.shuttle.weaknet.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.util.ThreadUtils
|
||||
import com.mogo.och.data.bean.BusStationBean
|
||||
import com.mogo.och.shuttle.weaknet.passenger.callback.ADASCallback
|
||||
import com.mogo.och.shuttle.weaknet.passenger.callback.ICommonCallback
|
||||
import com.mogo.och.shuttle.weaknet.passenger.constant.M2Const.Companion.M2_MAP_STATION_MAKER
|
||||
import com.mogo.och.shuttle.weaknet.passenger.model.CommonModel
|
||||
import com.mogo.och.shuttle.weaknet.passenger.model.PM2ADASModel
|
||||
import com.mogo.och.shuttle.weaknet.passenger.ui.PM2HPMapFragment
|
||||
|
||||
class PM2ADASPresenter(view: PM2HPMapFragment?) :
|
||||
Presenter<PM2HPMapFragment?>(view), ADASCallback {
|
||||
Presenter<PM2HPMapFragment?>(view), ADASCallback, ICommonCallback {
|
||||
|
||||
private val TAG = "PM2ADASPresenter"
|
||||
|
||||
init {
|
||||
PM2ADASModel.INSTANCE.init(context)
|
||||
initListener()
|
||||
PM2ADASModel.INSTANCE.init(context)
|
||||
initListener()
|
||||
}
|
||||
|
||||
private fun initListener() {
|
||||
PM2ADASModel.INSTANCE.setAdasCallback(this)
|
||||
CommonModel.setRouteLineInfoCallback(TAG, this)
|
||||
}
|
||||
|
||||
private fun removeListener() {
|
||||
PM2ADASModel.INSTANCE.setAdasCallback(null)
|
||||
CommonModel.setRouteLineInfoCallback(TAG,null)
|
||||
CommonModel.releaseListeners()
|
||||
}
|
||||
|
||||
override fun onDestroy(owner: LifecycleOwner) {
|
||||
@@ -29,12 +39,63 @@ class PM2ADASPresenter(view: PM2HPMapFragment?) :
|
||||
}
|
||||
|
||||
override fun updateHDMapStations(stations: MutableList<MutableList<Double>>) {
|
||||
for (i in stations.indices){
|
||||
mView?.setMapMaker(M2_MAP_STATION_MAKER+i,stations[i])
|
||||
for (i in stations.indices) {
|
||||
mView?.setMapMaker(M2_MAP_STATION_MAKER + i, stations[i])
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun clearCustomPolyline() {
|
||||
ThreadUtils.runOnUiThread {
|
||||
mView?.clearCustomPolyline()
|
||||
}
|
||||
}
|
||||
|
||||
override fun showNoTaskView(isTrue: Boolean) {
|
||||
super.showNoTaskView(isTrue)
|
||||
ThreadUtils.runOnUiThread {
|
||||
mView?.showNoTaskView(!isTrue)
|
||||
}
|
||||
}
|
||||
|
||||
override fun updateLineStations(stations: MutableList<BusStationBean>) {
|
||||
|
||||
val stationsList = mutableListOf<LatLng>()
|
||||
val stationsListPass = mutableListOf<LatLng>()
|
||||
var startStation: LatLng? = null
|
||||
var endStation: LatLng? = null
|
||||
|
||||
for (i in stations.indices) {
|
||||
val station = stations[i]
|
||||
val latLng = LatLng(station.gcjLat, station.gcjLon)
|
||||
if (i == 0) {
|
||||
startStation = latLng
|
||||
continue
|
||||
}
|
||||
if (i == stations.size - 1) {
|
||||
endStation = latLng
|
||||
continue
|
||||
}
|
||||
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(stationsList, stationsListPass, startStation, endStation)
|
||||
}
|
||||
PM2ADASModel.INSTANCE.updateHDMapStations(stations)
|
||||
}
|
||||
|
||||
override fun removeHDMapStations() {
|
||||
mView?.removeMapMaker(M2_MAP_STATION_MAKER)
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import androidx.lifecycle.LifecycleOwner
|
||||
import com.amap.api.maps.model.LatLng
|
||||
import com.mogo.commons.mvp.Presenter
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.och.common.module.manager.loop.BizLoopManager
|
||||
import com.mogo.och.shuttle.weaknet.passenger.model.PM2ADASModel
|
||||
import com.mogo.och.shuttle.weaknet.passenger.ui.PM2DrivingInfoFragment
|
||||
import com.mogo.och.data.bean.BusStationBean
|
||||
@@ -14,6 +15,8 @@ class PM2DrivingPresenter(view: PM2DrivingInfoFragment?) :
|
||||
Presenter<PM2DrivingInfoFragment?>(view),
|
||||
ICommonCallback {
|
||||
|
||||
private val TAG = "PM2DrivingPresenter"
|
||||
|
||||
init {
|
||||
CommonModel.init(context)
|
||||
PM2ADASModel.INSTANCE.init(context)
|
||||
@@ -27,11 +30,11 @@ class PM2DrivingPresenter(view: PM2DrivingInfoFragment?) :
|
||||
}
|
||||
|
||||
private fun initListener(){
|
||||
CommonModel.setRouteLineInfoCallback(this)
|
||||
CommonModel.setRouteLineInfoCallback(TAG,this)
|
||||
}
|
||||
|
||||
private fun destroyListener(){
|
||||
CommonModel.setRouteLineInfoCallback(null)
|
||||
CommonModel.setRouteLineInfoCallback(TAG,null)
|
||||
}
|
||||
|
||||
override fun updateSpeed(speed: Int) {
|
||||
@@ -64,43 +67,7 @@ class PM2DrivingPresenter(view: PM2DrivingInfoFragment?) :
|
||||
}
|
||||
}
|
||||
|
||||
override fun updateLineStations(stations: MutableList<BusStationBean>) {
|
||||
|
||||
val stationsList = mutableListOf<LatLng>()
|
||||
val stationsListPass = mutableListOf<LatLng>()
|
||||
var startStation: LatLng? = null
|
||||
var endStation: LatLng? = null
|
||||
|
||||
for (i in stations.indices){
|
||||
val station = stations[i]
|
||||
val latLng = LatLng(station.gcjLat,station.gcjLon)
|
||||
if(i==0){
|
||||
startStation = latLng
|
||||
continue
|
||||
}
|
||||
if(i==stations.size-1){
|
||||
endStation = latLng
|
||||
continue
|
||||
}
|
||||
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(stationsList,stationsListPass,startStation,endStation)
|
||||
}
|
||||
PM2ADASModel.INSTANCE.updateHDMapStations(stations)
|
||||
}
|
||||
|
||||
override fun updateStationsInfo(stations: MutableList<BusStationBean>, i: Int, isArrived: Boolean) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
@@ -108,14 +75,8 @@ class PM2DrivingPresenter(view: PM2DrivingInfoFragment?) :
|
||||
}
|
||||
}
|
||||
|
||||
override fun clearCustomPolyline() {
|
||||
ThreadUtils.runOnUiThread {
|
||||
mView?.clearCustomPolyline()
|
||||
}
|
||||
}
|
||||
|
||||
override fun updateAutoStatus(isOpen: Boolean) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
BizLoopManager.runInMainThread {
|
||||
mView?.updateAutoStatus(isOpen)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,36 +1,15 @@
|
||||
package com.mogo.och.shuttle.weaknet.passenger.ui
|
||||
|
||||
import android.graphics.BitmapFactory
|
||||
import android.graphics.drawable.AnimationDrawable
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.amap.api.maps.model.LatLng
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugView
|
||||
import com.mogo.eagle.core.function.view.SiteMarkerBean
|
||||
import com.mogo.eagle.core.widget.media.video.TextureVideoViewOutlineProvider
|
||||
import com.mogo.och.shuttle.weaknet.passenger.R
|
||||
import com.mogo.och.shuttle.weaknet.passenger.presenter.PM2DrivingPresenter
|
||||
import com.mogo.och.common.module.utils.NumberFormatUtil
|
||||
import com.mogo.och.common.module.utils.ResourcesUtils
|
||||
import com.mogo.och.data.bean.BusStationBean
|
||||
import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.auto_tv
|
||||
import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.clg_distance_left_time
|
||||
import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.group_not_select_line
|
||||
import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.group_stationinfo
|
||||
import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.iv_animal_list
|
||||
import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.line_name_tv
|
||||
import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.overMapView
|
||||
import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.speed_tv
|
||||
import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.station_name_tv
|
||||
import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.tv_arrived_notice
|
||||
import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.tv_distance
|
||||
import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.tv_left_time
|
||||
import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.tv_next_station_title
|
||||
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
import kotlin.math.ceil
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
@@ -41,22 +20,7 @@ import kotlin.math.roundToInt
|
||||
class PM2DrivingInfoFragment :
|
||||
MvpFragment<PM2DrivingInfoFragment?, PM2DrivingPresenter?>() {
|
||||
|
||||
private val stationIcon = BitmapFactory.decodeResource(
|
||||
AbsMogoApplication.getApp().resources,
|
||||
R.drawable.shuttle_p_m2_map_staton_icon
|
||||
)
|
||||
private val stationPassIcon = BitmapFactory.decodeResource(
|
||||
AbsMogoApplication.getApp().resources,
|
||||
R.drawable.shuttle_p_m2_map_staton_arrived_icon
|
||||
)
|
||||
private val startStationIcon = BitmapFactory.decodeResource(
|
||||
AbsMogoApplication.getApp().resources,
|
||||
R.drawable.shuttle_p_m2_map_start_icon
|
||||
)
|
||||
private val endStationIcon = BitmapFactory.decodeResource(
|
||||
AbsMogoApplication.getApp().resources,
|
||||
R.drawable.shuttle_p_m2_map_end_icon
|
||||
)
|
||||
|
||||
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
@@ -72,39 +36,25 @@ class PM2DrivingInfoFragment :
|
||||
context?.let { ToggleDebugView.toggleDebugView.toggle(it) }
|
||||
true
|
||||
}
|
||||
|
||||
line_name_tv.setTextColor(ResourcesUtils.getColor(R.color.shuttle_p_m2_line_name_tv_color))
|
||||
station_name_tv.setTextColor(ResourcesUtils.getColor(R.color.shuttle_p_m2_line_name_tv_color))
|
||||
speed_tv.setVertrial(true)
|
||||
val intArrayOf = intArrayOf(
|
||||
ResourcesUtils.getColor(R.color.shuttle_p_m2_color_43cefe),
|
||||
ResourcesUtils.getColor(R.color.shuttle_p_m2_color_1466fb),
|
||||
)
|
||||
speed_tv.setmColorList(intArrayOf)
|
||||
//
|
||||
// line_name_tv.setTextColor(ResourcesUtils.getColor(R.color.shuttle_p_m2_line_name_tv_color))
|
||||
// station_name_tv.setTextColor(ResourcesUtils.getColor(R.color.shuttle_p_m2_line_name_tv_color))
|
||||
}
|
||||
|
||||
override fun initViews(savedInstanceState: Bundle?) {
|
||||
super.initViews(savedInstanceState)
|
||||
overMapView?.let {
|
||||
it.onCreateView(savedInstanceState)
|
||||
val radius = AutoSizeUtils.dp2px(requireContext(), 16f)
|
||||
it.outlineProvider = TextureVideoViewOutlineProvider(radius.toFloat())
|
||||
it.clipToOutline = true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
overMapView?.onResume()
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
overMapView?.onPause()
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
overMapView?.onDestroy()
|
||||
mPresenter?.onDestroy(this)
|
||||
super.onDestroyView()
|
||||
}
|
||||
@@ -114,35 +64,26 @@ class PM2DrivingInfoFragment :
|
||||
}
|
||||
|
||||
fun updateTaskName(name: String) {
|
||||
line_name_tv.text = name
|
||||
//line_name_tv.text = name
|
||||
}
|
||||
|
||||
fun showNoTaskView(haveTask: Boolean) {
|
||||
setLineInfoView(haveTask)
|
||||
}
|
||||
|
||||
private fun setLineInfoView(isShow: Boolean) {
|
||||
if (!isShow) {
|
||||
if (!haveTask) {
|
||||
updateNoOrderUI()
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateNoOrderUI() {
|
||||
line_name_tv.text = resources.getString(R.string.shuttle_p_m2_not_select_line_content)
|
||||
//line_name_tv.text = resources.getString(R.string.shuttle_p_m2_not_select_line_content)
|
||||
updateNoStationView()
|
||||
overMapView?.clearSiteMarkers()
|
||||
clearCustomPolyline()
|
||||
}
|
||||
|
||||
fun clearCustomPolyline() {
|
||||
overMapView?.clearCustomPolyline()
|
||||
}
|
||||
|
||||
private fun updateNoStationView() {
|
||||
station_name_tv.setTextColor(ResourcesUtils.getColor(R.color.shuttle_p_m2_next_tv_color))
|
||||
station_name_tv.text = resources.getString(R.string.shuttle_p_m2_empty_tv)
|
||||
tv_distance.text = resources.getString(R.string.shuttle_p_m2_empty_remain_km)
|
||||
tv_left_time.text = resources.getString(R.string.shuttle_p_m2_empty_remain_minute)
|
||||
// station_name_tv.setTextColor(ResourcesUtils.getColor(R.color.shuttle_p_m2_next_tv_color))
|
||||
// station_name_tv.text = resources.getString(R.string.shuttle_p_m2_empty_tv)
|
||||
// tv_distance.text = resources.getString(R.string.shuttle_p_m2_empty_remain_km)
|
||||
// tv_left_time.text = resources.getString(R.string.shuttle_p_m2_empty_remain_minute)
|
||||
noLineShow()
|
||||
}
|
||||
|
||||
@@ -151,76 +92,35 @@ class PM2DrivingInfoFragment :
|
||||
}
|
||||
|
||||
fun updateAutoStatus(isAutoPilot: Boolean) {
|
||||
if (isAutoPilot) {
|
||||
context?.let {
|
||||
auto_tv.setTextColor(
|
||||
ContextCompat.getColor(
|
||||
it,
|
||||
R.color.shuttle_p_m2_white_color
|
||||
)
|
||||
)
|
||||
}
|
||||
context?.let {
|
||||
auto_tv.background =
|
||||
ContextCompat.getDrawable(it, R.drawable.shuttle_p_m2_auto_button_bg)
|
||||
}
|
||||
} else {
|
||||
context?.let {
|
||||
auto_tv.setTextColor(
|
||||
ContextCompat.getColor(
|
||||
it,
|
||||
R.color.shuttle_p_m2_color_7094ad
|
||||
)
|
||||
)
|
||||
}
|
||||
context?.let {
|
||||
auto_tv.background =
|
||||
ContextCompat.getDrawable(it, R.drawable.shuttle_p_m2_bg_p_m2_auto)
|
||||
context?.let {
|
||||
if (isAutoPilot) {
|
||||
auto_tv.setTextColor(ContextCompat.getColor(it, R.color.common_FFFFFF))
|
||||
auto_tv.background = ContextCompat.getDrawable(it, R.drawable.m2_autopilot_status_in)
|
||||
} else {
|
||||
auto_tv.setTextColor(ContextCompat.getColor(it, R.color.common_284F7E))
|
||||
auto_tv.background = ContextCompat.getDrawable(it, R.drawable.m2_autopilot_status_out)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun updateLineStations(
|
||||
stations: MutableList<LatLng>,
|
||||
stationsPass: MutableList<LatLng>,
|
||||
startStation: LatLng?,
|
||||
endStation: LatLng?
|
||||
) {
|
||||
overMapView?.let {
|
||||
val stationsList: MutableList<SiteMarkerBean> = mutableListOf()
|
||||
startStation?.let { start ->
|
||||
stationsList.add(SiteMarkerBean(start, startStationIcon, 0.5f, 0.5f))
|
||||
}
|
||||
for (stationPass in stationsPass) {
|
||||
stationsList.add(SiteMarkerBean(stationPass, stationPassIcon, 0.5f, 0.5f))
|
||||
}
|
||||
for (stationPass in stations) {
|
||||
stationsList.add(SiteMarkerBean(stationPass, stationIcon, 0.5f, 0.5f))
|
||||
}
|
||||
endStation?.let { end ->
|
||||
stationsList.add(SiteMarkerBean(end, endStationIcon, 0.5f, 0.5f))
|
||||
}
|
||||
it.drawSiteMarkers(stationsList)
|
||||
}
|
||||
}
|
||||
|
||||
fun updateStationsInfo(stations: MutableList<BusStationBean>, i: Int, isArrived: Boolean) {
|
||||
if (stations.size == 0) return
|
||||
if (0 <= i && i < stations.size) {
|
||||
station_name_tv.setTextColor(ResourcesUtils.getColor(R.color.shuttle_p_m2_next_tv_color))
|
||||
station_name_tv.text = stations[i].name
|
||||
}
|
||||
if (isArrived) {//到站
|
||||
tv_distance.text = resources.getString(R.string.shuttle_p_m2_empty_remain_km)
|
||||
tv_left_time.text = resources.getString(R.string.shuttle_p_m2_empty_remain_minute)
|
||||
tv_next_station_title.text =
|
||||
resources.getString(R.string.shuttle_p_m2_station_title_arrived_tv)
|
||||
haveLineAndArrivedStation()
|
||||
} else { //前往目的地中
|
||||
tv_next_station_title.text =
|
||||
resources.getString(R.string.shuttle_p_m2_next_station_title)
|
||||
haveLineAndArriveingStation()
|
||||
}
|
||||
// if (0 <= i && i < stations.size) {
|
||||
// station_name_tv.setTextColor(ResourcesUtils.getColor(R.color.shuttle_p_m2_next_tv_color))
|
||||
// station_name_tv.text = stations[i].name
|
||||
// }
|
||||
// if (isArrived) {//到站
|
||||
// tv_distance.text = resources.getString(R.string.shuttle_p_m2_empty_remain_km)
|
||||
// tv_left_time.text = resources.getString(R.string.shuttle_p_m2_empty_remain_minute)
|
||||
// tv_next_station_title.text =
|
||||
// resources.getString(R.string.shuttle_p_m2_station_title_arrived_tv)
|
||||
// haveLineAndArrivedStation()
|
||||
// } else { //前往目的地中
|
||||
// tv_next_station_title.text =
|
||||
// resources.getString(R.string.shuttle_p_m2_next_station_title)
|
||||
// haveLineAndArriveingStation()
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -242,41 +142,41 @@ class PM2DrivingInfoFragment :
|
||||
|
||||
val time = ceil(timeInSecond / 60f).toInt()
|
||||
|
||||
"$remainDis$disUnit".also { tv_distance.text = it }
|
||||
"${time}分钟".also { tv_left_time.text = it }
|
||||
// "$remainDis$disUnit".also { tv_distance.text = it }
|
||||
// "${time}分钟".also { tv_left_time.text = it }
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
iv_animal_list.visibility = View.GONE
|
||||
// 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
|
||||
//
|
||||
// iv_animal_list.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
|
||||
iv_animal_list.visibility = View.GONE
|
||||
// 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
|
||||
// iv_animal_list.visibility = View.GONE
|
||||
}
|
||||
|
||||
// 有线路到达站点
|
||||
private 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
|
||||
iv_animal_list.visibility = View.VISIBLE
|
||||
val animationDrawable = iv_animal_list.drawable as AnimationDrawable
|
||||
animationDrawable.start()
|
||||
// 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
|
||||
// iv_animal_list.visibility = View.VISIBLE
|
||||
// val animationDrawable = iv_animal_list.drawable as AnimationDrawable
|
||||
// animationDrawable.start()
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
package com.mogo.och.shuttle.weaknet.passenger.ui
|
||||
|
||||
import android.graphics.BitmapFactory
|
||||
import android.os.Bundle
|
||||
import com.amap.api.maps.model.LatLng
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.view.SiteMarkerBean
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
import com.mogo.eagle.core.widget.media.video.TextureVideoViewOutlineProvider
|
||||
import com.mogo.map.overlay.core.Level
|
||||
import com.mogo.map.overlay.point.Point
|
||||
import com.mogo.map.MapDataWrapper
|
||||
@@ -12,6 +17,8 @@ import com.mogo.och.shuttle.weaknet.passenger.constant.M2Const.Companion.TYPE_MA
|
||||
import com.mogo.och.shuttle.weaknet.passenger.presenter.PM2ADASPresenter
|
||||
import com.mogo.och.common.module.utils.OCHThreadPoolManager
|
||||
import kotlinx.android.synthetic.main.shuttle_p_m2_hpmap_fragment.mHomeView
|
||||
import kotlinx.android.synthetic.main.shuttle_p_m2_hpmap_fragment.overMapView
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
|
||||
import java.util.*
|
||||
|
||||
@@ -21,6 +28,24 @@ import java.util.*
|
||||
*/
|
||||
class PM2HPMapFragment :
|
||||
MvpFragment<PM2HPMapFragment?, PM2ADASPresenter?>() {
|
||||
|
||||
private val stationIcon = BitmapFactory.decodeResource(
|
||||
AbsMogoApplication.getApp().resources,
|
||||
R.drawable.shuttle_p_m2_map_staton_icon
|
||||
)
|
||||
private val stationPassIcon = BitmapFactory.decodeResource(
|
||||
AbsMogoApplication.getApp().resources,
|
||||
R.drawable.shuttle_p_m2_map_staton_arrived_icon
|
||||
)
|
||||
private val startStationIcon = BitmapFactory.decodeResource(
|
||||
AbsMogoApplication.getApp().resources,
|
||||
R.drawable.shuttle_p_m2_map_start_icon
|
||||
)
|
||||
private val endStationIcon = BitmapFactory.decodeResource(
|
||||
AbsMogoApplication.getApp().resources,
|
||||
R.drawable.shuttle_p_m2_map_end_icon
|
||||
)
|
||||
|
||||
/**
|
||||
* 改变自动驾驶状态
|
||||
*
|
||||
@@ -35,16 +60,24 @@ class PM2HPMapFragment :
|
||||
}
|
||||
|
||||
override fun initViews() {
|
||||
|
||||
}
|
||||
|
||||
override fun initViews(savedInstanceState: Bundle?) {
|
||||
super.initViews(savedInstanceState)
|
||||
mHomeView.onCreate(savedInstanceState)
|
||||
overMapView?.let {
|
||||
it.onCreateView(savedInstanceState)
|
||||
val radius = AutoSizeUtils.dp2px(requireContext(), 16f)
|
||||
it.outlineProvider = TextureVideoViewOutlineProvider(radius.toFloat())
|
||||
it.clipToOutline = true
|
||||
}
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
mHomeView.onResume()
|
||||
overMapView?.onResume()
|
||||
}
|
||||
|
||||
override fun onLowMemory() {
|
||||
@@ -60,10 +93,12 @@ class PM2HPMapFragment :
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
mHomeView.onPause()
|
||||
overMapView?.onPause()
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
mHomeView.onDestroy()
|
||||
overMapView?.onDestroy()
|
||||
super.onDestroyView()
|
||||
}
|
||||
|
||||
@@ -75,6 +110,30 @@ class PM2HPMapFragment :
|
||||
private val TAG = PM2HPMapFragment::class.java.simpleName
|
||||
}
|
||||
|
||||
fun updateLineStations(
|
||||
stations: MutableList<LatLng>,
|
||||
stationsPass: MutableList<LatLng>,
|
||||
startStation: LatLng?,
|
||||
endStation: LatLng?
|
||||
) {
|
||||
overMapView?.let {
|
||||
val stationsList: MutableList<SiteMarkerBean> = mutableListOf()
|
||||
startStation?.let { start ->
|
||||
stationsList.add(SiteMarkerBean(start, startStationIcon, 0.5f, 0.5f))
|
||||
}
|
||||
for (stationPass in stationsPass) {
|
||||
stationsList.add(SiteMarkerBean(stationPass, stationPassIcon, 0.5f, 0.5f))
|
||||
}
|
||||
for (stationPass in stations) {
|
||||
stationsList.add(SiteMarkerBean(stationPass, stationIcon, 0.5f, 0.5f))
|
||||
}
|
||||
endStation?.let { end ->
|
||||
stationsList.add(SiteMarkerBean(end, endStationIcon, 0.5f, 0.5f))
|
||||
}
|
||||
it.drawSiteMarkers(stationsList)
|
||||
}
|
||||
}
|
||||
|
||||
fun setMapMaker(
|
||||
uuid: String,
|
||||
station: MutableList<Double>,
|
||||
@@ -125,4 +184,15 @@ class PM2HPMapFragment :
|
||||
OCHThreadPoolManager.getsInstance().execute(removeMapMarkerRunnable)
|
||||
}
|
||||
|
||||
fun showNoTaskView(b: Boolean) {
|
||||
if(!b) {
|
||||
overMapView?.clearSiteMarkers()
|
||||
clearCustomPolyline()
|
||||
}
|
||||
}
|
||||
|
||||
fun clearCustomPolyline() {
|
||||
overMapView?.clearCustomPolyline()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -43,8 +43,7 @@ class M2TurnLightView @JvmOverloads constructor(
|
||||
private var isDisappear: Boolean = false
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context)
|
||||
.inflate(R.layout.shuttle_p_m2_turn_light_status, this, true)
|
||||
LayoutInflater.from(context).inflate(R.layout.shuttle_p_m2_turn_light_status, this, true)
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
@@ -126,12 +125,12 @@ class M2TurnLightView @JvmOverloads constructor(
|
||||
appearAnimation.duration = 300
|
||||
val appearAnimationImage = AlphaAnimation(0f, 1.0f)
|
||||
appearAnimation.duration = 500
|
||||
turn_light_layout.startAnimation(appearAnimation)
|
||||
left_nor_image.startAnimation(appearAnimationImage)
|
||||
// turn_light_layout.startAnimation(appearAnimation)
|
||||
// left_nor_image.startAnimation(appearAnimationImage)
|
||||
right_nor_image.startAnimation(appearAnimationImage)
|
||||
|
||||
turn_light_layout.visibility = View.VISIBLE
|
||||
left_nor_image.visibility = View.VISIBLE
|
||||
// turn_light_layout.visibility = View.VISIBLE
|
||||
// left_nor_image.visibility = View.VISIBLE
|
||||
right_nor_image.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
@@ -142,19 +141,15 @@ class M2TurnLightView @JvmOverloads constructor(
|
||||
left_select_image.clearAnimation()
|
||||
right_select_image.clearAnimation()
|
||||
|
||||
left_nor_image.clearAnimation()
|
||||
//left_nor_image.clearAnimation()
|
||||
right_nor_image.clearAnimation()
|
||||
turn_light_layout.clearAnimation()
|
||||
|
||||
val disappearAnimationLeft = AlphaAnimation(1.0f, 0f)
|
||||
disappearAnimationLeft.duration = 300
|
||||
|
||||
val disappearAnimationBg = AlphaAnimation(1.0f, 0f)
|
||||
disappearAnimationBg.duration = 500
|
||||
|
||||
left_nor_image.startAnimation(disappearAnimationLeft)
|
||||
//left_nor_image.startAnimation(disappearAnimationLeft)
|
||||
right_nor_image.startAnimation(disappearAnimationLeft)
|
||||
turn_light_layout.startAnimation(disappearAnimationBg)
|
||||
|
||||
|
||||
disappearAnimationLeft.setAnimationListener(object : Animation.AnimationListener {
|
||||
override fun onAnimationRepeat(p0: Animation?) {
|
||||
@@ -164,20 +159,8 @@ class M2TurnLightView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun onAnimationEnd(p0: Animation?) {
|
||||
left_nor_image.visibility = View.GONE
|
||||
right_nor_image.visibility = View.GONE
|
||||
}
|
||||
})
|
||||
|
||||
disappearAnimationBg.setAnimationListener(object : Animation.AnimationListener {
|
||||
override fun onAnimationRepeat(p0: Animation?) {
|
||||
}
|
||||
|
||||
override fun onAnimationStart(p0: Animation?) {
|
||||
}
|
||||
|
||||
override fun onAnimationEnd(p0: Animation?) {
|
||||
turn_light_layout.visibility = View.GONE
|
||||
// left_nor_image.visibility = View.GONE
|
||||
// right_nor_image.visibility = View.GONE
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.mogo.och.shuttle.weaknet.passenger.ui.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import com.mogo.eagle.core.function.view.MapBizView
|
||||
import com.mogo.eagle.core.widget.media.video.TextureVideoViewOutlineProvider
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
|
||||
class OchMapBizPView(context: Context?, attrs: AttributeSet?) : MapBizView(context, attrs) {
|
||||
|
||||
|
||||
override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {
|
||||
super.onSizeChanged(w, h, oldw, oldh)
|
||||
this.outlineProvider =
|
||||
TextureVideoViewOutlineProvider(AutoSizeUtils.dp2px(context, 36f).toFloat())
|
||||
this.clipToOutline = true
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,16 +9,16 @@ import java.util.List;
|
||||
* @date: 2022/4/6
|
||||
*/
|
||||
public interface ICommonCallback {
|
||||
void updateLineInfo(String lineName);
|
||||
void updateStationsInfo(List<BusStationBean> stations, int currentStationIndex, boolean isArrived);
|
||||
void updateSpeed(int location);
|
||||
void updateRemainMT(long meters, long timeInSecond);
|
||||
void showNoTaskView(boolean isTrue);
|
||||
default void updateLineInfo(String lineName){}
|
||||
default void updateStationsInfo(List<BusStationBean> stations, int currentStationIndex, boolean isArrived){}
|
||||
default void updateSpeed(int location){}
|
||||
default void updateRemainMT(long meters, long timeInSecond){}
|
||||
default void showNoTaskView(boolean isTrue){}
|
||||
|
||||
/**
|
||||
* false: 未开启自驾, true : 开启自驾
|
||||
*/
|
||||
void updateAutoStatus(boolean isOpen);
|
||||
default void updateAutoStatus(boolean isOpen){}
|
||||
|
||||
default void updateLineStations(List<BusStationBean> stations){}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ object CommonModel {
|
||||
var mContext: Context? = null
|
||||
|
||||
|
||||
private var mCommonCallback: ICommonCallback? = null // bus路线信息更新
|
||||
private var mCommonCallbackList = mutableMapOf<String,ICommonCallback>()
|
||||
|
||||
var mStations = mutableListOf<BusStationBean>()
|
||||
var mNextStationIndex = 0 // A-B要到达站的index
|
||||
@@ -102,8 +102,12 @@ object CommonModel {
|
||||
}
|
||||
|
||||
|
||||
fun setRouteLineInfoCallback(callback: ICommonCallback?) {
|
||||
this.mCommonCallback = callback
|
||||
fun setRouteLineInfoCallback(tag:String,callback: ICommonCallback?) {
|
||||
if(callback==null){
|
||||
this.mCommonCallbackList.remove(tag)
|
||||
return
|
||||
}
|
||||
this.mCommonCallbackList[tag] = callback
|
||||
}
|
||||
|
||||
|
||||
@@ -141,12 +145,18 @@ object CommonModel {
|
||||
mNextStationIndex >= 0 && mNextStationIndex <= mStations.size - 1
|
||||
&& isGoingToNextStation
|
||||
){
|
||||
mCommonCallback?.updateAutoStatus(true)
|
||||
mCommonCallbackList.forEach {
|
||||
it.value.updateAutoStatus(true)
|
||||
}
|
||||
}else{//非美化模式下
|
||||
mCommonCallback?.updateAutoStatus(false)
|
||||
mCommonCallbackList.forEach {
|
||||
it.value.updateAutoStatus(false)
|
||||
}
|
||||
}
|
||||
}else{//自驾状态 2
|
||||
mCommonCallback?.updateAutoStatus(true)
|
||||
mCommonCallbackList.forEach {
|
||||
it.value.updateAutoStatus(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -172,10 +182,12 @@ object CommonModel {
|
||||
}
|
||||
}
|
||||
}
|
||||
mCommonCallback?.updateRemainMT(
|
||||
distance.toLong(),
|
||||
lastTime.toLong()
|
||||
)
|
||||
mCommonCallbackList.forEach {
|
||||
it.value.updateRemainMT(
|
||||
distance.toLong(),
|
||||
lastTime.toLong()
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,7 +238,9 @@ object CommonModel {
|
||||
mNextStationIndex = 0
|
||||
cleanStation("queryDriverSiteByCoordinate")
|
||||
isGoingToNextStation = false
|
||||
mCommonCallback?.showNoTaskView(true)
|
||||
mCommonCallbackList.forEach {
|
||||
it.value.showNoTaskView(true)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -238,20 +252,26 @@ object CommonModel {
|
||||
|
||||
if (routesResult != null && routesResult!!.lineId != result.lineId) {
|
||||
d(TAG, "lineId change= clearCustomPolyline")
|
||||
mCommonCallback?.clearCustomPolyline()
|
||||
mCommonCallbackList.forEach {
|
||||
it.value.clearCustomPolyline()
|
||||
}
|
||||
}
|
||||
|
||||
d(TAG, "queryDriverSiteByCoordinate = update")
|
||||
routesResult = result
|
||||
|
||||
if (result.sites != null) {
|
||||
mCommonCallback?.updateLineInfo(result.name)
|
||||
mCommonCallback?.showNoTaskView(false)
|
||||
mCommonCallbackList.forEach {
|
||||
it.value.updateLineInfo(result.name)
|
||||
it.value.showNoTaskView(false)
|
||||
}
|
||||
if (result.sites != null) {
|
||||
val stations = result.sites
|
||||
mStations.clear()
|
||||
mStations.addAll(stations)
|
||||
mCommonCallback?.updateLineStations(mStations)
|
||||
mCommonCallbackList.forEach {
|
||||
it.value.updateLineStations(mStations)
|
||||
}
|
||||
for (i in stations.indices) {
|
||||
val station = stations[i]
|
||||
if(station.drivingStatus == BusPassengerConst.STATION_STATUS_STOPPED){
|
||||
@@ -259,7 +279,9 @@ object CommonModel {
|
||||
if (station.isLeaving && i + 1 < stations.size
|
||||
) {
|
||||
isGoingToNextStation = true
|
||||
mCommonCallback?.updateStationsInfo(stations, i + 1, false)
|
||||
mCommonCallbackList.forEach {
|
||||
it.value.updateStationsInfo(stations, i + 1, false)
|
||||
}
|
||||
mNextStationIndex = i + 1
|
||||
val startStation = mStations[i]
|
||||
val endStation = mStations[i + 1]
|
||||
@@ -272,7 +294,9 @@ object CommonModel {
|
||||
}
|
||||
isGoingToNextStation = false
|
||||
Logger.d(TAG, "order = station= arrive")
|
||||
mCommonCallback?.updateStationsInfo(stations, i, true)
|
||||
mCommonCallbackList.forEach {
|
||||
it.value.updateStationsInfo(stations, i, true)
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -411,6 +435,8 @@ object CommonModel {
|
||||
// km/h
|
||||
val speedKM = (abs(mogoLocation.gnssSpeed) * 3.6f).toInt()
|
||||
|
||||
mCommonCallback?.updateSpeed(speedKM)
|
||||
mCommonCallbackList.forEach {
|
||||
it.value.updateSpeed(speedKM)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 345 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 115 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 590 B After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 612 B After Width: | Height: | Size: 974 B |
@@ -2,367 +2,76 @@
|
||||
<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:background="@drawable/m2_top_bg"
|
||||
android:paddingTop="@dimen/dp_100"
|
||||
android:layout_width="match_parent"
|
||||
tools:layout_height="@dimen/dp_630"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!-- 全览地图带站点-->
|
||||
<com.mogo.eagle.core.function.view.OverMapView
|
||||
android:id="@+id/overMapView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
app:carDrawable="@drawable/shuttle_p_m2_map_car_icon"
|
||||
app:isClearArrived="false"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintWidth_percent="0.6"
|
||||
app:mapStyleExtraPath="@string/shuttle_p_m2_over_map_style_extra_path"
|
||||
app:mapStylePath="@string/shuttle_p_m2_over_map_style_path"
|
||||
app:resetDrawableMarginBottom="@dimen/dp_54"
|
||||
app:resetDrawableMarginRight="@dimen/dp_34"
|
||||
app:compassDrawable="@drawable/shuttle_p_m2_amap_custom_corner"
|
||||
app:arrivedDrawable="@drawable/shuttle_p_m2_amap_arrived_road"
|
||||
app:unArrivedDrawable="@drawable/shuttle_p_m2_amap_arriving_road"
|
||||
app:mapTilt="0"
|
||||
app:leftPadding="200"
|
||||
app:topPadding="150"
|
||||
app:bottomPadding="50" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/cl_left_container_back"
|
||||
android:layout_width="0dp"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/shuttle_p_m2_bg_driving_info_image"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintWidth_percent="0.516"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/cl_left_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintWidth_percent="0.5"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_line_name_container"
|
||||
android:layout_width="@dimen/dp_661"
|
||||
android:layout_height="@dimen/dp_92"
|
||||
android:src="@drawable/shuttle_p_m2_line_name"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_line_icon"
|
||||
android:layout_width="@dimen/dp_32"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_marginEnd="@dimen/dp_14"
|
||||
android:src="@drawable/shuttle_p_m2_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" />
|
||||
|
||||
<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_10"
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:maxWidth="@dimen/dp_600"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/shuttle_p_m2_line_name_tv_color"
|
||||
android:textSize="@dimen/dp_36"
|
||||
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" />
|
||||
|
||||
|
||||
<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.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_m2_line_noselect" />
|
||||
android:id="@+id/aciv_right_bg"
|
||||
android:src="@drawable/m2_p_driver_info_right"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_19"
|
||||
android:layout_marginEnd="@dimen/dp_28"
|
||||
android:layout_width="@dimen/dp_217"
|
||||
android:layout_height="@dimen/dp_476"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/m2_p_not_select_line_content"
|
||||
|
||||
<TextView
|
||||
android:id="@+id/speed_tv"
|
||||
android:textSize="@dimen/dp_100"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/shuttle_p_m2_not_select_line_content"
|
||||
android:textColor="@color/shuttle_p_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"
|
||||
android:textColor="@color/common_203555"
|
||||
android:text="60"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
app:layout_constraintTop_toTopOf="@+id/aciv_right_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/aciv_right_bg"
|
||||
app:layout_constraintEnd_toEndOf="@+id/aciv_right_bg"
|
||||
/>
|
||||
|
||||
<!-- 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_m2_next_station_title"
|
||||
android:textColor="@color/shuttle_p_m2_color_203555"
|
||||
android:textSize="@dimen/dp_40"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_next_station_title"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_next_station_title"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_next_station_title"
|
||||
android:id="@+id/iv_animal_list"
|
||||
android:layout_width="@dimen/dp_18"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:src="@drawable/shuttle_p_m2_bg_p_m2_arrived_station"
|
||||
android:visibility="gone"
|
||||
android:layout_marginStart="@dimen/dp_7" />
|
||||
|
||||
<com.mogo.och.common.module.wigets.MarqueeTextView
|
||||
android:id="@+id/station_name_tv"
|
||||
android:layout_width="@dimen/dp_450"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:gravity="left"
|
||||
android:singleLine="true"
|
||||
android:text="@string/shuttle_p_m2_empty_tv"
|
||||
android:textColor="@color/shuttle_p_m2_color_17417B"
|
||||
android:textSize="@dimen/dp_56"
|
||||
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_200"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:background="@drawable/shuttle_p_m2_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_p_m2_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_p_m2_color_2d3e5f"
|
||||
android:textSize="@dimen/dp_26"
|
||||
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_p_m2_color_2d3e5f"
|
||||
android:textSize="@dimen/dp_26"
|
||||
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_200"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:background="@drawable/shuttle_p_m2_bg_driving_arrived_notice"
|
||||
android:gravity="center"
|
||||
android:text="@string/shuttle_p_m2_arrived_station_title"
|
||||
android:textColor="@color/shuttle_p_m2_color_34A61F"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:textSize="@dimen/dp_26"
|
||||
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:scaleType="fitXY"
|
||||
android:src="@drawable/shuttle_p_m2_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:text="0"
|
||||
android:textColor="@color/shuttle_p_m2_speed_tv_color"
|
||||
android:textSize="@dimen/dp_70"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="@+id/aciv_speed_time_bg"
|
||||
app:layout_constraintTop_toTopOf="@+id/viewTextClockHouerMin"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/viewTextClockHouerMin"/>
|
||||
|
||||
<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/shuttle_p_m2_speed_unit_txt"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/speed_tv"
|
||||
android:textColor="@color/shuttle_p_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_83"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:layout_marginTop="@dimen/dp_21"
|
||||
android:background="@drawable/shuttle_p_m2_bg_p_m2_auto"
|
||||
android:gravity="center"
|
||||
android:text="@string/shuttle_p_m2_auto_tv"
|
||||
android:textColor="@color/shuttle_p_m2_color_7094ad"
|
||||
android:layout_marginBottom="@dimen/dp_34"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/speed_tv"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/common_203555"
|
||||
android:text="KM/H"
|
||||
android:layout_marginTop="@dimen/dp_132"
|
||||
app:layout_constraintTop_toTopOf="@+id/aciv_right_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/aciv_right_bg"
|
||||
app:layout_constraintEnd_toEndOf="@+id/aciv_right_bg"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/auto_tv"
|
||||
android:background="@drawable/m2_autopilot_status_out"
|
||||
android:text="@string/m2_autopilot_status"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/common_284F7E"
|
||||
android:textSize="@dimen/dp_26"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="@dimen/dp_3"
|
||||
app:layout_constraintBottom_toTopOf="@+id/turn_light_view"
|
||||
app:layout_constraintStart_toStartOf="@+id/aciv_right_bg"
|
||||
app:layout_constraintEnd_toEndOf="@+id/aciv_right_bg"
|
||||
android:layout_width="@dimen/dp_142"
|
||||
android:layout_height="@dimen/dp_96"/>
|
||||
|
||||
<!-- 转向灯-->
|
||||
<com.mogo.och.shuttle.weaknet.passenger.ui.widget.M2TurnLightView
|
||||
android:id="@+id/turn_light_view"
|
||||
android:layout_width="@dimen/dp_86"
|
||||
android:layout_height="@dimen/dp_47"
|
||||
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:layout_constraintBottom_toBottomOf="@+id/auto_tv"
|
||||
app:visible="false" />
|
||||
|
||||
<!-- 红绿灯-->
|
||||
<!-- <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" />-->
|
||||
|
||||
<!-- 被删除的 -->
|
||||
<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/auto_tv"
|
||||
app:layout_constraintStart_toStartOf="@+id/aciv_speed_time_bg"
|
||||
app:layout_constraintEnd_toEndOf="@+id/aciv_speed_time_bg"
|
||||
android:background="@color/shuttle_p_m2_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_10"
|
||||
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_p_m2_color_17417B"
|
||||
android:includeFontPadding="false"
|
||||
android:textSize="@dimen/dp_52" />
|
||||
|
||||
<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"
|
||||
android:layout_marginBottom="-3dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/viewTextClockWeek"
|
||||
app:layout_constraintStart_toEndOf="@+id/view_split"
|
||||
android:textColor="@color/shuttle_p_m2_color_17417B"
|
||||
android:includeFontPadding="false"
|
||||
android:textSize="@dimen/dp_26" />
|
||||
android:layout_width="@dimen/dp_142"
|
||||
android:layout_height="@dimen/dp_96"
|
||||
android:layout_marginBottom="@dimen/dp_51"
|
||||
app:layout_constraintStart_toStartOf="@+id/aciv_right_bg"
|
||||
app:layout_constraintEnd_toEndOf="@+id/aciv_right_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/aciv_right_bg" />
|
||||
|
||||
|
||||
|
||||
<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_p_m2_color_17417B"
|
||||
android:includeFontPadding="false"
|
||||
android:textSize="@dimen/dp_26" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -2,7 +2,7 @@
|
||||
<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:background="@drawable/m2_big_bg"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!-- 高精地图-->
|
||||
@@ -10,93 +10,45 @@
|
||||
android:id="@+id/hd_map_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/och_shadow_layout"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
app:layout_constraintTop_toBottomOf="@+id/driving_fragment"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"/>
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/shuttle_p_m2_sky_bg"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_width="1080dp"
|
||||
android:layout_height="@dimen/dp_612"/>
|
||||
<ImageView
|
||||
android:id="@+id/iv_bottom_bg"
|
||||
android:src="@drawable/shuttle_p_m2_bottom_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_width="1080dp"
|
||||
android:layout_height="@dimen/dp_630"/>
|
||||
|
||||
|
||||
|
||||
<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_25"
|
||||
android:layout_marginEnd="@dimen/dp_25"
|
||||
app:blurRadius="@dimen/dp_15"
|
||||
app:shadowColor="#802F3E67"
|
||||
app:shadowRadius="@dimen/dp_16"
|
||||
app:shadow_position="outer"
|
||||
app:xOffset="0dp"
|
||||
app:yOffset="0dp"/>
|
||||
|
||||
<!-- 行车卡片--><!-- 全览地图带站点-->
|
||||
<FrameLayout
|
||||
android:id="@+id/driving_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:layout_marginEnd="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_492"
|
||||
android:layout_marginTop="@dimen/dp_13"
|
||||
app:layout_constraintTop_toTopOf="@+id/och_shadow_layout"
|
||||
app:layout_constraintEnd_toEndOf="@+id/och_shadow_layout"
|
||||
app:layout_constraintStart_toStartOf="@+id/och_shadow_layout"/>
|
||||
android:layout_height="@dimen/dp_630"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<!-- 消息盒子气泡-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.MBoxBubbleView
|
||||
android:id="@+id/box_bubble_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="-40dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/zv_msg_pop_bottom"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginEnd="@dimen/dp_40"
|
||||
/>
|
||||
<!-- <!– 消息盒子气泡–>-->
|
||||
<!-- <com.mogo.eagle.core.function.hmi.ui.msgbox.MBoxBubbleView-->
|
||||
<!-- android:id="@+id/box_bubble_view"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginBottom="-40dp"-->
|
||||
<!-- app:layout_constraintBottom_toTopOf="@+id/zv_msg_pop_bottom"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- android:layout_marginEnd="@dimen/dp_40"-->
|
||||
<!-- />-->
|
||||
|
||||
<!--pnc行为决策-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.vehicle.PncActionsView
|
||||
android:id="@+id/pnc_actions_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
app:layout_constraintBottom_toTopOf="@+id/video_fragment"
|
||||
android:layout_marginBottom="@dimen/dp_25"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:pnc_size="@dimen/dp_18"
|
||||
app:background_resource="@drawable/shuttle_p_m2_bg_pnc" />
|
||||
<!-- <!–pnc行为决策–>-->
|
||||
<!-- <com.mogo.eagle.core.function.hmi.ui.vehicle.PncActionsView-->
|
||||
<!-- android:id="@+id/pnc_actions_view"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="@dimen/dp_36"-->
|
||||
<!-- app:layout_constraintBottom_toTopOf="@+id/video_fragment"-->
|
||||
<!-- android:layout_marginBottom="@dimen/dp_25"-->
|
||||
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
|
||||
<!-- app:layout_constraintRight_toRightOf="parent"-->
|
||||
<!-- app:pnc_size="@dimen/dp_18"-->
|
||||
<!-- app:background_resource="@drawable/shuttle_p_m2_bg_pnc" />-->
|
||||
|
||||
<!-- 图片或视频广告-->
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/video_fragment_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="572.5dp"
|
||||
android:layout_marginBottom="@dimen/dp_35"
|
||||
android:layout_marginEnd="@dimen/dp_35"
|
||||
android:layout_marginStart="@dimen/dp_35"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"/>
|
||||
<!-- <!– 图片或视频广告–>-->
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/video_fragment"
|
||||
@@ -108,43 +60,23 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"/>
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/shuttle_p_m2_video_top_left"
|
||||
app:layout_constraintTop_toTopOf="@+id/video_fragment_bottom"
|
||||
app:layout_constraintStart_toStartOf="@+id/video_fragment_bottom"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"/>
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/shuttle_p_m2_video_top_right"
|
||||
app:layout_constraintTop_toTopOf="@+id/video_fragment_bottom"
|
||||
app:layout_constraintEnd_toEndOf="@+id/video_fragment_bottom"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"/>
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/shuttle_p_m2_video_bottom_left"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/video_fragment_bottom"
|
||||
app:layout_constraintStart_toStartOf="@+id/video_fragment_bottom"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"/>
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/shuttle_p_m2_video_bottom_right"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/video_fragment_bottom"
|
||||
app:layout_constraintEnd_toEndOf="@+id/video_fragment_bottom"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"/>
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:src="@drawable/m2_bottom_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
<com.mogo.och.common.module.manager.xiaozhi.ZhiView
|
||||
android:id="@+id/zv_msg_pop_bottom"
|
||||
android:layout_width="@dimen/dp_240"
|
||||
android:layout_height="@dimen/dp_240"
|
||||
android:src="@drawable/xiaozhi_normal_0000"
|
||||
android:layout_marginBottom="-70dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/video_fragment"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
|
||||
<!-- <com.mogo.och.common.module.manager.xiaozhi.ZhiView-->
|
||||
<!-- android:id="@+id/zv_msg_pop_bottom"-->
|
||||
<!-- android:layout_width="@dimen/dp_240"-->
|
||||
<!-- android:layout_height="@dimen/dp_240"-->
|
||||
<!-- android:src="@drawable/xiaozhi_normal_0000"-->
|
||||
<!-- android:layout_marginBottom="-70dp"-->
|
||||
<!-- app:layout_constraintBottom_toTopOf="@+id/video_fragment"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent" />-->
|
||||
|
||||
<!-- <!– 事件弹框 –>-->
|
||||
<!-- <com.mogo.eagle.core.function.hmi.ui.v2n.RoadV2NEventWindowView-->
|
||||
@@ -158,38 +90,38 @@
|
||||
<!-- android:visibility="gone"/>-->
|
||||
|
||||
<!--红绿灯提醒-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.notice.traffic.TrafficLightPromptView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_m_70"
|
||||
app:layout_constraintBottom_toTopOf="@id/zv_msg_pop_bottom"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:promptUser="passenger_bus"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
<!-- <com.mogo.eagle.core.function.hmi.ui.notice.traffic.TrafficLightPromptView-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginBottom="@dimen/dp_m_70"-->
|
||||
<!-- app:layout_constraintBottom_toTopOf="@id/zv_msg_pop_bottom"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:promptUser="passenger_bus"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- />-->
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.SingleTrafficLightView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/och_shadow_layout"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:visibility="gone"
|
||||
app:traffic_light_user="traffic_light_taxi_p"
|
||||
/>
|
||||
<!-- <com.mogo.eagle.core.function.hmi.ui.widget.SingleTrafficLightView-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
|
||||
<!-- app:layout_constraintRight_toRightOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@id/och_shadow_layout"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_30"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- app:traffic_light_user="traffic_light_taxi_p"-->
|
||||
<!-- />-->
|
||||
|
||||
<!--融合红绿灯-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.FusionTrafficLightView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/och_shadow_layout"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
app:fusionLightUser="passenger_bus"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
<!-- <!–融合红绿灯–>-->
|
||||
<!-- <com.mogo.eagle.core.function.hmi.ui.widget.FusionTrafficLightView-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
|
||||
<!-- app:layout_constraintRight_toRightOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@id/och_shadow_layout"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_30"-->
|
||||
<!-- app:fusionLightUser="passenger_bus"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- />-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_shuttle_b2_p_version"
|
||||
|
||||
@@ -4,15 +4,40 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!-- 全览地图带站点-->
|
||||
<com.mogo.eagle.core.function.view.OverMapView
|
||||
android:id="@+id/overMapView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
app:carDrawable="@drawable/shuttle_p_m2_map_car_icon"
|
||||
app:isClearArrived="false"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintWidth_percent="0.6"
|
||||
app:mapStyleExtraPath="@string/shuttle_p_m2_over_map_style_extra_path"
|
||||
app:mapStylePath="@string/shuttle_p_m2_over_map_style_path"
|
||||
app:resetDrawableMarginBottom="@dimen/dp_54"
|
||||
app:resetDrawableMarginRight="@dimen/dp_34"
|
||||
app:compassDrawable="@drawable/shuttle_p_m2_amap_custom_corner"
|
||||
app:arrivedDrawable="@drawable/shuttle_p_m2_amap_arrived_road"
|
||||
app:unArrivedDrawable="@drawable/shuttle_p_m2_amap_arriving_road"
|
||||
app:mapTilt="0"
|
||||
app:leftPadding="200"
|
||||
app:topPadding="150"
|
||||
app:bottomPadding="50" />
|
||||
|
||||
<!-- 高精地图 -->
|
||||
<com.mogo.eagle.core.function.view.MapBizView
|
||||
<com.mogo.och.shuttle.weaknet.passenger.ui.widget.OchMapBizPView
|
||||
android:id="@+id/mHomeView"
|
||||
app:styleMode="MAP_STYLE_DAY_VR"
|
||||
app:carPosition="-1"
|
||||
app:default_perspective="MAP_STYLE_VR_ERHAI_B2"
|
||||
app:isWeatherEnable="false"
|
||||
app:locationIcon3DRes="@raw/m2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_width="@dimen/dp_996"
|
||||
android:layout_height="@dimen/dp_650"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,16 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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="@dimen/dp_86"
|
||||
android:layout_height="@dimen/dp_47"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="@dimen/dp_142"
|
||||
android:layout_height="@dimen/dp_96"
|
||||
tools:background="@color/common_203555"
|
||||
android:visibility="visible">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/turn_light_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/shuttle_p_m2_brakelight_background_daytime"
|
||||
android:background="@drawable/m2_autopilot_status_out"
|
||||
android:layout_gravity="top|center_horizontal"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -18,24 +19,24 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/left_nor_image"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_width="@dimen/dp_64"
|
||||
android:layout_height="@dimen/dp_64"
|
||||
android:layout_gravity="left|center_vertical"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
android:src="@drawable/shuttle_p_m2_zuozhuan_un_open" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/right_nor_image"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_width="@dimen/dp_64"
|
||||
android:layout_height="@dimen/dp_64"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
android:layout_marginRight="@dimen/dp_12"
|
||||
android:src="@drawable/shuttle_p_m2_youzhuan_un_open" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/left_select_image"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_width="@dimen/dp_64"
|
||||
android:layout_height="@dimen/dp_64"
|
||||
android:layout_gravity="left|center_vertical"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
android:src="@drawable/shuttle_p_m2_zuozhuan_open"
|
||||
@@ -43,8 +44,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/right_select_image"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_width="@dimen/dp_64"
|
||||
android:layout_height="@dimen/dp_64"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
android:layout_marginRight="@dimen/dp_12"
|
||||
android:src="@drawable/shuttle_p_m2_youzhuan_open"
|
||||
|
||||
@@ -13,4 +13,5 @@
|
||||
<string name="shuttle_p_m2_not_select_line_content">暂无路线</string>
|
||||
|
||||
<string name="m2_line_name_detaile">MOGO BUS</string>
|
||||
<string name="m2_autopilot_status">AUTO</string>
|
||||
</resources>
|
||||