[无人化样式修改]
This commit is contained in:
yangyakun
2024-04-23 20:44:43 +08:00
parent dfe4bc9bf9
commit 8a2e75e35b
223 changed files with 64 additions and 265 deletions

View File

@@ -387,7 +387,6 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
ctvAutopilotStatusTv.setTextColor(getResources().getColor(R.color.bus_autopilot_text_color_disable));
ctvAutopilotStatusTv.setText(getResources().getString(R.string.bus_loading_autopilot_runnig_tv));
ctvAutopilotStatusIv.setImageResource(R.drawable.bus_disable_autopilot_icon);
// ctvAutopilotStatus.setSelected(false);
ctvAutopilotStatus.setClickable(true);
ctvAutopilotStatus.setBackground(getContext().getDrawable(R.drawable.bus_autopilot_0_1_status_bg));
@@ -395,7 +394,6 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
ctvAutopilotStatusTv.setTextColor(getResources().getColor(R.color.bus_autopilot_text_color_normal));
ctvAutopilotStatusIv.setImageResource(R.drawable.bus_ic_autopilot);
if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE == autopilotStatus) { //1可用
// ctvAutopilotStatus.setSelected(false);
ctvAutopilotStatus.setClickable(true);
ctvAutopilotStatusTv.setText(getResources().getString(R.string.bus_loading_autopilot_runnig_tv));
ctvAutopilotStatus.setBackground(getContext().getDrawable(R.drawable.bus_autopilot_0_1_status_bg));
@@ -403,7 +401,6 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
ctvAutopilotStatusTv.setText(R.string.bus_loading_autopilot_runnig_tv);
ctvAutopilotStatus.setClickable(true);
ctvAutopilotStatus.setBackground(getContext().getDrawable(R.drawable.bus_autopilot_2_status_bg));
// ctvAutopilotStatus.setSelected(true);
} else if (IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING
== autopilotStatus) {
ctvAutopilotStatusTv.setText(R.string.bus_pingxing_driver);

View File

@@ -186,7 +186,7 @@ class LoginProvider : LoginService {
}
override fun getOpenOrderStatusType(): OpenOrderStatusEnum {
CallerLogger.d(tag, "getOpenOrderStatusType")
CallerLogger.d(tag, "getOpenOrderStatusType:${openOrderStatusEnum}")
return openOrderStatusEnum
}

View File

@@ -8,6 +8,8 @@
android:orientation="vertical"
android:paddingTop="@dimen/dp_26"
android:paddingBottom="@dimen/dp_32"
android:paddingStart="@dimen/dp_29"
android:paddingEnd="@dimen/dp_29"
android:background="@drawable/taxi_order_bg">
<com.google.android.material.tabs.TabLayout

View File

@@ -33,7 +33,6 @@ import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.map.listener.IMogoMapListener
import com.mogo.map.uicontroller.VisualAngleMode
import com.mogo.och.common.module.utils.FrameAnimatorContainer
import com.mogo.och.common.module.wigets.StartAutopilotAnimationView
import com.mogo.och.taxi.R
import com.mogo.och.taxi.constant.TaxiUnmannedConst
@@ -41,7 +40,6 @@ import com.mogo.och.taxi.constant.TaxiUnmannedConst.Companion.START_AUTOPILOT_AN
import com.mogo.och.taxi.ui.debug.DebugView
import com.mogo.och.taxi.ui.navi.amap.TaxiAmapNaviFragment
import com.mogo.och.taxi.ui.navi.auto.TaxiRoutingNaviFragment
import kotlinx.android.synthetic.main.taxi_base_fragment.anim_flow_iv
import kotlinx.android.synthetic.main.taxi_base_fragment.groupTestPanel
import kotlinx.android.synthetic.main.taxi_base_fragment.mapBizView
import kotlinx.android.synthetic.main.taxi_base_fragment.module_mogo_och_autopilot_status
@@ -84,9 +82,6 @@ abstract class BaseTaxiTabFragment<V : IView, P : Presenter<V>> : MvpFragment<V,
// 开发调试时展示信息的panel
private var debugPanelView: View? = null
private var startAutopilotAnimator: FrameAnimatorContainer?=null
private var startManCOAnimator: FrameAnimatorContainer?=null
override fun getLayoutId(): Int {
return R.layout.taxi_base_fragment
}
@@ -241,18 +236,7 @@ abstract class BaseTaxiTabFragment<V : IView, P : Presenter<V>> : MvpFragment<V,
val width = AutoSizeUtils.dp2px(AbsMogoApplication.getApp(), 420f)
val height = AutoSizeUtils.dp2px(AbsMogoApplication.getApp(), 220f)
startAutopilotAnimator = FrameAnimatorContainer(R.array.anim_flow, 20,anim_flow_iv,false,initFirstFrame = false,width = width, height = height)
startAutopilotAnimator?.setOnAnimStopListener(object : FrameAnimatorContainer.OnAnimationStoppedListener{
override fun AnimationStopped() {
d(SceneConstant.M_TAXI_P + TAG, "自动驾驶动画暂停")
}
})
startManCOAnimator = FrameAnimatorContainer(R.array.nim_flow_man_co, 20,anim_flow_iv,false, initFirstFrame = false,width = width, height = height)
startManCOAnimator?.setOnAnimStopListener(object : FrameAnimatorContainer.OnAnimationStoppedListener{
override fun AnimationStopped() {
d(SceneConstant.M_TAXI_P + TAG, "平行驾驶动画暂停")
}
})
}
abstract fun stopAutoStartAutopilot()
@@ -364,8 +348,7 @@ abstract class BaseTaxiTabFragment<V : IView, P : Presenter<V>> : MvpFragment<V,
)
)
module_och_autopilot_iv.setImageResource(R.drawable.taxi_ic_autopilot)
startAutopilotAnimator?.reStart()
startManCOAnimator?.stop()
module_mogo_och_autopilot_status.setBackgroundResource(R.drawable.taxi_autopilot_success);
} else if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE == status) {
module_och_autopilot_tv.text = "自动驾驶"
module_och_autopilot_tv.setTextColor(
@@ -375,9 +358,7 @@ abstract class BaseTaxiTabFragment<V : IView, P : Presenter<V>> : MvpFragment<V,
)
)
module_och_autopilot_iv.setImageResource(R.drawable.taxi_ic_autopilot)
startAutopilotAnimator?.stop()
startManCOAnimator?.stop()
anim_flow_iv.setImageResource(0)
module_mogo_och_autopilot_status.setBackgroundResource(R.drawable.taxi_autopilot_bg_selector)
} else if (IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING == status) {
module_och_autopilot_tv.text = "远程代驾"
module_och_autopilot_tv.setTextColor(
@@ -387,8 +368,7 @@ abstract class BaseTaxiTabFragment<V : IView, P : Presenter<V>> : MvpFragment<V,
)
)
module_och_autopilot_iv.setImageResource(R.drawable.taxi_ic_autopilot)
startManCOAnimator?.reStart()
startAutopilotAnimator?.stop()
module_mogo_och_autopilot_status.setBackgroundResource(R.drawable.taxi_autopilot_pingxjs)
} else {
module_och_autopilot_tv.text = "自动驾驶"
module_och_autopilot_tv.setTextColor(
@@ -398,9 +378,7 @@ abstract class BaseTaxiTabFragment<V : IView, P : Presenter<V>> : MvpFragment<V,
)
)
module_och_autopilot_iv.setImageResource(R.drawable.taxi_ic_autopilot_disable)
startAutopilotAnimator?.stop()
startManCOAnimator?.stop()
anim_flow_iv.setImageResource(0)
module_mogo_och_autopilot_status.setBackgroundResource(R.drawable.taxi_autopilot_bg_selector)
}
}

