完成网约车,自动驾驶出租车UI改版

This commit is contained in:
董宏宇
2021-04-07 16:27:14 +08:00
parent 8581b5e072
commit 27554e4ced
38 changed files with 49 additions and 130 deletions

View File

@@ -32,13 +32,10 @@ public abstract class BaseOchFragment<V extends IView, P extends Presenter<V>> e
private static final String TAG = "BaseOchFragment";
protected SlidePanelView slidePanelView;
private View tvNoticeContainer;
private TextView tvNotice;
private CheckedTextView ctvAutopilotStatus;
protected TextView tvOperationStatus;
private FrameLayout flStationPanelContainer;
private FrameAnimImageView fivNoticeHead;
private final SlidePanelView.OnSlidePanelMoveToEndListener onSlideToEndListener = () -> {
// 此处做一个代理,处理一下共有情况
@@ -55,17 +52,13 @@ public abstract class BaseOchFragment<V extends IView, P extends Presenter<V>> e
@Override
protected void initViews() {
slidePanelView = findViewById(R.id.module_mogo_och_slide_panel);
tvNoticeContainer = findViewById(R.id.module_mogo_och_notice_container);
tvNotice = findViewById(R.id.module_mogo_och_notice);
ctvAutopilotStatus = findViewById(R.id.module_mogo_och_autopilot_status);
flStationPanelContainer = findViewById(R.id.module_mogo_och_station_panel_container);
fivNoticeHead = findViewById(R.id.module_mogo_och_notice_head);
tvOperationStatus = findViewById( R.id.module_mogo_och_operation_status );
panelView = LayoutInflater.from(getContext()).inflate(getStationPanelViewId(), flStationPanelContainer);
slidePanelView.setOnSlidePanelMoveToEndListener(onSlideToEndListener);
fivNoticeHead.setAnimRes(sHappy1);
ctvAutopilotStatus.setOnClickListener(new OnPreventFastClickListener() {
@Override
@@ -123,19 +116,7 @@ public abstract class BaseOchFragment<V extends IView, P extends Presenter<V>> e
public void showNotice(String notice) {
getActivity().runOnUiThread(() -> {
tvNotice.setText(notice);
AIAssist.getInstance(getContext()).speakTTSVoice(notice);
tvNoticeContainer.setVisibility(View.VISIBLE);
fivNoticeHead.setVisibility(View.VISIBLE);
fivNoticeHead.startAnim();
});
}
public void hideNotice() {
getActivity().runOnUiThread(() -> {
tvNoticeContainer.setVisibility(View.GONE);
fivNoticeHead.setVisibility(View.GONE);
fivNoticeHead.stopAnim();
});
}
@@ -196,35 +177,5 @@ public abstract class BaseOchFragment<V extends IView, P extends Presenter<V>> e
*/
public abstract void restartAutopilot();
private final int[] sHappy1 = {
R.drawable.ic_happy1_00000,
R.drawable.ic_happy1_00001,
R.drawable.ic_happy1_00002,
R.drawable.ic_happy1_00003,
R.drawable.ic_happy1_00004,
R.drawable.ic_happy1_00005,
R.drawable.ic_happy1_00006,
R.drawable.ic_happy1_00007,
R.drawable.ic_happy1_00008,
R.drawable.ic_happy1_00009,
R.drawable.ic_happy1_00010,
R.drawable.ic_happy1_00011,
R.drawable.ic_happy1_00012,
R.drawable.ic_happy1_00013,
R.drawable.ic_happy1_00014,
R.drawable.ic_happy1_00015,
R.drawable.ic_happy1_00016,
R.drawable.ic_happy1_00017,
R.drawable.ic_happy1_00018,
R.drawable.ic_happy1_00019,
R.drawable.ic_happy1_00020,
R.drawable.ic_happy1_00021,
R.drawable.ic_happy1_00022,
R.drawable.ic_happy1_00023,
R.drawable.ic_happy1_00024,
R.drawable.ic_happy1_00025,
R.drawable.ic_happy1_00026,
R.drawable.ic_happy1_00027,
R.drawable.ic_happy1_00028
};
}