[fea]
[到达目的地页面迁移]
This commit is contained in:
yangyakun
2024-06-24 10:41:42 +08:00
parent 5aa5201abe
commit 1e13d2cae1
47 changed files with 168 additions and 616 deletions

View File

@@ -1,5 +1,6 @@
package com.mogo.och.common.module.network
import com.mogo.commons.debug.DebugConfig
import com.mogo.eagle.core.data.BaseData
import com.mogo.eagle.core.network.RequestOptions
import com.mogo.eagle.core.network.SubscribeImpl
@@ -22,7 +23,7 @@ class OchCommonSubscribeImpl<T : BaseData>(
init {
CallerLogger.e("$flavorTag$TAG", "$apiName: 去请求()")
if(writeLog) {
if(writeLog || DebugConfig.isDebug()) {
OchChainLogManager.writeChainLogNet("接口:${apiName}_${tag}", "去请求")
}
}
@@ -30,7 +31,7 @@ class OchCommonSubscribeImpl<T : BaseData>(
override fun onSuccess(o: T) {
super.onSuccess(o)
CallerLogger.d("$flavorTag$TAG", "$apiName: onSuccess() ${o.msg}")
if(writeLog) {
if(writeLog || DebugConfig.isDebug()) {
OchChainLogManager.writeChainLogNet("接口:${apiName}_${tag}", "请求成功:${o}")
}
callback?.onSuccess(o)
@@ -39,7 +40,7 @@ class OchCommonSubscribeImpl<T : BaseData>(
override fun onError(e: Throwable) {
super.onError(e)
CallerLogger.e("$flavorTag$TAG", "$apiName: onError() ${e.message}")
if(writeLog) {
if(writeLog || DebugConfig.isDebug()) {
OchChainLogManager.writeChainLogNet("接口:${apiName}_${tag}", "请求失败:${e.message}")
}
callback?.onError("$apiName: onError() ${e.message}")
@@ -49,7 +50,7 @@ class OchCommonSubscribeImpl<T : BaseData>(
override fun onError(message: String, code: Int) {
super.onError(message, code)
CallerLogger.e("$flavorTag$TAG", "$apiName: onError() code = $code; message = $message")
if(writeLog) {
if(writeLog || DebugConfig.isDebug()) {
OchChainLogManager.writeChainLogNet(
"接口:${apiName}_${tag}",
"请求失败: onError() code = $code; message = $message\""

View File

@@ -61,6 +61,11 @@ public class TaxiPassengerOrderQueryRespBean extends BaseData {
public String txtFileMd5DPQP = ""; //轨迹文件md5默认“”
public long contrailSaveTimeDPQP; //上传轨迹完成时间戳ms用于MEC本地手动导入轨迹验证时不会被云端轨迹覆盖
@Override
public String getEndSiteAddr() {
return endSiteAddr;
}
@Override
public int compareTo(Result o) {
boolean isEqual = this.orderNo.equals(o.orderNo);

View File

@@ -23,6 +23,7 @@ import com.mogo.och.common.module.utils.RxUtils
import com.mogo.och.common.module.voice.VoiceNotice
import com.mogo.och.taxi.passenger.R
import com.mogo.och.taxi.passenger.presenter.BaseTaxiPassengerPresenter
import com.mogo.och.taxi.passenger.ui.arrived.ArrivedView
import com.mogo.och.taxi.passenger.ui.bar.LeftBarView
import com.mogo.och.taxi.passenger.ui.bottom.BottomBar
import com.mogo.och.taxi.passenger.ui.checkstartautopilot.ChekAndStartAutopilotView
@@ -163,7 +164,7 @@ class TaxiPassengerBaseFragment() :
}
})
arrivedView.arrivedVisilityChangeListenr = object :ArrivedView.ArrivedVisilityChangeListenr{
arrivedView.arrivedVisilityChangeListenr = object : ArrivedView.ArrivedVisilityChangeListenr{
override fun isShow(show: Boolean) {
CallerLogger.d(M_TAXI_P + TAG, "arrived ${show}")
if(arrivedView.visibility==View.GONE&&chekAndStartAutopilotView.visibility==View.GONE){

View File

@@ -7,6 +7,7 @@ import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.fragment.app.FragmentActivity
import com.alibaba.android.arouter.launcher.ARouter
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
@@ -15,6 +16,8 @@ import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
import com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugView
import com.mogo.eagle.core.utilcode.kotlin.onClick
import com.mogo.eagle.core.utilcode.util.ActivityUtils
import com.mogo.och.common.module.biz.provider.CommonService
import com.mogo.och.common.module.constant.OchCommonConst
import com.mogo.och.common.module.manager.debug.DebugViewWatchDogFragment
import com.mogo.och.taxi.passenger.R
import com.mogo.och.taxi.passenger.ui.TaxiPassengerBaseFragment
@@ -55,10 +58,13 @@ class DebugView @JvmOverloads constructor(
val activityByContext = ActivityUtils.getActivityByContext(context)
if(activityByContext is FragmentActivity){
val fragment =
activityByContext.supportFragmentManager.findFragmentByTag(TaxiPassengerBaseFragment.TAG)
if(fragment is TaxiPassengerBaseFragment){
this.fragment = fragment
val commonService = ARouter.getInstance().build(OchCommonConst.TAXI_UNMANNED_PASSENGER)
.navigation() as CommonService?
commonService?.let {
val fragment = it.getFragment()
if(fragment is TaxiPassengerBaseFragment){
this.fragment = fragment
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -55,7 +55,7 @@
<color name="taxi_p_876E788B">#876E788B</color>
<color name="taxi_p_333333">#333333</color>
<color name="taxi_p_373B46">#373B46</color>
<color name="taxi_p_80E5F0FF">#80E5F0FF</color>
<color name="taxi_p_E6E5F0FF">#E6E5F0FF</color>
<color name="taxi_p_4D7985A7">#4D7985A7</color>

View File

@@ -15,8 +15,8 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
import com.mogo.och.common.module.manager.xiaozhi.ZhiViewmanager
import com.mogo.och.common.module.utils.BigFrameAnimatorContainer
import com.mogo.och.common.module.utils.RxUtils
import com.mogo.och.taxi.passenger.R
import com.mogo.och.taxi.passenger.widget.WindowRelativeLayout
import com.mogo.och.common.module.wigets.WindowRelativeLayout
import com.mogo.och.taxi.passenger.common.R
import io.reactivex.disposables.Disposable
import kotlinx.android.synthetic.main.taxi_p_arrived_end_panel.view.aciv_bg
import kotlinx.android.synthetic.main.taxi_p_arrived_end_panel.view.aciv_close

View File

@@ -3,7 +3,7 @@ package com.mogo.och.taxi.passenger.ui.arrived
import androidx.lifecycle.ViewModel
import com.mogo.och.common.module.manager.distance.IDistanceListener
import com.mogo.och.common.module.manager.distance.TrajectoryAndDistanceManager
import com.mogo.och.taxi.passenger.model.TaxiPassengerModel
import com.mogo.och.taxi.passenger.ui.model.order.OrderModel
class ArrivedViewModel : ViewModel(), IDistanceListener {
@@ -22,14 +22,14 @@ class ArrivedViewModel : ViewModel(), IDistanceListener {
}
fun setEndInfo() {
TaxiPassengerModel.currentOCHOrder?.endSiteAddr?.let {
OrderModel.orderBean?.endSiteAddr?.let {
this.viewCallback?.setEndStation(it)
}
}
override fun distanceCallback(distance: Float) {
if (distance <= 50) {
TaxiPassengerModel.currentOCHOrder?.orderNo?.let {
OrderModel.orderBean?.orderNo?.let {
if (it != havePreLoadOrderNum) {
this.viewCallback?.preLoadImages()
havePreLoadOrderNum = it

View File

@@ -4,10 +4,10 @@ import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.och.taxi.passenger.R
import kotlinx.android.synthetic.main.taxi_p_bottom_bar.view.actv_overmap
import kotlinx.android.synthetic.main.taxi_p_bottom_bar.view.actv_precisionmap
import kotlinx.android.synthetic.main.taxi_p_bottom_bar.view.actv_video
import com.mogo.och.taxi.passenger.common.R
import kotlinx.android.synthetic.main.taxt_p_bottom_bar.view.actv_overmap
import kotlinx.android.synthetic.main.taxt_p_bottom_bar.view.actv_precisionmap
import kotlinx.android.synthetic.main.taxt_p_bottom_bar.view.actv_video
class BottomBar @JvmOverloads constructor(
context: Context,
@@ -16,12 +16,12 @@ class BottomBar @JvmOverloads constructor(
) : ConstraintLayout(context, attrs, defStyleAttr) {
private var checkIndex = SelectView.NONE
private var overMapViewApply:ApplyClickLintener?=null
private var overMapViewApply: ApplyClickLintener?=null
init {
isClickable = true
LayoutInflater.from(context).inflate(R.layout.taxi_p_bottom_bar, this, true)
setBackgroundResource(R.drawable.taxi_p_bottom_bar_bg)
LayoutInflater.from(context).inflate(R.layout.taxt_p_bottom_bar, this, true)
setBackgroundResource(R.drawable.taxt_p_bottom_bar_bg)
actv_precisionmap.setOnClickListener {
setCheckIndex(SelectView.PRECISIONMAP)
}
@@ -33,7 +33,7 @@ class BottomBar @JvmOverloads constructor(
}
}
fun getCurrentPage():SelectView{
fun getCurrentPage(): SelectView {
return checkIndex
}
@@ -42,7 +42,7 @@ class BottomBar @JvmOverloads constructor(
setCheckIndex(SelectView.PRECISIONMAP)
}
fun setOverMapApplyClick(overMapViewApply:ApplyClickLintener){
fun setOverMapApplyClick(overMapViewApply: ApplyClickLintener){
this.overMapViewApply = overMapViewApply
}
@@ -75,7 +75,7 @@ class BottomBar @JvmOverloads constructor(
}
interface ApplyClickLintener{
fun onApplyClick(selectItem:SelectView)
fun onApplyClick(selectItem: SelectView)
}
}

View File

@@ -6,9 +6,9 @@ import android.view.LayoutInflater
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.content.ContextCompat
import com.mogo.och.taxi.passenger.R
import kotlinx.android.synthetic.main.taxi_p_bottom_check.view.aciv_center_image
import kotlinx.android.synthetic.main.taxi_p_bottom_check.view.actv_title
import com.mogo.och.taxi.passenger.common.R
import kotlinx.android.synthetic.main.taxt_p_bottom_check.view.aciv_center_image
import kotlinx.android.synthetic.main.taxt_p_bottom_check.view.actv_title
open class BottomCheckView @JvmOverloads constructor(
context: Context,
@@ -31,7 +31,7 @@ open class BottomCheckView @JvmOverloads constructor(
private var isCheck = false
init {
LayoutInflater.from(context).inflate(R.layout.taxi_p_bottom_check, this, true)
LayoutInflater.from(context).inflate(R.layout.taxt_p_bottom_check, this, true)
try {
val typedArray = context.obtainStyledAttributes(attrs, R.styleable.BottomSelectView)
backageViewId = typedArray.getResourceId(R.styleable.BottomSelectView_backageViewId, -1)

View File

@@ -3,4 +3,8 @@ package com.mogo.och.taxi.passenger.ui.model.order;
public class BaseOrderBean {
public String orderNo;// 订单号
public int orderStatus;//订单状态
public String getEndSiteAddr() {
return "";
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

View File

@@ -0,0 +1,62 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/cl_contain"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:ignore="MissingDefaultResource">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/aciv_bg"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/aciv_close"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:src="@drawable/taxi_p_passenger_arrived_close"
android:layout_marginEnd="@dimen/dp_50"
android:layout_marginTop="@dimen/dp_50"
android:layout_width="@dimen/dp_120"
android:layout_height="@dimen/dp_120"/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/actv_arrived_station"
app:layout_constraintStart_toStartOf="@+id/actv_endstation"
app:layout_constraintBottom_toTopOf="@+id/actv_endstation"
android:layout_marginBottom="@dimen/dp_13"
android:textColor="@color/taxi_cp_373B46"
android:textSize="@dimen/dp_56"
android:text="已到达"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/actv_endstation"
app:layout_constraintStart_toStartOf="@+id/v_video_right_rear_view"
app:layout_constraintBottom_toTopOf="@+id/v_video_right_rear_view"
android:layout_marginBottom="@dimen/dp_26"
android:textColor="@color/taxi_cp_373B46"
android:maxLines="2"
android:ellipsize="end"
android:maxWidth="@dimen/dp_1200"
android:textSize="@dimen/dp_68"
android:textStyle="bold"
tools:text="环球贸易中心环球贸易中心环球贸易中心环球贸易中心环球贸易中心环球贸易中心环球贸易中心环球贸易中心"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<com.mogo.och.taxi.passenger.ui.arrived.RightRearCamView
android:id="@+id/v_video_right_rear_view"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginStart="@dimen/dp_90"
android:layout_marginBottom="@dimen/dp_90"
android:layout_width="@dimen/dp_900"
android:layout_height="@dimen/dp_506"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -4,7 +4,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/dp_160"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:background="@drawable/taxi_p_bottom_bar_bg"
tools:background="@drawable/taxt_p_bottom_bar_bg"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"
tools:ignore="MissingDefaultResource">
@@ -13,11 +13,11 @@
android:format12Hour="M月d日 "
android:format24Hour="M月d日 "
android:gravity="center"
android:fontFamily="@font/din"
android:fontFamily="@font/taxt_u_p_din"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:textColor="@color/taxi_p_111D2F"
android:textColor="@color/taxi_cp_111D2F"
android:textSize="@dimen/dp_52"
android:layout_marginStart="@dimen/dp_92"
android:layout_width="wrap_content"
@@ -28,11 +28,11 @@
android:format12Hour="HH:mm"
android:format24Hour="HH:mm"
android:gravity="center"
android:fontFamily="@font/din"
android:fontFamily="@font/taxt_u_p_din"
app:layout_constraintStart_toEndOf="@+id/cl_order_time"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:textColor="@color/taxi_p_111D2F"
android:textColor="@color/taxi_cp_111D2F"
android:letterSpacing="0.1"
android:textSize="@dimen/dp_52"
android:layout_width="wrap_content"
@@ -42,7 +42,7 @@
android:id="@+id/actv_precisionmap_press"
android:visibility="gone"
android:layout_marginTop="@dimen/dp_2"
android:src="@drawable/taxi_p_bottom_bar_select_bg"
android:src="@drawable/taxt_p_bottom_bar_select_bg"
app:layout_constraintStart_toStartOf="@+id/actv_precisionmap"
app:layout_constraintEnd_toEndOf="@+id/actv_precisionmap"
android:layout_width="@dimen/dp_420"
@@ -52,12 +52,12 @@
android:id="@+id/actv_precisionmap"
app:backageViewId="@+id/actv_precisionmap_press"
app:layout_constraintHorizontal_chainStyle="packed"
app:selectedDrawable="@drawable/taxi_p_bottom_precisionmap_press"
app:normalDrawable="@drawable/taxi_p_bottom_precisionmap_normal"
app:selectedDrawable="@drawable/taxt_p_bottom_precisionmap_press"
app:normalDrawable="@drawable/taxt_p_bottom_precisionmap_normal"
android:layout_marginEnd="@dimen/dp_107"
app:bottomTitle="行车实况"
app:bottomTitleCheckedColor="@color/white"
app:bottomTitleNormalColor="@color/taxi_p_41444D"
app:bottomTitleNormalColor="@color/taxi_cp_41444D"
app:layout_constraintEnd_toStartOf="@+id/actv_overmap"
app:layout_constraintStart_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
@@ -72,7 +72,7 @@
android:id="@+id/actv_overmap_press"
android:visibility="gone"
android:layout_marginTop="@dimen/dp_2"
android:src="@drawable/taxi_p_bottom_bar_select_bg"
android:src="@drawable/taxt_p_bottom_bar_select_bg"
app:layout_constraintStart_toStartOf="@+id/actv_overmap"
app:layout_constraintEnd_toEndOf="@+id/actv_overmap"
android:layout_width="@dimen/dp_420"
@@ -81,13 +81,13 @@
<com.mogo.och.taxi.passenger.ui.bottom.BottomCheckView
android:id="@+id/actv_overmap"
app:backageViewId="@+id/actv_overmap_press"
app:selectedDrawable="@drawable/taxi_p_bottom_overmap_press"
app:normalDrawable="@drawable/taxi_p_bottom_overmap_normal"
app:selectedDrawable="@drawable/taxt_p_bottom_overmap_press"
app:normalDrawable="@drawable/taxt_p_bottom_overmap_normal"
app:bottomTitle="全局概览"
app:bottomTitleCheckedColor="@color/white"
android:layout_marginEnd="@dimen/dp_107"
android:layout_marginStart="@dimen/dp_107"
app:bottomTitleNormalColor="@color/taxi_p_41444D"
app:bottomTitleNormalColor="@color/taxi_cp_41444D"
app:layout_constraintStart_toEndOf="@+id/actv_precisionmap"
app:layout_constraintEnd_toStartOf="@+id/actv_video"
app:layout_constraintTop_toTopOf="parent"
@@ -102,7 +102,7 @@
android:id="@+id/actv_video_press"
android:visibility="gone"
android:layout_marginTop="@dimen/dp_2"
android:src="@drawable/taxi_p_bottom_bar_select_bg"
android:src="@drawable/taxt_p_bottom_bar_select_bg"
app:layout_constraintStart_toStartOf="@+id/actv_video"
app:layout_constraintEnd_toEndOf="@+id/actv_video"
android:layout_width="@dimen/dp_420"
@@ -111,12 +111,12 @@
<com.mogo.och.taxi.passenger.ui.bottom.BottomCheckView
android:id="@+id/actv_video"
app:backageViewId="@+id/actv_video_press"
app:selectedDrawable="@drawable/taxi_p_bottom_video_press"
app:normalDrawable="@drawable/taxi_p_bottom_video_normal"
app:selectedDrawable="@drawable/taxt_p_bottom_video_press"
app:normalDrawable="@drawable/taxt_p_bottom_video_normal"
app:bottomTitle="蘑菇资讯"
android:layout_marginStart="@dimen/dp_107"
app:bottomTitleCheckedColor="@color/white"
app:bottomTitleNormalColor="@color/taxi_p_41444D"
app:bottomTitleNormalColor="@color/taxi_cp_41444D"
app:layout_constraintStart_toEndOf="@+id/actv_overmap"
app:layout_constraintEnd_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="BottomSelectView">
<!-- 默认图片 -->
<attr name="normalDrawable" format="reference" />
<!-- 点击图片 -->
<attr name="selectedDrawable" format="reference" />
<!-- 显示背景view -->
<attr name="backageViewId" format="reference" />
<attr name="bottomTitle" format="string"/>
<attr name="bottomTitleNormalColor" format="color"/>
<attr name="bottomTitleCheckedColor" format="color"/>
</declare-styleable>
</resources>

View File

@@ -16,5 +16,9 @@
<color name="taxi_cp_131415">#131415</color>
<color name="taxi_cp_80FFFFFF">#80FFFFFF</color>
<color name="taxi_cp_76D7FF">#76D7FF</color>
<color name="taxi_cp_373B46">#373B46</color>
<color name="taxi_cp_111D2F">#111D2F</color>
<color name="taxi_cp_41444D">#41444D</color>
</resources>

View File

@@ -56,6 +56,11 @@ public class TaxiPassengerOrdersInServiceQueryRespBean extends BaseData {
public Long orderLine;//送驾的lineId
@Override
public String getEndSiteAddr() {
return orderEndSite.siteName;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;

View File

@@ -21,12 +21,12 @@ import com.mogo.och.common.module.constant.OchCommonConst
import com.mogo.och.common.module.manager.xiaozhi.ZhiStateManager
import com.mogo.och.common.module.utils.RxUtils
import com.mogo.och.common.module.voice.VoiceNotice
import com.mogo.och.taxi.passenger.ui.arrived.ArrivedView
import com.mogo.och.unmanned.taxi.passenger.R
import com.mogo.och.taxi.passenger.ui.bar.LeftBarView
import com.mogo.och.taxi.passenger.ui.bar.RightBarView
import com.mogo.och.unmanned.passenger.presenter.BaseTaxiPassengerPresenter
import com.mogo.och.unmanned.passenger.ui.arrived.ArrivedView
import com.mogo.och.unmanned.passenger.ui.bottom.BottomBar
import com.mogo.och.taxi.passenger.ui.bottom.BottomBar
import com.mogo.och.unmanned.passenger.ui.checkstartautopilot.ChekAndStartAutopilotView
import com.mogo.och.unmanned.passenger.ui.statusview.StatusBarView
import io.reactivex.disposables.Disposable
@@ -249,7 +249,7 @@ class TaxiPassengerBaseFragment() :
*/
fun showOrHideServingOrderFragment(isShow: Boolean) {
when (bottom.getCurrentPage()) {
BottomBar.SelectView.OVERMAPVIEW,BottomBar.SelectView.PRECISIONMAP -> {
BottomBar.SelectView.OVERMAPVIEW, BottomBar.SelectView.PRECISIONMAP -> {
if (isShow) {
if(itinerary.visibility!=View.VISIBLE) {
itinerary.visibility = View.VISIBLE
@@ -260,7 +260,7 @@ class TaxiPassengerBaseFragment() :
}
}
}
BottomBar.SelectView.VIDEO,BottomBar.SelectView.NONE -> {
BottomBar.SelectView.VIDEO, BottomBar.SelectView.NONE -> {
if(itinerary.visibility!=View.GONE) {
itinerary.visibility = View.GONE
}

View File

@@ -1,179 +0,0 @@
package com.mogo.och.unmanned.passenger.ui.arrived
import android.animation.Animator
import android.animation.AnimatorListenerAdapter
import android.animation.AnimatorSet
import android.animation.ObjectAnimator
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import androidx.lifecycle.ViewModelProvider
import com.mogo.eagle.core.utilcode.kotlin.onClick
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
import com.mogo.och.common.module.manager.xiaozhi.ZhiViewmanager
import com.mogo.och.common.module.utils.BigFrameAnimatorContainer
import com.mogo.och.common.module.utils.RxUtils
import com.mogo.och.unmanned.passenger.ui.TaxiPassengerBaseFragment
import com.mogo.och.common.module.wigets.WindowRelativeLayout
import com.mogo.och.unmanned.taxi.passenger.R
import io.reactivex.disposables.Disposable
import kotlinx.android.synthetic.main.taxt_u_p_arrived_end_panel.view.aciv_bg
import kotlinx.android.synthetic.main.taxt_u_p_arrived_end_panel.view.aciv_close
import kotlinx.android.synthetic.main.taxt_u_p_arrived_end_panel.view.actv_endstation
import kotlinx.android.synthetic.main.taxt_u_p_arrived_end_panel.view.v_video_right_rear_view
import me.jessyan.autosize.utils.AutoSizeUtils
/**
*
* 评价View
* Created on 2022/5/16
*/
class ArrivedView : WindowRelativeLayout, ArrivedViewModel.ArrivedViewCallback {
constructor(context: Context?) : super(context)
constructor(context: Context?, attributeSet: AttributeSet) : super(context, attributeSet)
constructor(context: Context?, attributeSet: AttributeSet, defStyleAttr: Int) : super(context, attributeSet, defStyleAttr)
constructor(context: Context?, attributeSet: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attributeSet, defStyleAttr, defStyleRes)
private var subscribe: Disposable?=null
private var taxiPxiaozhiLove: BigFrameAnimatorContainer?=null
var arrivedVisilityChangeListenr:ArrivedVisilityChangeListenr?=null
private lateinit var viewModel: ArrivedViewModel
private fun initView() {
d(SceneConstant.M_TAXI_P + TAG, "initView")
LayoutInflater.from(context).inflate(R.layout.taxt_u_p_arrived_end_panel, this, true)
aciv_close.onClick {
visibility = View.GONE
}
}
override fun onVisibilityAggregated(isVisible: Boolean) {
super.onVisibilityAggregated(isVisible)
d(SceneConstant.M_TAXI_P + TAG, "展示---:${isVisible}")
if (isVisible) {
if(taxiPxiaozhiLove==null) {
taxiPxiaozhiLove =
BigFrameAnimatorContainer(R.array.arrived_dest, 31, aciv_bg, isOnce = true)
}
taxiPxiaozhiLove?.start()
v_video_right_rear_view.resetView()
aniSpeedSettingRow()
viewModel.setEndInfo()
ZhiViewmanager.showListeningAni(ZhiViewmanager.loveAni)
} else {
v_video_right_rear_view.resetView()
taxiPxiaozhiLove = null
RxUtils.disposeSubscribe(subscribe)
ZhiViewmanager.showListeningAni(ZhiViewmanager.normalAni)
}
arrivedVisilityChangeListenr?.isShow(isVisible)
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
viewModel = ViewModelProvider(this).get(ArrivedViewModel::class.java)
viewModel.setViewCallback(this)
}
/**
* 设置目的地重置星星状态
*/
fun setDataAndStartAnimation() {
subscribe = RxUtils.createSubscribe(60_000) {
visibility = View.GONE
}
}
companion object {
const val TAG = "TaxiPassengerArrivedView"
}
init {
try {
initView()
} catch (e: Exception) {
e.printStackTrace()
}
}
override fun setEndStation(stationName: String) {
actv_endstation.text = stationName
}
override fun preLoadImages() {
if (taxiPxiaozhiLove==null) {
taxiPxiaozhiLove = BigFrameAnimatorContainer(R.array.arrived_dest, 31,aciv_bg,isOnce = true)
}
}
fun aniArrived(show:Boolean){
RxUtils.createSubscribe(500) {
val alphaStart: Float
val alphaEnd: Float
if(show){
alphaStart = 0.0f
alphaEnd = 1f
visibility = View.VISIBLE
}else{
alphaStart = 1f
alphaEnd = 0.0f
visibility = View.GONE
}
ObjectAnimator.ofFloat(this@ArrivedView, "alpha", alphaStart, alphaEnd).apply {
duration = 500
addListener(object :AnimatorListenerAdapter(){
override fun onAnimationEnd(animation: Animator) {
CallerLogger.d(TaxiPassengerBaseFragment.TAG,"onAnimationEndcarrivedView")
if(show){
visibility = View.VISIBLE
}else{
visibility = View.GONE
}
}
})
}.start()
}
}
private fun aniSpeedSettingRow(){
val translationYStart = - AutoSizeUtils.dp2px(context,180f).toFloat()
val translationYEnd: Float = 0f
val alphaStart: Float = 0f
val alphaEnd: Float = 1f
val translationX = ObjectAnimator.ofFloat(
v_video_right_rear_view,
"translationX",
translationYStart,
translationYEnd
).apply {
duration = 1000
}
val alpha =
ObjectAnimator.ofFloat(v_video_right_rear_view, "alpha", alphaStart, alphaEnd).apply {
duration = 1000
}
val animatorSet = AnimatorSet()
animatorSet.playTogether(mutableListOf<Animator>(translationX,alpha))
animatorSet.start()
}
interface ArrivedVisilityChangeListenr{
fun isShow(show: Boolean)
}
}

View File

@@ -1,52 +0,0 @@
package com.mogo.och.unmanned.passenger.ui.arrived
import androidx.lifecycle.ViewModel
import com.mogo.och.common.module.manager.distance.IDistanceListener
import com.mogo.och.common.module.manager.distance.TrajectoryAndDistanceManager
import com.mogo.och.unmanned.passenger.model.TaxiPassengerModel
class ArrivedViewModel : ViewModel(), IDistanceListener {
private val TAG = ArrivedViewModel::class.java.simpleName
private var viewCallback: ArrivedViewCallback? = null
private var havePreLoadOrderNum: String? = null
init {
TrajectoryAndDistanceManager.addDistanceListener(TAG, this)
}
fun setViewCallback(viewCallback: ArrivedViewCallback) {
this.viewCallback = viewCallback
}
fun setEndInfo() {
TaxiPassengerModel.currentOCHOrder?.orderEndSite?.let {
this.viewCallback?.setEndStation(it.siteName)
}
}
override fun distanceCallback(distance: Float) {
if (distance <= 50) {
TaxiPassengerModel.currentOCHOrder?.orderNo?.let {
if (it != havePreLoadOrderNum) {
this.viewCallback?.preLoadImages()
havePreLoadOrderNum = it
}
}
}
}
override fun onCleared() {
super.onCleared()
this.viewCallback = null
}
interface ArrivedViewCallback {
fun setEndStation(stationName: String)
fun preLoadImages()
}
}

View File

@@ -1,81 +0,0 @@
package com.mogo.och.unmanned.passenger.ui.bottom
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.och.unmanned.taxi.passenger.R
import kotlinx.android.synthetic.main.taxt_u_p_bottom_bar.view.actv_overmap
import kotlinx.android.synthetic.main.taxt_u_p_bottom_bar.view.actv_video
import kotlinx.android.synthetic.main.taxt_u_p_bottom_bar.view.actv_precisionmap
class BottomBar @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr) {
private var checkIndex = SelectView.NONE
private var overMapViewApply:ApplyClickLintener?=null
init {
isClickable = true
LayoutInflater.from(context).inflate(R.layout.taxt_u_p_bottom_bar, this, true)
setBackgroundResource(R.drawable.taxt_u_p_bottom_bar_bg)
actv_precisionmap.setOnClickListener {
setCheckIndex(SelectView.PRECISIONMAP)
}
actv_overmap.setOnClickListener {
setCheckIndex(SelectView.OVERMAPVIEW)
}
actv_video.setOnClickListener {
setCheckIndex(SelectView.VIDEO)
}
}
fun getCurrentPage():SelectView{
return checkIndex
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
setCheckIndex(SelectView.PRECISIONMAP)
}
fun setOverMapApplyClick(overMapViewApply:ApplyClickLintener){
this.overMapViewApply = overMapViewApply
}
fun setCheckIndex(index: SelectView){
if(checkIndex==index){
return
}else{
checkIndex = index
}
overMapViewApply?.onApplyClick(checkIndex)
if(checkIndex == SelectView.OVERMAPVIEW){
actv_overmap.setCheckItem(true)
}else{
actv_overmap.setCheckItem(false)
}
if(checkIndex == SelectView.VIDEO){
actv_video.setCheckItem(true)
}else{
actv_video.setCheckItem(false)
}
if(checkIndex == SelectView.PRECISIONMAP){
actv_precisionmap.setCheckItem(true)
}else{
actv_precisionmap.setCheckItem(false)
}
}
enum class SelectView{
NONE,PRECISIONMAP,OVERMAPVIEW,VIDEO
}
interface ApplyClickLintener{
fun onApplyClick(selectItem:SelectView)
}
}

View File

@@ -1,92 +0,0 @@
package com.mogo.och.unmanned.passenger.ui.bottom
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.content.ContextCompat
import com.mogo.och.unmanned.taxi.passenger.R
import kotlinx.android.synthetic.main.taxt_u_p_bottom_check.view.aciv_center_image
import kotlinx.android.synthetic.main.taxt_u_p_bottom_check.view.actv_title
open class BottomCheckView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr) {
companion object {
private const val TAG = "StopSiteView"
}
private var backageViewId: Int = -1
private var bottomTitle: String = ""
private var selectedDrawable: Int = -1
private var normalDrawable: Int = -1
private var bottomTitleNormalColor:Int = -1
private var bottomTitleCheckedColor:Int = -1
private var backageView: View? = null
private var isCheck = false
init {
LayoutInflater.from(context).inflate(R.layout.taxt_u_p_bottom_check, this, true)
try {
val typedArray = context.obtainStyledAttributes(attrs, R.styleable.BottomSelectView)
backageViewId = typedArray.getResourceId(R.styleable.BottomSelectView_backageViewId, -1)
bottomTitle = typedArray.getString(R.styleable.BottomSelectView_bottomTitle) ?: ""
selectedDrawable = typedArray.getResourceId(R.styleable.BottomSelectView_selectedDrawable, -1)
normalDrawable = typedArray.getResourceId(R.styleable.BottomSelectView_normalDrawable, -1)
bottomTitleNormalColor = typedArray.getColor(R.styleable.BottomSelectView_bottomTitleNormalColor,
ContextCompat.getColor(context,R.color.white))
bottomTitleCheckedColor = typedArray.getColor(R.styleable.BottomSelectView_bottomTitleCheckedColor,
ContextCompat.getColor(context,R.color.white))
typedArray.recycle()
initView(context)
} catch (e: Exception) {
e.printStackTrace()
}
}
private fun initView(context: Context) {
if (selectedDrawable > 0) {
aciv_center_image.setImageResource(normalDrawable)
}
actv_title.text = bottomTitle
}
fun setCheckItem(isCheck: Boolean) {
if (isCheck != this.isCheck) {
this.isCheck = isCheck
notifiBackageView()
}
}
private fun notifiBackageView() {
if (isCheck) {
backageView?.visibility = View.VISIBLE
aciv_center_image.setImageResource(selectedDrawable)
actv_title.setTextColor(bottomTitleCheckedColor)
} else {
backageView?.visibility = View.GONE
aciv_center_image.setImageResource(normalDrawable)
actv_title.setTextColor(bottomTitleNormalColor)
}
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
parent?.let {
if (parent is ConstraintLayout) {
if (backageViewId > 0) {
backageView = (parent as ConstraintLayout).findViewById(backageViewId)
}
}
}
if (isCheck) {
backageView?.visibility = View.VISIBLE
}
}
}

View File

@@ -5,9 +5,12 @@ import android.util.AttributeSet
import android.view.LayoutInflater
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.fragment.app.FragmentActivity
import com.alibaba.android.arouter.launcher.ARouter
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.utilcode.kotlin.onClick
import com.mogo.eagle.core.utilcode.util.ActivityUtils
import com.mogo.och.common.module.biz.provider.CommonService
import com.mogo.och.common.module.constant.OchCommonConst
import com.mogo.och.unmanned.passenger.ui.TaxiPassengerBaseFragment
import com.mogo.och.unmanned.taxi.passenger.R
import kotlinx.android.synthetic.main.taxt_u_p_debug.view.tv_show_arrive
@@ -44,10 +47,13 @@ class DebugView @JvmOverloads constructor(
val activityByContext = ActivityUtils.getActivityByContext(context)
if(activityByContext is FragmentActivity){
val fragment =
activityByContext.supportFragmentManager.findFragmentByTag(TaxiPassengerBaseFragment.TAG)
if(fragment is TaxiPassengerBaseFragment){
this.fragment = fragment
val commonService = ARouter.getInstance().build(OchCommonConst.TAXI_UNMANNED_PASSENGER)
.navigation() as CommonService?
commonService?.let {
val fragment = it.getFragment()
if(fragment is TaxiPassengerBaseFragment){
this.fragment = fragment
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

View File

@@ -162,13 +162,13 @@
app:layout_constraintStart_toStartOf="parent" />
<!-- 底部导航栏 -->
<com.mogo.och.unmanned.passenger.ui.bottom.BottomBar
<com.mogo.och.taxi.passenger.ui.bottom.BottomBar
android:id="@+id/bottom"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_160"
app:layout_constraintBottom_toBottomOf="parent" />
<com.mogo.och.unmanned.passenger.ui.arrived.ArrivedView
<com.mogo.och.taxi.passenger.ui.arrived.ArrivedView
android:id="@+id/arrivedView"
android:visibility="gone"
android:layout_width="match_parent"

View File

@@ -1,127 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_160"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:background="@drawable/taxt_u_p_bottom_bar_bg"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"
tools:ignore="MissingDefaultResource">
<TextClock
android:id="@+id/cl_order_time"
android:format12Hour="M月d日 "
android:format24Hour="M月d日 "
android:gravity="center"
android:fontFamily="@font/taxt_u_p_din"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:textColor="@color/taxi_p_111D2F"
android:textSize="@dimen/dp_52"
android:layout_marginStart="@dimen/dp_92"
android:layout_width="wrap_content"
android:layout_height="match_parent"/>
<TextClock
android:id="@+id/cl_order_time_hhmm"
android:format12Hour="HH:mm"
android:format24Hour="HH:mm"
android:gravity="center"
android:fontFamily="@font/taxt_u_p_din"
app:layout_constraintStart_toEndOf="@+id/cl_order_time"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:textColor="@color/taxi_p_111D2F"
android:letterSpacing="0.1"
android:textSize="@dimen/dp_52"
android:layout_width="wrap_content"
android:layout_height="match_parent"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/actv_precisionmap_press"
android:visibility="gone"
android:layout_marginTop="@dimen/dp_2"
android:src="@drawable/taxt_u_p_bottom_bar_select_bg"
app:layout_constraintStart_toStartOf="@+id/actv_precisionmap"
app:layout_constraintEnd_toEndOf="@+id/actv_precisionmap"
android:layout_width="@dimen/dp_420"
android:layout_height="@dimen/dp_160"/>
<com.mogo.och.unmanned.passenger.ui.bottom.BottomCheckView
android:id="@+id/actv_precisionmap"
app:backageViewId="@+id/actv_precisionmap_press"
app:layout_constraintHorizontal_chainStyle="packed"
app:selectedDrawable="@drawable/taxt_u_p_bottom_precisionmap_press"
app:normalDrawable="@drawable/taxt_u_p_bottom_precisionmap_normal"
android:layout_marginEnd="@dimen/dp_107"
app:bottomTitle="行车实况"
app:bottomTitleCheckedColor="@color/white"
app:bottomTitleNormalColor="@color/taxi_p_41444D"
app:layout_constraintEnd_toStartOf="@+id/actv_overmap"
app:layout_constraintStart_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_width="wrap_content"
android:layout_height="match_parent"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/actv_overmap_press"
android:visibility="gone"
android:layout_marginTop="@dimen/dp_2"
android:src="@drawable/taxt_u_p_bottom_bar_select_bg"
app:layout_constraintStart_toStartOf="@+id/actv_overmap"
app:layout_constraintEnd_toEndOf="@+id/actv_overmap"
android:layout_width="@dimen/dp_420"
android:layout_height="@dimen/dp_160"/>
<com.mogo.och.unmanned.passenger.ui.bottom.BottomCheckView
android:id="@+id/actv_overmap"
app:backageViewId="@+id/actv_overmap_press"
app:selectedDrawable="@drawable/taxt_u_p_bottom_overmap_press"
app:normalDrawable="@drawable/taxt_u_p_bottom_overmap_normal"
app:bottomTitle="全局概览"
app:bottomTitleCheckedColor="@color/white"
android:layout_marginEnd="@dimen/dp_107"
android:layout_marginStart="@dimen/dp_107"
app:bottomTitleNormalColor="@color/taxi_p_41444D"
app:layout_constraintStart_toEndOf="@+id/actv_precisionmap"
app:layout_constraintEnd_toStartOf="@+id/actv_video"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_width="wrap_content"
android:layout_height="match_parent"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/actv_video_press"
android:visibility="gone"
android:layout_marginTop="@dimen/dp_2"
android:src="@drawable/taxt_u_p_bottom_bar_select_bg"
app:layout_constraintStart_toStartOf="@+id/actv_video"
app:layout_constraintEnd_toEndOf="@+id/actv_video"
android:layout_width="@dimen/dp_420"
android:layout_height="@dimen/dp_160"/>
<com.mogo.och.unmanned.passenger.ui.bottom.BottomCheckView
android:id="@+id/actv_video"
app:backageViewId="@+id/actv_video_press"
app:selectedDrawable="@drawable/taxt_u_p_bottom_video_press"
app:normalDrawable="@drawable/taxt_u_p_bottom_video_normal"
app:bottomTitle="蘑菇资讯"
android:layout_marginStart="@dimen/dp_107"
app:bottomTitleCheckedColor="@color/white"
app:bottomTitleNormalColor="@color/taxi_p_41444D"
app:layout_constraintStart_toEndOf="@+id/actv_overmap"
app:layout_constraintEnd_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_width="wrap_content"
android:layout_height="match_parent"/>
</merge>

View File

@@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_160"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"
tools:ignore="MissingDefaultResource">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/aciv_center_image"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="@dimen/dp_16"
android:layout_width="@dimen/dp_81"
android:layout_height="@dimen/dp_81"/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/actv_title"
app:layout_constraintStart_toStartOf="@+id/aciv_center_image"
app:layout_constraintEnd_toEndOf="@+id/aciv_center_image"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="@dimen/dp_21"
android:textSize="@dimen/dp_27"
android:text="靠边停车"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</merge>