View File

@@ -6,6 +6,7 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.FragmentTransaction
import com.mogo.commons.AbsMogoApplication
import com.mogo.commons.module.status.MogoStatusManager
import com.mogo.commons.module.status.StatusDescriptor
import com.mogo.eagle.core.data.temp.EventLogout
@@ -14,6 +15,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.e
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.och.common.module.biz.login.OpenOrderStatusEnum
import com.mogo.och.common.module.utils.FlowBus
import com.mogo.och.taxi.R
import com.mogo.och.taxi.constant.TaxiDriverEventConst
@@ -220,26 +222,29 @@ class TaxiFragment : BaseTaxiTabFragment<TaxiFragment, TaxiPresenter>(),
EventBus.getDefault().unregister(this)
}
fun setRole(finalRole:String){
if (!TextUtils.isEmpty(finalRole)) {
taxi_driver_role_tv.visibility = View.VISIBLE
taxi_driver_role_tv.text = finalRole
} else {
taxi_driver_role_tv.visibility = View.GONE
}
}
/**
* 状态变更
* @param inOperation true 可以接单 false 暂停接单
* @param role 测试车辆:测试 演示车辆V 运营车辆: ""空
*/
fun updateOperationStatus(inOperation: Boolean, role: String?) {
fun updateOperationStatus(inOperation: OpenOrderStatusEnum) {
e(
SceneConstant.M_TAXI + TAG,
"onOperationChanged:$inOperation"
)
if (inOperation) {
if (!TextUtils.isEmpty(role)) {
taxi_driver_role_tv.visibility = View.VISIBLE
taxi_driver_role_tv.text = role
} else {
taxi_driver_role_tv.visibility = View.GONE
}
if (inOperation==OpenOrderStatusEnum.Ordering) {
module_mogo_och_operation_status.text = "暂停接单"
module_mogo_och_operation_status.setCompoundDrawablesWithIntrinsicBounds(
resources.getDrawable(R.drawable.shape_size_operation_back),
AbsMogoApplication.getApp().getDrawable(R.drawable.shape_size_operation_back),
null,
null,
null
@@ -249,14 +254,14 @@ class TaxiFragment : BaseTaxiTabFragment<TaxiFragment, TaxiPresenter>(),
taxi_driver_role_tv.visibility = View.GONE
module_mogo_och_operation_status.text = "接单"
module_mogo_och_operation_status.setCompoundDrawablesWithIntrinsicBounds(
resources.getDrawable(R.drawable.shape_size_operation_out),
AbsMogoApplication.getApp().getDrawable(R.drawable.shape_size_operation_out),
null,
null,
null
)
}
updateOperationBtnStatusOnModeChange(MogoStatusManager.getInstance().isTaxiUnmanedDriverLineRoutingVerifyMode)
MogoStatusManager.getInstance().setTaxiUnmanedDriverTakingOrders(TAG, inOperation)
MogoStatusManager.getInstance().setTaxiUnmanedDriverTakingOrders(TAG, inOperation==OpenOrderStatusEnum.Ordering)
}
private fun updateOperationBtnStatusOnModeChange(isRoutingVerifyMode: Boolean) {

View File

@@ -15,6 +15,7 @@ import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
import com.mogo.och.common.module.biz.login.ILoginCallback;
import com.mogo.och.common.module.biz.login.LoginStatusEnum;
import com.mogo.och.common.module.biz.login.LoginStatusManager;
import com.mogo.och.common.module.biz.login.OpenOrderStatusEnum;
import com.mogo.och.common.module.manager.autopilot.OCHAdasAbilityManager;
import com.mogo.och.taxi.callback.ITaxiADASStatusCallback;
import com.mogo.och.taxi.callback.ITaxiControllerStatusCallback;
@@ -56,6 +57,7 @@ public class TaxiPresenter extends Presenter<TaxiFragment> implements ITaxiADASS
TaxiTaskModel.INSTANCE.setOrderStatusCallback(this);
TaxiRoutingModel.INSTANCE.setControllerStatusCallback(this);
TaxiRoutingModel.INSTANCE.setOrderStatusCallback(this);
LoginStatusManager.INSTANCE.addListener(TAG,this);
}
private void releaseListeners() {
@@ -64,6 +66,7 @@ public class TaxiPresenter extends Presenter<TaxiFragment> implements ITaxiADASS
TaxiTaskModel.INSTANCE.setOrderStatusCallback(null);
OCHAdasAbilityManager.getInstance().release();
TaxiTaskModel.INSTANCE.setMoGoAutopilotPlanningListener(null);
LoginStatusManager.INSTANCE.removeListener(TAG);
}
private void runOnUIThread(Runnable executor) {
@@ -210,7 +213,8 @@ public class TaxiPresenter extends Presenter<TaxiFragment> implements ITaxiADASS
}
String finalRole = role;
runOnUIThread(() -> {
mView.updateOperationStatus(LoginStatusManager.isOpenOrderType(), finalRole);
mView.updateOperationStatus(LoginStatusManager.getOpenOrderType());
mView.setRole(finalRole);
});
if (!TaxiTaskModel.INSTANCE.checkCurrentTaskCondition()) {
@@ -220,6 +224,13 @@ public class TaxiPresenter extends Presenter<TaxiFragment> implements ITaxiADASS
TaxiTaskModel.INSTANCE.updatePrepareTaskDelayUI();
}
@Override
public void onOpenOrderStatusEnumChange(OpenOrderStatusEnum businessEnum) {
runOnUIThread(() -> {
mView.updateOperationStatus(LoginStatusManager.getOpenOrderType());
});
}
public void stopAutoStartAutopilot() {
TaxiTaskModel.INSTANCE.stopAutoStartAutopilot();
}

View File

@@ -77,7 +77,7 @@ class TaxiTaskTabFragment : BaseFragment() {
val tabView =
View.inflate(activity, R.layout.taxi_tab_item_custom, null) as TextView
tabView.text = mTabTitles[position]
tabView.height = AutoSizeUtils.dp2px(context, 120f)
tabView.height = AutoSizeUtils.dp2px(context, 115f)
tab.customView = tabView
if (TAB_POSITION_CURRENT == position) {

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Some files were not shown because too many files have changed in this diff Show More