完成网约车,自动驾驶出租车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

@@ -171,7 +171,6 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
if ( isGoingToNextStation ) {
mView.hideSlidePanel();
mView.hideNotice();
}
resetNextStopStation( lastStopStation );
@@ -294,7 +293,6 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog
if ( mView != null ) {
mView.refreshBusStations( stationList, currentStationIndex, nextStationIndex );
mView.hideSlidePanel();
mView.hideNotice();
}
if ( isGoingToNextStation ) {

View File

@@ -84,6 +84,8 @@ class OCHTaxiFragment extends BaseOchFragment< OCHTaxiView, OCHTaxiPresenter > i
} else {
flatMode();
}
// 出租车不需要开启按钮
tvOperationStatus.setVisibility(View.GONE);
}
private void initListeners() {

View File

@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="@dimen/module_och_taxi_panel_width"
android:layout_height="@dimen/module_och_taxi_panel_height"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/module_och_taxi_panel_bkg"
android:orientation="vertical">
@@ -49,18 +50,18 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5px"
android:text="后路站"
android:textColor="@color/module_och_order_status_textColor"
android:textSize="@dimen/module_och_taxi_order_start_station_textSize"
android:textStyle="bold"
app:layout_constraintLeft_toRightOf="@+id/greenDot"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent"
tools:text="后路站" />
<TextView
android:id="@+id/module_och_taxi_order_start_station_anchor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="上车站点"
android:text="上车"
android:textColor="@color/module_och_taxi_order_start_station_anchor_textColor"
android:textSize="@dimen/module_och_taxi_order_start_station_anchor_textSize"
android:textStyle="bold"
@@ -71,10 +72,11 @@
<ImageView
android:id="@+id/dotLine"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="0dp"
android:src="@drawable/module_och_taxi_dot_line"
app:layout_constraintLeft_toLeftOf="@+id/greenDot"
app:layout_constraintRight_toRightOf="@+id/greenDot"
app:layout_constraintBottom_toTopOf="@+id/blueDot"
app:layout_constraintTop_toBottomOf="@+id/greenDot" />
<ImageView
@@ -90,20 +92,20 @@
android:id="@+id/module_och_taxi_order_end_station"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="后路站1"
android:textColor="@color/module_och_order_status_textColor"
android:textSize="@dimen/module_och_taxi_order_start_station_textSize"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="@+id/module_och_taxi_order_start_station"
app:layout_constraintLeft_toRightOf="@+id/greenDot" />
app:layout_constraintLeft_toRightOf="@+id/greenDot"
tools:text="后路站1" />
<TextView
android:id="@+id/module_och_taxi_order_end_station_anchor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="下车站点"
android:text="下车"
android:textColor="@color/module_och_taxi_order_end_station_anchor_textColor"
android:textSize="@dimen/module_och_taxi_order_end_station_anchor_textSize"
android:textStyle="bold"

View File

@@ -2,25 +2,25 @@
<resources>
<dimen name="module_och_taxi_panel_width">464px</dimen>
<dimen name="module_och_taxi_panel_height">310px</dimen>
<dimen name="module_och_taxi_order_status_marginLeft">30px</dimen>
<dimen name="module_och_taxi_order_status_marginTop">24px</dimen>
<dimen name="module_och_taxi_order_status_textSize">24px</dimen>
<dimen name="module_och_taxi_order_status_marginLeft">20px</dimen>
<dimen name="module_och_taxi_order_status_marginTop">20px</dimen>
<dimen name="module_och_taxi_order_status_textSize">20px</dimen>
<dimen name="module_och_taxi_order_status_divider_height">1px</dimen>
<dimen name="module_och_taxi_order_status_divider_marginLeft">30px</dimen>
<dimen name="module_och_taxi_order_status_divider_marginTop">23px</dimen>
<dimen name="module_och_taxi_order_status_divider_marginRight">30px</dimen>
<dimen name="module_och_taxi_order_status_stationInfo_height">146px</dimen>
<dimen name="module_och_taxi_order_status_stationInfo_paddingLeft">30px</dimen>
<dimen name="module_och_taxi_order_status_stationInfo_paddingTop">23px</dimen>
<dimen name="module_och_taxi_order_status_stationInfo_paddingRight">30px</dimen>
<dimen name="module_och_taxi_order_status_stationInfo_paddingBottom">23px</dimen>
<dimen name="module_och_taxi_order_status_divider_marginLeft">20px</dimen>
<dimen name="module_och_taxi_order_status_divider_marginTop">20px</dimen>
<dimen name="module_och_taxi_order_status_divider_marginRight">20px</dimen>
<dimen name="module_och_taxi_order_status_stationInfo_height">140px</dimen>
<dimen name="module_och_taxi_order_status_stationInfo_paddingLeft">20px</dimen>
<dimen name="module_och_taxi_order_status_stationInfo_paddingTop">20px</dimen>
<dimen name="module_och_taxi_order_status_stationInfo_paddingRight">17px</dimen>
<dimen name="module_och_taxi_order_status_stationInfo_paddingBottom">20px</dimen>
<dimen name="module_och_taxi_order_start_station_textSize">26px</dimen>
<dimen name="module_och_taxi_order_start_station_anchor_textSize">20px</dimen>
<dimen name="module_och_taxi_order_end_station_anchor_textSize">20px</dimen>
<dimen name="module_och_taxi_order_distance_container_height">80px</dimen>
<dimen name="module_och_taxi_order_distance_container_height">64px</dimen>
<dimen name="module_och_taxi_order_distance_container_marginLeft">3px</dimen>
<dimen name="module_och_taxi_order_distance_anchor_marginLeft">27px</dimen>
<dimen name="module_och_taxi_order_distance_anchor_marginLeft">20px</dimen>
<dimen name="module_och_taxi_order_distance_anchor_textSize">20px</dimen>
<dimen name="module_och_taxi_order_distance_textSize">28px</dimen>
<dimen name="module_och_taxi_order_distance_marginRight">27px</dimen>
<dimen name="module_och_taxi_order_distance_textSize">24px</dimen>
<dimen name="module_och_taxi_order_distance_marginRight">17px</dimen>
</resources>

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="module_och_order_status_textColor">#FFFFFF</color>
<color name="module_och_taxi_order_status_divider_bkgColor">#4D151B37</color>
<color name="module_och_taxi_order_status_divider_bkgColor">#707DBE</color>
<color name="module_och_taxi_order_start_station_anchor_textColor">#8198E8</color>
<color name="module_och_taxi_order_end_station_anchor_textColor">#8198E8</color>
<color name="module_och_taxi_order_distance_anchor_textColor">#8198E8</color>
<color name="module_och_taxi_order_distance_textColor">#1FA7FF</color>
<color name="module_och_taxi_order_distance_textColor">#FFFFFF</color>
</resources>

View File

@@ -2,25 +2,25 @@
<resources>
<dimen name="module_och_taxi_panel_width">464px</dimen>
<dimen name="module_och_taxi_panel_height">310px</dimen>
<dimen name="module_och_taxi_order_status_marginLeft">30px</dimen>
<dimen name="module_och_taxi_order_status_marginTop">24px</dimen>
<dimen name="module_och_taxi_order_status_textSize">24px</dimen>
<dimen name="module_och_taxi_order_status_marginLeft">20px</dimen>
<dimen name="module_och_taxi_order_status_marginTop">20px</dimen>
<dimen name="module_och_taxi_order_status_textSize">20px</dimen>
<dimen name="module_och_taxi_order_status_divider_height">1px</dimen>
<dimen name="module_och_taxi_order_status_divider_marginLeft">30px</dimen>
<dimen name="module_och_taxi_order_status_divider_marginTop">23px</dimen>
<dimen name="module_och_taxi_order_status_divider_marginRight">30px</dimen>
<dimen name="module_och_taxi_order_status_stationInfo_height">146px</dimen>
<dimen name="module_och_taxi_order_status_stationInfo_paddingLeft">30px</dimen>
<dimen name="module_och_taxi_order_status_stationInfo_paddingTop">23px</dimen>
<dimen name="module_och_taxi_order_status_stationInfo_paddingRight">30px</dimen>
<dimen name="module_och_taxi_order_status_stationInfo_paddingBottom">23px</dimen>
<dimen name="module_och_taxi_order_status_divider_marginLeft">20px</dimen>
<dimen name="module_och_taxi_order_status_divider_marginTop">20px</dimen>
<dimen name="module_och_taxi_order_status_divider_marginRight">20px</dimen>
<dimen name="module_och_taxi_order_status_stationInfo_height">140px</dimen>
<dimen name="module_och_taxi_order_status_stationInfo_paddingLeft">20px</dimen>
<dimen name="module_och_taxi_order_status_stationInfo_paddingTop">20px</dimen>
<dimen name="module_och_taxi_order_status_stationInfo_paddingRight">17px</dimen>
<dimen name="module_och_taxi_order_status_stationInfo_paddingBottom">20px</dimen>
<dimen name="module_och_taxi_order_start_station_textSize">26px</dimen>
<dimen name="module_och_taxi_order_start_station_anchor_textSize">20px</dimen>
<dimen name="module_och_taxi_order_end_station_anchor_textSize">20px</dimen>
<dimen name="module_och_taxi_order_distance_container_height">80px</dimen>
<dimen name="module_och_taxi_order_distance_container_height">64px</dimen>
<dimen name="module_och_taxi_order_distance_container_marginLeft">3px</dimen>
<dimen name="module_och_taxi_order_distance_anchor_marginLeft">27px</dimen>
<dimen name="module_och_taxi_order_distance_anchor_marginLeft">20px</dimen>
<dimen name="module_och_taxi_order_distance_anchor_textSize">20px</dimen>
<dimen name="module_och_taxi_order_distance_textSize">28px</dimen>
<dimen name="module_och_taxi_order_distance_marginRight">27px</dimen>
<dimen name="module_och_taxi_order_distance_textSize">24px</dimen>
<dimen name="module_och_taxi_order_distance_marginRight">17px</dimen>
</resources>

View File

@@ -7,9 +7,9 @@
<string name="module_och_taxi_order_distance_text_ph">3.2 km</string>
<string name="module_och_taxi_order_complete">请携带好随身物品,注意侧后\n方来车感谢体验蘑菇智行自\n动驾驶车</string>
<string name="module_och_taxi_on_the_way_2_end_station">去往下车地点</string>
<string name="module_och_taxi_waiting">已到达上车地点,等待乘客上车</string>
<string name="module_och_taxi_new_order">收到新订单,正在前往上车地点</string>
<string name="module_och_taxi_arrive_at_end_station2">已到达乘客下车地点</string>
<string name="module_och_taxi_waiting">已到达,等待乘客上车</string>
<string name="module_och_taxi_new_order">收到新订单,前往上车地点</string>
<string name="module_och_taxi_arrive_at_end_station2">已到达下车地点</string>
<string name="module_och_taxi_order_completed">订单已完成</string>
<string name="module_och_taxi_order_cancel">订单已取消</string>
</resources>

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
};
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

View File

@@ -57,40 +57,6 @@
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" />
<FrameLayout
android:id="@+id/module_mogo_och_notice_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/module_mogo_och_base_notice_box_bg"
android:visibility="gone"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:visibility="visible">
<TextView
android:id="@+id/module_mogo_och_notice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:lineSpacingExtra="5px"
android:maxWidth="@dimen/module_mogo_och_notice_text_max_width"
android:text="请携带好随身物品\n注意侧后方来车\n感谢体验蘑菇智行自动驾驶车"
android:textColor="#fff"
android:textSize="@dimen/module_mogo_och_notice_text_size"
android:textStyle="bold" />
</FrameLayout>
<com.mogo.och.view.FrameAnimImageView
android:id="@+id/module_mogo_och_notice_head"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="185px"
android:src="@drawable/ic_happy1_00000"
android:visibility="gone"
app:layout_constraintRight_toRightOf="@id/module_mogo_och_notice_container"
app:layout_constraintTop_toTopOf="@id/module_mogo_och_notice_container" />
<Button
android:id="@+id/btnAutopilotDisable"
android:layout_width="wrap_content"