diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 740794bd48..771c1f74d7 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -89,7 +89,6 @@
-
diff --git a/OCH/mogo-och-taxi/build.gradle b/OCH/mogo-och-taxi/build.gradle
index dad79886c1..8a55d2b6af 100644
--- a/OCH/mogo-och-taxi/build.gradle
+++ b/OCH/mogo-och-taxi/build.gradle
@@ -40,6 +40,7 @@ dependencies {
implementation rootProject.ext.dependencies.arouter
annotationProcessor rootProject.ext.dependencies.aroutercompiler
implementation rootProject.ext.dependencies.rxandroid
+ implementation rootProject.ext.dependencies.androidxconstraintlayout
if (Boolean.valueOf(RELEASE)) {
implementation rootProject.ext.dependencies.mogooch
diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/IMogoOCHTaxiArriveCallback.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/IMogoOCHTaxiArriveCallback.java
index 349f4baf89..1832059020 100644
--- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/IMogoOCHTaxiArriveCallback.java
+++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/IMogoOCHTaxiArriveCallback.java
@@ -9,6 +9,8 @@ public
*/
interface IMogoOCHTaxiArriveCallback {
+ void onTheWay2StartStation();
+
/**
* 到达起始站
*/
diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/OCHTaxiFragment.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/OCHTaxiFragment.java
index 341119683a..231b02e613 100644
--- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/OCHTaxiFragment.java
+++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/OCHTaxiFragment.java
@@ -2,6 +2,7 @@ package com.mogo.och.taxi.ui;
import android.os.Bundle;
import android.view.View;
+import android.widget.TextView;
import androidx.annotation.NonNull;
@@ -38,6 +39,11 @@ class OCHTaxiFragment extends BaseOchFragment< OCHTaxiView, OCHTaxiPresenter > i
return fragment;
}
+ private TextView mOrderStatus;
+ private TextView mStartStationName;
+ private TextView mEndStationName;
+ private TextView mDistance;
+
@Override
public int getStationPanelViewId() {
return R.layout.module_och_taxi_panel;
@@ -46,6 +52,11 @@ class OCHTaxiFragment extends BaseOchFragment< OCHTaxiView, OCHTaxiPresenter > i
@Override
protected void initViews() {
super.initViews();
+ mOrderStatus = findViewById( R.id.module_och_taxi_order_status );
+ mStartStationName = findViewById( R.id.module_och_taxi_order_start_station );
+ mEndStationName = findViewById( R.id.module_och_taxi_order_end_station );
+ mDistance = findViewById( R.id.module_och_taxi_order_distance );
+
if ( MogoApisHandler.getInstance()
.getApis()
.getStatusManagerApi()
@@ -90,22 +101,29 @@ class OCHTaxiFragment extends BaseOchFragment< OCHTaxiView, OCHTaxiPresenter > i
}
private void initOrderStatus() {
+ if ( MogoOCHTaxiModel.getInstance().checkCurrentOCHOrder() ) {
+ mStartStationName.setText( MogoOCHTaxiModel.getInstance().getCurrentOCHOrder().startStation );
+ mEndStationName.setText( MogoOCHTaxiModel.getInstance().getCurrentOCHOrder().endStation );
+ mDistance.setText( MogoOCHTaxiModel.getInstance().getCurrentOCHOrder().travelDistance + " km" );
+ }
if ( MogoOCHTaxiModel.getInstance().isArriveAtEndStation() ) {
Logger.d( TAG, "已经达到终点" );
slidePanelView.setVisibility( View.VISIBLE );
slidePanelView.setText( getString( R.string.module_och_taxi_arrive_at_end_station ) );
- return;
- }
- if ( MogoOCHTaxiModel.getInstance().isOnTheWay2EndStation() ) {
+ mOrderStatus.setText( "已到达乘客下车地点" );
+ } else if ( MogoOCHTaxiModel.getInstance().isOnTheWay2EndStation() ) {
Logger.d( TAG, "已经去往终点" );
slidePanelView.setVisibility( View.GONE );
- return;
- }
- if ( MogoOCHTaxiModel.getInstance().isArriveAtStartStation() ) {
+ mOrderStatus.setText( "去往下车地点" );
+ } else if ( MogoOCHTaxiModel.getInstance().isArriveAtStartStation() ) {
Logger.d( TAG, "已经达到起点" );
slidePanelView.setVisibility( View.VISIBLE );
slidePanelView.setText( getString( R.string.module_och_taxi_arrive_at_start_station ) );
- return;
+ mOrderStatus.setText( "已到达上车地点,等待乘客上车" );
+ } else if ( MogoOCHTaxiModel.getInstance().checkCurrentOCHOrder() ) {
+ Logger.d( TAG, "去往上车站点" );
+ slidePanelView.setVisibility( View.GONE );
+ mOrderStatus.setText( "收到新订单,正在前往上车地点" );
}
}
@@ -115,6 +133,12 @@ class OCHTaxiFragment extends BaseOchFragment< OCHTaxiView, OCHTaxiPresenter > i
initOrderStatus();
}
+ @Override
+ public void onTheWay2StartStation() {
+ Logger.d( TAG, "去往上车站点" );
+ initOrderStatus();
+ }
+
@Override
public void onArriveAtEndStation() {
Logger.d( TAG, "通知达到终点" );
diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/OCHTaxiUiController.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/OCHTaxiUiController.java
index c29568768c..6b696fef07 100644
--- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/OCHTaxiUiController.java
+++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/OCHTaxiUiController.java
@@ -94,6 +94,11 @@ class OCHTaxiUiController implements IMogoOCHTaxiArriveCallback {
this.mOCHTaxiArriveCallback = OCHTaxiArriveCallback;
}
+ @Override
+ public void onTheWay2StartStation() {
+
+ }
+
@Override
public void onArriveAtStartStation() {
runOnUIThread( () -> {
diff --git a/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/module_och_taxi_blue_dot.png b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/module_och_taxi_blue_dot.png
new file mode 100644
index 0000000000..e1fd463963
Binary files /dev/null and b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/module_och_taxi_blue_dot.png differ
diff --git a/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/module_och_taxi_dot_line.png b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/module_och_taxi_dot_line.png
new file mode 100644
index 0000000000..186001352c
Binary files /dev/null and b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/module_och_taxi_dot_line.png differ
diff --git a/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/module_och_taxi_green_dot.png b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/module_och_taxi_green_dot.png
new file mode 100644
index 0000000000..a676a789c3
Binary files /dev/null and b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/module_och_taxi_green_dot.png differ
diff --git a/OCH/mogo-och-taxi/src/main/res/drawable/module_och_taxi_panel_bkg.xml b/OCH/mogo-och-taxi/src/main/res/drawable/module_och_taxi_panel_bkg.xml
new file mode 100644
index 0000000000..d6aa33cbcd
--- /dev/null
+++ b/OCH/mogo-och-taxi/src/main/res/drawable/module_och_taxi_panel_bkg.xml
@@ -0,0 +1,21 @@
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OCH/mogo-och-taxi/src/main/res/drawable/module_och_taxi_panel_distance_bkg.xml b/OCH/mogo-och-taxi/src/main/res/drawable/module_och_taxi_panel_distance_bkg.xml
new file mode 100644
index 0000000000..998e8eeaaf
--- /dev/null
+++ b/OCH/mogo-och-taxi/src/main/res/drawable/module_och_taxi_panel_distance_bkg.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/OCH/mogo-och-taxi/src/main/res/layout/module_och_taxi_panel.xml b/OCH/mogo-och-taxi/src/main/res/layout/module_och_taxi_panel.xml
index 30ea93e8e1..20eacb3fbd 100644
--- a/OCH/mogo-och-taxi/src/main/res/layout/module_och_taxi_panel.xml
+++ b/OCH/mogo-och-taxi/src/main/res/layout/module_och_taxi_panel.xml
@@ -1,27 +1,147 @@
+ android:layout_marginLeft="30px"
+ android:layout_marginTop="24px"
+ android:text="已到达上车站点,等待乘客上车"
+ android:textColor="@color/module_och_order_status_textColor"
+ android:textSize="24px"
+ android:textStyle="bold" />
-
+ android:layout_height="2px"
+ android:layout_marginLeft="30px"
+ android:layout_marginTop="23px"
+ android:layout_marginRight="30px"
+ android:background="#151B37" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
\ No newline at end of file
diff --git a/OCH/mogo-och-taxi/src/main/res/values-xhdpi/dimens.xml b/OCH/mogo-och-taxi/src/main/res/values-xhdpi/dimens.xml
new file mode 100644
index 0000000000..0e6c603e65
--- /dev/null
+++ b/OCH/mogo-och-taxi/src/main/res/values-xhdpi/dimens.xml
@@ -0,0 +1,5 @@
+
+
+ 464px
+ 310px
+
\ No newline at end of file
diff --git a/OCH/mogo-och-taxi/src/main/res/values/colors.xml b/OCH/mogo-och-taxi/src/main/res/values/colors.xml
new file mode 100644
index 0000000000..ff79c2f9a5
--- /dev/null
+++ b/OCH/mogo-och-taxi/src/main/res/values/colors.xml
@@ -0,0 +1,4 @@
+
+
+ #FFFFFF
+
\ No newline at end of file
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/CloudLocationInfo.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/CloudLocationInfo.java
index 8c23c046ac..323e91753e 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/CloudLocationInfo.java
+++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/CloudLocationInfo.java
@@ -2,7 +2,9 @@ package com.mogo.module.common.entity;
import android.os.Parcel;
import android.os.Parcelable;
+import android.text.TextUtils;
+import com.mogo.commons.debug.DebugConfig;
import com.mogo.map.MogoLatLng;
import com.mogo.utils.CoordinateUtils;
@@ -21,8 +23,14 @@ public class CloudLocationInfo implements Parcelable {
private long satelliteTime;
private double alt;
private double speed;
+ private int vehicleType = 0;
public CloudLocationInfo() {
+ if ( DebugConfig.getProductFlavor().contains( "taxi" ) ) {
+ vehicleType = 9;
+ } else if ( DebugConfig.getProductFlavor().contains( "bus" ) ) {
+ vehicleType = 10;
+ }
}
public CloudLocationInfo( CloudLocationInfo info ) {
@@ -35,7 +43,7 @@ public class CloudLocationInfo implements Parcelable {
this.speed = info.speed;
}
- public void convertCoor2GCJ02(){
+ public void convertCoor2GCJ02() {
double[] amapCoord = CoordinateUtils.transformFromWGSToGCJ( lat, lon );
if ( amapCoord != null ) {
this.lat = amapCoord[0];
@@ -43,44 +51,6 @@ public class CloudLocationInfo implements Parcelable {
}
}
- protected CloudLocationInfo( Parcel in ) {
- lat = in.readDouble();
- lon = in.readDouble();
- heading = in.readDouble();
- systemTime = in.readLong();
- satelliteTime = in.readLong();
- alt = in.readDouble();
- speed = in.readDouble();
- }
-
- @Override
- public void writeToParcel( Parcel dest, int flags ) {
- dest.writeDouble( lat );
- dest.writeDouble( lon );
- dest.writeDouble( heading );
- dest.writeLong( systemTime );
- dest.writeLong( satelliteTime );
- dest.writeDouble( alt );
- dest.writeDouble( speed );
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-
- public static final Creator< CloudLocationInfo > CREATOR = new Creator< CloudLocationInfo >() {
- @Override
- public CloudLocationInfo createFromParcel( Parcel in ) {
- return new CloudLocationInfo( in );
- }
-
- @Override
- public CloudLocationInfo[] newArray( int size ) {
- return new CloudLocationInfo[size];
- }
- };
-
public double getLat() {
return lat;
}
@@ -172,4 +142,44 @@ public class CloudLocationInfo implements Parcelable {
public int hashCode() {
return Objects.hash( lat, lon );
}
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel( Parcel dest, int flags ) {
+ dest.writeDouble( this.lat );
+ dest.writeDouble( this.lon );
+ dest.writeDouble( this.heading );
+ dest.writeLong( this.systemTime );
+ dest.writeLong( this.satelliteTime );
+ dest.writeDouble( this.alt );
+ dest.writeDouble( this.speed );
+ dest.writeInt( this.vehicleType );
+ }
+
+ protected CloudLocationInfo( Parcel in ) {
+ this.lat = in.readDouble();
+ this.lon = in.readDouble();
+ this.heading = in.readDouble();
+ this.systemTime = in.readLong();
+ this.satelliteTime = in.readLong();
+ this.alt = in.readDouble();
+ this.speed = in.readDouble();
+ this.vehicleType = in.readInt();
+ }
+
+ public static final Creator< CloudLocationInfo > CREATOR = new Creator< CloudLocationInfo >() {
+ @Override
+ public CloudLocationInfo createFromParcel( Parcel source ) {
+ return new CloudLocationInfo( source );
+ }
+
+ @Override
+ public CloudLocationInfo[] newArray( int size ) {
+ return new CloudLocationInfo[size];
+ }
+ };
}