[fetatue]
[charter]
This commit is contained in:
yangyakun
2023-09-22 19:03:42 +08:00
parent 02c032f8fb
commit 8128873855
28 changed files with 238 additions and 239 deletions

View File

@@ -1,9 +1,7 @@
package com.mogo.och.charter.passenger.bean.response
import com.amap.api.maps.model.LatLng
import com.mogo.eagle.core.data.BaseData
import com.mogo.och.common.module.bean.dpmsg.LineSite
import java.util.*
import com.mogo.eagle.core.data.map.MogoLocation
/**
*
@@ -16,6 +14,12 @@ data class TrajectoriesResponse(val data: List<LatLng>?) : BaseData(){
fun exchangeData(): com.amap.api.maps.model.LatLng{
return com.amap.api.maps.model.LatLng(latitude!!,longitude!!)
}
fun exchangeDataMogoLocation(): MogoLocation{
val mogoLocation = MogoLocation()
mogoLocation.latitude = latitude!!
mogoLocation.longitude = longitude!!
return mogoLocation
}
}
}

View File

@@ -559,7 +559,7 @@ object CharterPassengerModel {
.subscribeOn(Schedulers.io())
.observeOn(Schedulers.io())
.subscribe { millisUntilFinished ->
if (millisUntilFinished <= 300L) {
if (millisUntilFinished <= 900L) {
orderInfo?.let {
val isPlayed = SharedPrefs.getInstance(mContext)
.getBoolean("${it.orderNo}$min5Speak", false)
@@ -568,10 +568,10 @@ object CharterPassengerModel {
OCHSocketMessageManager.pushAppOperationalMsgBox(
DateTimeUtil.getCurrentTimeStamp(),
AbsMogoApplication.getApp()
.getString(R.string.charter_p_end_order_5min), 2
.getString(R.string.charter_p_end_order_15min), 2
)
VoiceManager.surplus5min(VoiceFocusManager.getVoiceCmdCallBack())
d(M_BUS_P + TAG, "倒计时5分钟${it.orderNo}")
VoiceManager.surplus15min(VoiceFocusManager.getVoiceCmdCallBack())
d(M_BUS_P + TAG, "倒计时15分钟${it.orderNo}")
SharedPrefs.getInstance(mContext)
.putBoolean("${it.orderNo}$min5Speak", true)
}

View File

@@ -8,6 +8,7 @@ import androidx.lifecycle.LifecycleOwner
import com.amap.api.maps.model.LatLng
import com.mogo.commons.AbsMogoApplication
import com.mogo.commons.voice.AIAssist
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
@@ -35,6 +36,7 @@ import com.mogo.och.common.module.biz.network.OchCommonServiceCallback
import com.mogo.och.common.module.manager.autopilotmanager.OCHAdasAbilityManager
import com.mogo.och.common.module.manager.StopSideStatusManager
import com.mogo.och.common.module.manager.devicemanage.callback.LightAirconditionDoorCallback
import com.mogo.och.common.module.manager.distancemamager.TrajectoryAndDistanceManager
import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil
import com.mogo.och.common.module.voice.VoiceNotice
import com.mogo.och.common.module.wigets.toast.ToastCharterUtils
@@ -241,12 +243,14 @@ class BusPassengerPresenter(view: MainFragment?) :
M_BUS_P + TAG,
"getLineTrajectory轨迹点${data.data.size}"
)
val trajectoryList = mutableListOf<LatLng>()
val trajectoryListMogoLocation = mutableListOf<MogoLocation>()
it.forEach { latLngMain ->
trajectoryList.add(latLngMain.exchangeData())
trajectoryListMogoLocation.add(latLngMain.exchangeDataMogoLocation())
}
val indexInStation =
getStationMiddleTrajectory(trajectoryListMogoLocation, sites)
drawStationInfo(sites)
mView?.drawOverMapViewTrajectory(trajectoryList)
mView?.drawOverMapViewTrajectory(indexInStation)
}
}
}
@@ -258,6 +262,69 @@ class BusPassengerPresenter(view: MainFragment?) :
}
private fun getStationMiddleTrajectory(
trajectoryList: MutableList<MogoLocation>,
sites: List<SiteInfoResponse.SiteInfo>
):MutableList<LatLng> {
if(sites.size<2){
var temp:LatLng
val indexPoint = mutableListOf<LatLng>()
trajectoryList.forEach {
temp = LatLng(it.latitude,it.longitude)
indexPoint.add(temp)
}
return indexPoint
}
val firstStation = sites.first()
val firstMogoLocation = MogoLocation()
firstMogoLocation.longitude = firstStation.GcjLon!!
firstMogoLocation.latitude = firstStation.GcjLat!!
val firstNearestPointInfo = CoordinateCalculateRouteUtil.getNearestPointInfo(
0,
trajectoryList.size, trajectoryList.toList(), firstMogoLocation, 2
)
val lastStation = sites.last()
val lastMogoLocation = MogoLocation()
lastMogoLocation.longitude = lastStation.GcjLon!!
lastMogoLocation.latitude = lastStation.GcjLat!!
val lastNearestPointInfo = CoordinateCalculateRouteUtil.getNearestPointInfo(
firstNearestPointInfo.first,
trajectoryList.size, trajectoryList.toList(), firstMogoLocation, 2
)
val firstIndex = if(firstNearestPointInfo.third>15){
0
}else{
if(firstNearestPointInfo.second==true){// 最近点是下一个点
firstNearestPointInfo.first
}else{// 最近点是上一个点
firstNearestPointInfo.first+1
}
}
val lastIndex = if(lastNearestPointInfo.third>15){
trajectoryList.size-1
}else{
if(firstNearestPointInfo.second==true){// 最近点是下一个点
firstNearestPointInfo.first-1
}else{// 最近点是上一个点
firstNearestPointInfo.first
}
}
val subList = trajectoryList.subList(firstIndex, lastIndex)
val indexPoint = mutableListOf<LatLng>()
var temp:LatLng
subList.forEach {
temp = LatLng(it.latitude,it.longitude)
indexPoint.add(temp)
}
return indexPoint
}
fun drawStationInfo(sites: List<SiteInfoResponse.SiteInfo>) {
val stationsList: MutableList<SiteMarkerBean> = mutableListOf()
val stationsNameList: MutableList<SiteMarkerBean> = mutableListOf()

View File

@@ -13,7 +13,6 @@ import kotlinx.android.synthetic.main.charter_p_bottom_bar.view.actv_open_door
import kotlinx.android.synthetic.main.charter_p_bottom_bar.view.actv_setting
import kotlinx.android.synthetic.main.charter_p_bottom_bar.view.actv_stop_site
import kotlinx.android.synthetic.main.charter_p_bottom_bar.view.cl_order_time
import kotlinx.android.synthetic.main.charter_p_bottom_bar.view.cl_order_time_press
class BottomBar @JvmOverloads constructor(
context: Context,
@@ -66,11 +65,9 @@ class BottomBar @JvmOverloads constructor(
return
}
if(checkIndex == SelectView.ORDERINFO){
cl_order_time_press.visibility = VISIBLE
cl_order_time.setCheck(true)
cl_order_time.setCheckItem(true)
}else{
cl_order_time_press.visibility = GONE
cl_order_time.setCheck(false)
cl_order_time.setCheckItem(false)
}
if(checkIndex == SelectView.SETTING){
actv_setting.setCheckItem(true)

View File

@@ -3,7 +3,10 @@ package com.mogo.och.charter.passenger.ui.bottom
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import androidx.appcompat.widget.AppCompatImageView
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.content.ContextCompat
import com.mogo.commons.AbsMogoApplication
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
@@ -33,55 +36,75 @@ open class BottomOrderInfoView @JvmOverloads constructor(
private const val TAG = "BottomOrderInfoView"
}
private var backageViewId: Int = -1
private var backageView: AppCompatImageView? = null
private var isCheck = false
private var leftTime = -1L
private var viewState:ViewState = ViewState.Normal
init {
LayoutInflater.from(context).inflate(R.layout.charter_p_bottom_orderinfo, this, true)
try {
val typedArray =
context.obtainStyledAttributes(attrs, R.styleable.CharterPBottomSelectView)
backageViewId = typedArray.getResourceId(
R.styleable.CharterPBottomSelectView_charterPBackageViewId,
-1
)
typedArray.recycle()
initView(context)
} catch (e: Exception) {
e.printStackTrace()
}
tag = UUID.randomUUID().toString()
}
fun setCheck(isCheck:Boolean){
if(isCheck){
actv_order_end_time.setTextColor(context.getColor(android.R.color.white))
actv_order_null.setTextColor(context.getColor(android.R.color.white))
actv_order_end_time_title.setTextColor(context.getColor(android.R.color.white))
}else{
actv_order_end_time.setTextColor(context.getColor(R.color.charter_p_0050E1))
actv_order_null.setTextColor(context.getColor(R.color.charter_p_090f28))
actv_order_end_time_title.setTextColor(context.getColor(R.color.charter_p_090f28))
fun setCheckItem(isCheck: Boolean) {
if (isCheck != this.isCheck) {
this.isCheck = isCheck
notifiBackageView()
}
}
private fun initView(context: Context) {
setViewByOrderStatus(CharterPassengerModel.getCurrentOrderStatus())
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
CallerLogger.d(SceneConstant.M_BUS_P + TAG,"onAttachedToWindow$tag")
CharterPassengerModel.setOrderLeftTimeListeners(tag.toString(),this)
CharterPassengerModel.setStatusChangeListener(tag.toString(),this)
CallerLogger.d(SceneConstant.M_BUS_P + TAG, "onAttachedToWindow")
CharterPassengerModel.setOrderLeftTimeListeners(TAG, this)
CharterPassengerModel.setStatusChangeListener(TAG, this)
parent?.let {
if (parent is ConstraintLayout) {
if (backageViewId > 0) {
backageView = (parent as ConstraintLayout).findViewById(backageViewId)
}
}
}
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
CallerLogger.d(SceneConstant.M_BUS_P + TAG,"onDetachedFromWindow$tag")
CharterPassengerModel.setOrderLeftTimeListeners(tag.toString(),null)
CharterPassengerModel.setStatusChangeListener(tag.toString(),null)
CallerLogger.d(SceneConstant.M_BUS_P + TAG, "onDetachedFromWindow")
CharterPassengerModel.setOrderLeftTimeListeners(TAG, null)
CharterPassengerModel.setStatusChangeListener(TAG, null)
}
private fun setViewByOrderStatus(currentOrderStatus: OrderStatusEnum) {
when (currentOrderStatus) {
OrderStatusEnum.Nothing,
OrderStatusEnum.NoOrderUse,
OrderStatusEnum.NoOrderUnuse ->{
OrderStatusEnum.NoOrderUnuse -> {
actv_order_null.visibility = VISIBLE
clg_order_info.visibility = GONE
actv_order_end_time.text = AbsMogoApplication.getApp().getString(R.string.charter_p_bottom_reach_time)
actv_order_end_time.text =
AbsMogoApplication.getApp().getString(R.string.charter_p_bottom_reach_time)
leftTime = -1
}
OrderStatusEnum.OrderNoLine,
OrderStatusEnum.OrdersWithLine -> {
actv_order_null.visibility = GONE
@@ -91,19 +114,73 @@ open class BottomOrderInfoView @JvmOverloads constructor(
}
override fun setOrderTimeCallBack(timeInSecond: Long) {
if(timeInSecond>0){
val arriveTime = DateTimeUtil.second2Time(timeInSecond)
actv_order_end_time.text = arriveTime
}
UiThreadHandler.post {
if (timeInSecond > 0) {
val arriveTime = DateTimeUtil.second2Time(timeInSecond)
actv_order_end_time.text = arriveTime
leftTime = timeInSecond
notifiBackageView()
}
setViewByOrderStatus(CharterPassengerModel.getCurrentOrderStatus())
}
}
private fun notifiBackageView() {
if (isCheck) {
backageView?.visibility = View.VISIBLE
actv_order_null.setTextColor(context.getColor(android.R.color.white))
actv_order_end_time_title.setTextColor(context.getColor(android.R.color.white))
if(leftTime<900){
actv_order_end_time.setTextColor(context.getColor(R.color.charter_p_ff6d2c))
if(viewState!=ViewState.Near900){
viewState = ViewState.Near900
updateState()
}
}else{
actv_order_end_time.setTextColor(context.getColor(android.R.color.white))
if(viewState!=ViewState.Normal){
viewState = ViewState.Normal
updateState()
}
}
} else {
actv_order_null.setTextColor(context.getColor(R.color.charter_p_090f28))
actv_order_end_time_title.setTextColor(context.getColor(R.color.charter_p_090f28))
if(leftTime<900){
actv_order_end_time.setTextColor(context.getColor(R.color.charter_p_ff6d2c))
if(leftTime<300){//0-300s
backageView?.visibility = View.VISIBLE
if(viewState!=ViewState.Near300){
viewState = ViewState.Near300
updateState()
}
}else{//300s-900s
backageView?.visibility = View.GONE
}
}else{
backageView?.visibility = View.GONE
actv_order_end_time.setTextColor(context.getColor(R.color.charter_p_0050E1))
}
}
}
private fun updateState(){
when (viewState) {
ViewState.Normal -> backageView?.setImageResource(R.drawable.charter_p_bottom_bar_select_bg)
ViewState.Near300 -> backageView?.setImageResource(R.drawable.charter_p_bottom_bar_select_near300s_bg)
ViewState.Near900 -> backageView?.setImageResource(R.drawable.charter_p_bottom_bar_select_near900s_bg)
}
}
override fun onStatusChange(currentStatus: OrderStatusEnum) {
UiThreadHandler.post {
setViewByOrderStatus(currentStatus)
}
}
enum class ViewState{
Normal,Near300,Near900
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View File

@@ -95,6 +95,7 @@
<com.mogo.och.charter.passenger.ui.bottom.BottomOrderInfoView
android:id="@+id/cl_order_time"
app:charterPBackageViewId="@+id/cl_order_time_press"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@+id/actv_setting"
app:layout_constraintTop_toTopOf="parent"

View File

@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/cl_container"
xmlns:app="http://schemas.android.com/apk/res-auto">
<FrameLayout
android:id="@+id/fl_function_group"
app:layout_constraintBottom_toTopOf="@+id/bb_bottom_bar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginBottom="@dimen/dp_34_5"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<com.mogo.och.charter.passenger.ui.bottom.BottomBar
android:id="@+id/bb_bottom_bar"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_107"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,154 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/cl_container_order_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.constraintlayout.widget.ConstraintLayout
android:background="@drawable/charter_p_shape_order_info"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:clickable="true"
android:layout_marginBottom="@dimen/dp_140"
android:layout_marginStart="@dimen/dp_26"
android:layout_width="@dimen/dp_327"
android:layout_height="@dimen/dp_270">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/actv_order_phone"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginStart="@dimen/dp_33"
android:text="18811539480"
android:textSize="@dimen/dp_20"
android:textColor="@color/charter_p_203555"
android:layout_marginTop="@dimen/dp_32"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/actv_order_times"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="@dimen/dp_31"
app:layout_constraintTop_toBottomOf="@+id/actv_order_phone"
android:text="09:00-18:00"
android:textSize="@dimen/dp_36"
android:textColor="@color/charter_p_0050E1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/actv_order_times_title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="@dimen/dp_8"
app:layout_constraintTop_toBottomOf="@+id/actv_order_times"
android:text="用车时间"
android:textSize="@dimen/dp_18"
android:textColor="@color/charter_p_112b57"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/actv_end_order"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/actv_order_times_title"
android:layout_marginTop="@dimen/dp_25"
android:layout_marginBottom="@dimen/dp_27"
android:background="@drawable/charter_p_shape_end_order"
android:gravity="center"
android:text="结束用车"
android:textSize="@dimen/dp_18"
android:paddingEnd="@dimen/dp_42"
android:paddingStart="@dimen/dp_42"
android:paddingTop="@dimen/dp_14"
android:paddingBottom="@dimen/dp_13"
android:textColor="@android:color/white"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:background="@drawable/charter_p_shape_order_info"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:clickable="true"
android:visibility="gone"
android:layout_marginBottom="@dimen/dp_140"
android:layout_marginStart="@dimen/dp_26"
android:layout_width="@dimen/dp_400"
android:layout_height="@dimen/dp_270">
<androidx.appcompat.widget.AppCompatTextView
android:text="剩余时间 02:37"
android:textSize="@dimen/dp_20"
android:textColor="@color/charter_p_5F7096"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginTop="@dimen/dp_33"
android:layout_marginEnd="@dimen/dp_32"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/actv_end_order_content"
android:text="要提前说再见了吗?蘑菇小助手很舍不得您呢!"
android:textSize="@dimen/dp_26"
android:textColor="@color/charter_p_112b57"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginStart="@dimen/dp_30"
android:layout_marginEnd="@dimen/dp_30"
android:layout_marginTop="@dimen/dp_92"
android:layout_width="0dp"
android:layout_height="wrap_content"/>
<androidx.appcompat.widget.AppCompatTextView
android:text="结束用车"
android:textSize="@dimen/dp_24"
android:textColor="@android:color/white"
app:layout_constraintTop_toBottomOf="@+id/actv_end_order_content"
android:background="@drawable/charter_p_shape_end_order_left"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginStart="@dimen/dp_30"
android:layout_marginTop="@dimen/dp_17"
android:paddingTop="@dimen/dp_14"
android:paddingBottom="@dimen/dp_13"
android:paddingStart="@dimen/dp_32"
android:paddingEnd="@dimen/dp_32"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<androidx.appcompat.widget.AppCompatTextView
android:text="结束用车"
android:textSize="@dimen/dp_24"
android:textColor="@android:color/white"
android:background="@drawable/charter_p_shape_end_order"
app:layout_constraintTop_toBottomOf="@+id/actv_end_order_content"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginEnd="@dimen/dp_30"
android:layout_marginTop="@dimen/dp_17"
android:paddingTop="@dimen/dp_14"
android:paddingBottom="@dimen/dp_13"
android:paddingStart="@dimen/dp_32"
android:paddingEnd="@dimen/dp_32"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</androidx.constraintlayout.widget.ConstraintLayout>
<com.mogo.och.charter.passenger.ui.bottom.BottomBar
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_107"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -53,4 +53,5 @@
<color name="charter_p_40ffffff">#40FFFFFF</color>
<color name="charter_p_f0e0efff">#F0E0EFFF </color>
<color name="charter_p_66000000">#66000000</color>
<color name="charter_p_ff6d2c">#FF6D2C</color>
</resources>

View File

@@ -27,7 +27,7 @@
<string name="charter_p_stop_site_success">靠边停车成功</string>
<string name="charter_p_please_login_driver">请安全员登录司机屏</string>
<string name="charter_p_end_order_5min">包车将在5分钟后结束结束后我们将自动为您寻找停车点</string>
<string name="charter_p_end_order_15min">包车将在15分钟后结束结束后我们将自动为您寻找停车点</string>
<string name="charter_p_distance_unit_km">距离KM</string>

View File

@@ -74,15 +74,15 @@ object VoiceManager {
}
fun surplus5min(){
surplus5min(null)
surplus15min(null)
}
fun surplus5min(callBack: IMogoTTSCallback?=null) {
fun surplus15min(callBack: IMogoTTSCallback?=null) {
val contenxt = AbsMogoApplication.getApp()
val list: MutableList<LangTtsEntity> = ArrayList()
val chineseTTS = LangTtsEntity(contenxt.getString(R.string.surplus5_order_zh), LanguageType.CHINESE)
val engTTS = LangTtsEntity(contenxt.getString(R.string.surplus5_order_en), LanguageType.ENGLISH)
val koreanTTS = LangTtsEntity(contenxt.getString(R.string.surplus5_order_ko), LanguageType.KOREAN)
val chineseTTS = LangTtsEntity(contenxt.getString(R.string.surplus15_order_zh), LanguageType.CHINESE)
val engTTS = LangTtsEntity(contenxt.getString(R.string.surplus15_order_en), LanguageType.ENGLISH)
val koreanTTS = LangTtsEntity(contenxt.getString(R.string.surplus15_order_ko), LanguageType.KOREAN)
list.add(chineseTTS)
list.add(engTTS)
list.add(koreanTTS)

View File

@@ -5,8 +5,11 @@ import android.util.AttributeSet
import android.view.LayoutInflater
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.utilcode.kotlin.onClick
import com.mogo.eagle.core.utilcode.util.ActivityUtils
import com.mogo.och.common.module.R
import com.mogo.och.common.module.manager.DriverMoFangFunctionManager
import com.mogo.och.common.module.manager.devicemanage.LightAirconditionDoorManager
import com.mogo.och.common.module.utils.SoundPoolHelper
import kotlinx.android.synthetic.main.driver_mofang_function_view.view.*
/**
@@ -43,6 +46,14 @@ class DriverMoFangFunctionView @JvmOverloads constructor(
DriverMoFangFunctionManager.driverMoFangFunctionManager.sendOperatorSetHornByDriver()
true
}
openDoorIv.onClick {
LightAirconditionDoorManager.go2OpenDoor(true)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(ActivityUtils.getActivityByContext(context), R.raw.beep)
}
closeDoorIv.onClick {
LightAirconditionDoorManager.go2OpenDoor(false)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(ActivityUtils.getActivityByContext(context), R.raw.beep)
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/open_door_selected" android:state_pressed="true" />
<item android:drawable="@drawable/open_door_selected" android:state_focused="true" />
<item android:drawable="@drawable/open_door_normal" />
</selector>

View File

@@ -1,16 +1,16 @@
<?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="1012dp"
android:layout_width="1116dp"
android:layout_height="@dimen/dp_278"
android:background="@drawable/driver_mofang_function_bg">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/moderateIv"
android:layout_width="@dimen/dp_182"
android:layout_height="@dimen/dp_182"
android:layout_marginLeft="@dimen/dp_104"
android:layout_width="@dimen/dp_164"
android:layout_height="@dimen/dp_164"
android:layout_marginLeft="@dimen/dp_67"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
@@ -18,9 +18,8 @@
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/brakeStopIv"
android:layout_width="@dimen/dp_182"
android:layout_height="@dimen/dp_182"
android:layout_marginLeft="@dimen/dp_24"
android:layout_width="@dimen/dp_164"
android:layout_height="@dimen/dp_164"
app:layout_constraintLeft_toRightOf="@+id/moderateIv"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
@@ -28,9 +27,8 @@
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/resetIv"
android:layout_width="@dimen/dp_182"
android:layout_height="@dimen/dp_182"
android:layout_marginLeft="@dimen/dp_24"
android:layout_width="@dimen/dp_164"
android:layout_height="@dimen/dp_164"
app:layout_constraintLeft_toRightOf="@+id/brakeStopIv"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
@@ -38,12 +36,29 @@
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/whistleIv"
android:layout_width="@dimen/dp_182"
android:layout_height="@dimen/dp_182"
android:layout_marginLeft="@dimen/dp_24"
android:layout_width="@dimen/dp_164"
android:layout_height="@dimen/dp_164"
app:layout_constraintLeft_toRightOf="@+id/resetIv"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:src="@drawable/whistle_btn_selector"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/closeDoorIv"
android:layout_width="@dimen/dp_164"
android:layout_height="@dimen/dp_164"
app:layout_constraintLeft_toRightOf="@+id/whistleIv"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:src="@drawable/open_door_btn_selector"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/openDoorIv"
android:layout_width="@dimen/dp_164"
android:layout_height="@dimen/dp_164"
app:layout_constraintLeft_toRightOf="@+id/closeDoorIv"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:src="@drawable/open_door_btn_selector"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -23,9 +23,9 @@
<string name="leave_station_en">The next station is %1$s</string>
<string name="leave_station_ko">전방에서 역에 도착하는 %1$s</string>
<string name="surplus5_order_zh">5分钟后包车就要结束了稍后小助手会自动为您寻找停车点</string>
<string name="surplus5_order_en">There are 5 minutes left from the end of chartering. Please arrange your time reasonably</string>
<string name="surplus5_order_ko">전세버스 종료 후 5분 남았습니다. 여행 시간을 합리적으로 안배해 주십시오</string>
<string name="surplus15_order_zh">15分钟后包车就要结束了稍后小助手会自动为您寻找停车点</string>
<string name="surplus15_order_en">There are 15 minutes left from the end of chartering. Please arrange your time reasonably</string>
<string name="surplus15_order_ko">전세버스 종료 후 15분 남았습니다. 여행 시간을 합리적으로 안배해 주십시오</string>
<string name="end_order_zh">感谢您体验\'蘑菇车联\'自动驾驶小巴车,本次旅程已结束,我们下次乘车再见</string>
<string name="end_order_en">Thank you for experiencing the self-driving minibus. See you next time</string>