[2.10.0]bus司机端增加"进站"按钮
This commit is contained in:
@@ -67,6 +67,7 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
private RelativeLayout ctvAutopilotStatus;
|
||||
private ImageView ctvAutopilotStatusIv;
|
||||
private TextView ctvAutopilotStatusTv;
|
||||
private TextView tvArrived;
|
||||
protected TextView tvOperationStatus;
|
||||
protected RelativeLayout mSettingBtn;
|
||||
protected RelativeLayout mBadcaseBtn;
|
||||
@@ -120,6 +121,7 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
// CallerHmiManager.INSTANCE.setProxyTrafficLightView(mTrafficLightView);
|
||||
|
||||
tvOperationStatus = findViewById(R.id.module_mogo_och_operation_status);
|
||||
tvArrived = findViewById(R.id.module_mogo_och_arrived_tv);
|
||||
|
||||
flSpeed = (FrameLayout) findViewById(R.id.fl_speed);
|
||||
mTrafficDataView = (TrafficDataView) findViewById(R.id.bus_arc);
|
||||
@@ -198,6 +200,10 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
tvOperationStatus.setOnClickListener(view -> {
|
||||
onChangeOperationStatus();
|
||||
});
|
||||
|
||||
tvArrived.setOnClickListener(view -> {
|
||||
onArriveStation();
|
||||
});
|
||||
|
||||
mSettingBtn = findViewById(R.id.module_mogo_och_setting_layout);
|
||||
mSettingBtn.setOnClickListener(v -> {
|
||||
@@ -226,6 +232,8 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract void onArriveStation();
|
||||
|
||||
private void updateSwitchMapIcon(){
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()) {
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_long);
|
||||
@@ -284,6 +292,7 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
getActivity().runOnUiThread(() -> {
|
||||
slidePanelView.setText(text);
|
||||
slidePanelView.setVisibility(View.VISIBLE);
|
||||
tvArrived.setClickable(false);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -294,6 +303,7 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
public void hideSlidePanel() {
|
||||
getActivity().runOnUiThread(() -> {
|
||||
slidePanelView.setVisibility(View.GONE);
|
||||
tvArrived.setClickable(true);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -106,6 +106,11 @@ public class BusFragment extends BaseBusTabFragment<BusFragment, BusPresenter>
|
||||
mSwitchLine.setOnClickListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onArriveStation() {
|
||||
mPresenter.onAutopilotArriveAtStation(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void debugArrivedStation() {
|
||||
mPresenter.onAutopilotArriveAtStation(null);
|
||||
|
||||
@@ -519,9 +519,9 @@ public class BusOrderModel {
|
||||
)
|
||||
private void leaveStationSuccess(BusRoutesResult result, boolean isRestart) {
|
||||
renderBusStationsStatus(result);
|
||||
if (slidePannelHideCallback != null) {
|
||||
slidePannelHideCallback.hideSlidePanel();
|
||||
}
|
||||
// if (slidePannelHideCallback != null) {
|
||||
// slidePannelHideCallback.hideSlidePanel();
|
||||
// }
|
||||
//开启自动驾驶
|
||||
startAutopilot(isRestart);
|
||||
if (isGoingToNextStation) {
|
||||
|
||||
@@ -82,8 +82,8 @@
|
||||
android:background="@drawable/bus_switch_map_bg"
|
||||
android:elevation="@dimen/bus_dp_10"
|
||||
android:padding="@dimen/bus_dp_20"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/module_mogo_och_operation_status"
|
||||
app:layout_constraintLeft_toRightOf="@+id/module_mogo_och_operation_status"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/module_mogo_och_arrived_tv"
|
||||
app:layout_constraintLeft_toRightOf="@+id/module_mogo_och_arrived_tv"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
@@ -109,6 +109,22 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_mogo_och_arrived_tv"
|
||||
android:layout_width="@dimen/module_mogo_och_operation_status_bg_width"
|
||||
android:layout_height="@dimen/module_mogo_och_operation_status_bg_height"
|
||||
android:background="@drawable/bus_operation_status_bg_selector"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:text="@string/bus_arrived_str"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/bus_autopilot_text_color_selector"
|
||||
android:textSize="@dimen/module_mogo_och_arrived_text_size"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginLeft="@dimen/module_mogo_och_margin_left"
|
||||
android:layout_marginBottom="@dimen/module_mogo_och_margin_bottom"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/module_mogo_och_operation_status"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/module_mogo_och_setting_layout"
|
||||
android:layout_width="@dimen/module_mogo_och_operation_status_bg_width"
|
||||
@@ -137,12 +153,13 @@
|
||||
android:elevation="@dimen/dp_10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/module_mogo_och_setting_layout">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/bad_case_selector"/>
|
||||
android:src="@drawable/bad_case_selector" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
|
||||
@@ -91,6 +91,7 @@
|
||||
|
||||
|
||||
<dimen name="module_mogo_och_autopilot_status_text_size">40px</dimen>
|
||||
<dimen name="module_mogo_och_arrived_text_size">32px</dimen>
|
||||
<dimen name="module_mogo_och_autopilot_status_text_padding_top">13px</dimen>
|
||||
<dimen name="module_mogo_och_autopilot_status_text_drawable_padding">12px</dimen>
|
||||
<dimen name="module_mogo_och_autopilot_status_text_m_l">350px</dimen>
|
||||
|
||||
@@ -91,6 +91,7 @@
|
||||
|
||||
|
||||
<dimen name="module_mogo_och_autopilot_status_text_size">40px</dimen>
|
||||
<dimen name="module_mogo_och_arrived_text_size">32px</dimen>
|
||||
<dimen name="module_mogo_och_autopilot_status_text_padding_top">13px</dimen>
|
||||
<dimen name="module_mogo_och_autopilot_status_text_drawable_padding">12px</dimen>
|
||||
<dimen name="module_mogo_och_autopilot_status_text_m_l">350px</dimen>
|
||||
|
||||
@@ -89,6 +89,7 @@
|
||||
<dimen name="module_mogo_och_autopilot_order_bg_height">270px</dimen>
|
||||
|
||||
<dimen name="module_mogo_och_autopilot_status_text_size">30px</dimen>
|
||||
<dimen name="module_mogo_och_arrived_text_size">30px</dimen>
|
||||
<dimen name="module_mogo_och_autopilot_status_text_padding_top">13px</dimen>
|
||||
<dimen name="module_mogo_och_autopilot_status_text_drawable_padding">12px</dimen>
|
||||
<dimen name="module_mogo_och_autopilot_status_text_m_l">288px</dimen>
|
||||
|
||||
@@ -25,4 +25,5 @@
|
||||
<string name="bus_arrive_to_current_tag">当前站点:</string>
|
||||
<string name="bus_arrive_to_next_tag">下一站:</string>
|
||||
<string name="bus_auto_disable_tip">自动驾驶状态为0不可用</string>
|
||||
<string name="bus_arrived_str">进站</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user