[2.10.0]bus司机端"出/收车"按钮UI

This commit is contained in:
wangmingjun
2022-08-22 17:30:48 +08:00
parent a15aac3a02
commit ccac54962d
11 changed files with 94 additions and 3 deletions

View File

@@ -5,6 +5,7 @@ import static com.mogo.och.bus.constant.BusConst.TIMER_START_AUTOPILOT_INTERVAL;
import android.animation.ObjectAnimator;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.animation.LinearInterpolator;
@@ -49,6 +50,8 @@ import com.mogo.och.bus.model.BusOrderModel;
import com.mogo.och.bus.util.BDRouteDataTestUtils;
import com.mogo.och.bus.view.SlidePanelView;
import org.greenrobot.eventbus.ThreadMode;
import mogo.telematics.pad.MessagePad;
import record_cache.RecordPanelOuterClass;
@@ -231,7 +234,6 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
CallerDevaToolsManager.INSTANCE.initAiCollect(mAICollectBtn);
}
}
protected abstract void onArriveStation();
private void updateSwitchMapIcon(){

View File

@@ -24,6 +24,7 @@ import com.mogo.eagle.core.data.BaseData;
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager;
@@ -522,8 +523,11 @@ public class BusOrderModel {
// if (slidePannelHideCallback != null) {
// slidePannelHideCallback.hideSlidePanel();
// }
//开启自动驾驶
startAutopilot(isRestart);
//开启自动驾驶 2.10.0: 如果自动驾驶状态下开启, 非自动驾驶状态下不开启,需手动点击自动驾驶按钮开启
if (isRestart || CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState()
== IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING){
startAutopilot(isRestart);
}
if (isGoingToNextStation) {
// 为了避免恢复自动驾驶时重复的接口请求
return;

View File

@@ -153,10 +153,17 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
actvLoginout.onClick {
EventBus.getDefault().post(EventLogout())
}
ochBusOperationStatus.onClick {
EventBus.getDefault().post(EventLogout())
}
when (DebugConfig.getProductFlavor()) {
"fPadLenovoOchTaxi" -> {
actvLoginout.visibility = View.VISIBLE
}
"fPadLenovoOchBus" ->{
ochBusOperationRL.visibility = View.VISIBLE
}
else -> {
}

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/bus_autopilot_text_color_normal"/>
</selector>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<!-- <corners android:radius="@dimen/module_mogo_och_autopilot_status_bg_corner" />-->
<gradient
android:startColor="#323C6F"
android:endColor="#323C6F"
android:angle="315"
/>
<size
android:width="120px"
android:height="120px"
/>
</shape>

View File

@@ -255,6 +255,50 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/viewSystemVersion" />
<RelativeLayout
android:id="@+id/ochBusOperationRL"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40px"
android:layout_marginBottom="40px"
app:layout_constraintTop_toBottomOf="@+id/systemVersionView"
app:layout_constraintStart_toStartOf="parent"
android:visibility="gone">
<View android:id="@+id/bus_operation_view"
android:layout_width="14px"
android:layout_height="50px"
android:layout_marginStart="80px"
android:background="@color/color_FF2966EC"/>
<TextView
android:id="@+id/tv_bus_operation_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="113px"
android:gravity="center"
android:text="@string/bus_operation_title"
android:textColor="@color/color_FFFFFF"
android:textSize="42px" />
<CheckedTextView
android:id="@+id/ochBusOperationStatus"
android:layout_width="@dimen/och_bus_operation_status_bg_width"
android:layout_height="@dimen/och_bus_operation_status_bg_height"
android:background="@drawable/bus_operation_status_bg"
android:elevation="@dimen/dp_10"
android:gravity="center"
android:text="出车"
android:textAlignment="center"
android:layout_marginStart="113px"
android:layout_marginTop="40px"
android:textColor="@drawable/bus_autopilot_text_color_selector"
android:textSize="@dimen/module_mogo_och_autopilot_status_text_size"
android:textStyle="bold"
android:layout_below="@+id/tv_bus_operation_title"/>
</RelativeLayout>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/actvLoginout"
app:layout_constraintStart_toStartOf="parent"
@@ -271,6 +315,8 @@
android:layout_width="790px"
android:layout_height="126px"/>
<com.mogo.eagle.core.function.hmi.ui.tools.SpeedKeyboardView
android:id="@+id/sKeyBoardView"
android:layout_width="match_parent"

View File

@@ -8,4 +8,5 @@
<color name="notice_dialog_back">#3B4577</color>
<color name="acc_default_txt_color">#FF343C63</color>
<color name="hmi_check_keyboard_input_field">#FF282F62</color>
<color name="bus_autopilot_text_color_normal">#FFFFFF</color>
</resources>

View File

@@ -54,4 +54,10 @@
<dimen name="hmi_traffic_light_time_size">60px</dimen>
<dimen name="hmi_traffic_light_source_size">32px</dimen>
<dimen name="och_bus_operation_status_bg_width">112px</dimen>
<dimen name="och_bus_operation_status_bg_height">112px</dimen>
<dimen name="module_mogo_och_autopilot_status_text_size">40px</dimen>
<dimen name="module_mogo_och_margin_left">40px</dimen>
<dimen name="module_mogo_och_margin_bottom">46px</dimen>
</resources>

View File

@@ -66,4 +66,5 @@
<color name="dark_mode_select_txt_color">#FFFFFFFF</color>
<color name="hmi_check_keyboard_input_field">#FF282F62</color>
<color name="bus_autopilot_text_color_normal">#FFFFFF</color>
</resources>

View File

@@ -60,4 +60,9 @@
<dimen name="hmi_traffic_light_time_size">60px</dimen>
<dimen name="hmi_traffic_light_source_size">32px</dimen>
<dimen name="och_bus_operation_status_bg_width">100px</dimen>
<dimen name="och_bus_operation_status_bg_height">100px</dimen>
<dimen name="module_mogo_och_autopilot_status_text_size">30px</dimen>
<dimen name="module_mogo_och_margin_left">40px</dimen>
<dimen name="module_mogo_och_margin_bottom">46px</dimen>
</resources>

View File

@@ -23,6 +23,7 @@
<string name="debug_panel">调试面板</string>
<string name="debug_panel_fb">录包设置</string>
<string name="check_vehicle_speed_setting">车速设置</string>
<string name="bus_operation_title">出收车状态</string>
<string name="check_system_operation">系统运行</string>
<string name="check_system_shut_down">关机</string>
<string name="check_system_reboot">重启</string>