[2.10.0]bus司机端"进站"UI和展示逻辑调整
This commit is contained in:
@@ -67,7 +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 tvArrived;
|
||||
protected TextView tvOperationStatus;
|
||||
protected RelativeLayout mSettingBtn;
|
||||
protected RelativeLayout mBadcaseBtn;
|
||||
@@ -292,18 +292,32 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
getActivity().runOnUiThread(() -> {
|
||||
slidePanelView.setText(text);
|
||||
slidePanelView.setVisibility(View.VISIBLE);
|
||||
tvArrived.setClickable(false);
|
||||
});
|
||||
setArrivedClikable(false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置进站按钮状态
|
||||
* @param isClickable
|
||||
*/
|
||||
public void setArrivedClikable(boolean isClickable){
|
||||
getActivity().runOnUiThread(() -> {
|
||||
tvArrived.setClickable(isClickable);
|
||||
if (isClickable){
|
||||
tvArrived.setTextColor(getResources().getColor(R.color.bus_white));
|
||||
}else {
|
||||
tvArrived.setTextColor(getResources().getColor(R.color.bus_arrived_btn_un_clickable_color));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐藏滑动按钮
|
||||
*/
|
||||
public void hideSlidePanel() {
|
||||
getActivity().runOnUiThread(() -> {
|
||||
slidePanelView.setVisibility(View.GONE);
|
||||
tvArrived.setClickable(true);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -310,13 +310,14 @@ public class BusFragment extends BaseBusTabFragment<BusFragment, BusPresenter>
|
||||
// 出车的时候重制站点状态
|
||||
mPresenter.queryBusRoutes();
|
||||
tvOperationStatus.setText("收车");
|
||||
tvArrived.setVisibility(View.VISIBLE);
|
||||
showPanel();
|
||||
} else {
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice("已收车");
|
||||
tvOperationStatus.setText("出车");
|
||||
tvArrived.setVisibility(View.GONE);
|
||||
hideSlidePanel();
|
||||
hidPanel();
|
||||
|
||||
//移除起点终点
|
||||
if (null != startStation) {
|
||||
setOrRemoveMapMaker(false, BusConst.BUS_START_MAP_MAKER, startStation.getLat()
|
||||
|
||||
@@ -148,6 +148,7 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
public void hideSlidePanel() {
|
||||
if (mView != null) {
|
||||
runOnUIThread(() -> mView.hideSlidePanel());
|
||||
runOnUIThread(()-> mView.setArrivedClikable(true));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,9 +176,9 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
currentAutopilotStatus = IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE;
|
||||
// 设置UI【自动驾驶】按钮是否展示
|
||||
runOnUIThread(() -> mView.onAutopilotEnableChange(true));
|
||||
if (BusOrderModel.getInstance().isGoingToNextStation()) {
|
||||
runOnUIThread(() -> mView.hideSlidePanel());
|
||||
}
|
||||
// if (BusOrderModel.getInstance().isGoingToNextStation()) {
|
||||
// runOnUIThread(() -> mView.hideSlidePanel());
|
||||
// }
|
||||
if (FunctionBuildConfig.isDemoMode
|
||||
&& (
|
||||
(mCurrentStation > 0 && mCurrentStation < mStationList.size() - 1)
|
||||
|
||||
@@ -79,6 +79,8 @@
|
||||
android:layout_width="@dimen/module_mogo_och_operation_status_bg_width"
|
||||
android:layout_height="@dimen/module_mogo_och_operation_status_bg_height"
|
||||
android:layout_marginLeft="@dimen/module_mogo_och_margin_left"
|
||||
app:layout_goneMarginBottom="@dimen/module_mogo_och_margin_bottom"
|
||||
app:layout_goneMarginLeft="@dimen/module_mogo_och_margin_left"
|
||||
android:background="@drawable/bus_switch_map_bg"
|
||||
android:elevation="@dimen/bus_dp_10"
|
||||
android:padding="@dimen/bus_dp_20"
|
||||
|
||||
@@ -44,4 +44,5 @@
|
||||
<color name="bus_traffic_light_green_color_down">#FF006D43</color>
|
||||
<color name="bus_traffic_light_yellow_color_up">#FFFFE198</color>
|
||||
<color name="bus_traffic_light_yellow_color_down">#FFFF9B00</color>
|
||||
<color name="bus_arrived_btn_un_clickable_color">#59FFFFFF</color>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user