[2.12.0] taxi 司机端增加送驾带轨迹导航
This commit is contained in:
@@ -1326,6 +1326,7 @@ public class TaxiModel {
|
||||
}
|
||||
//开启实时计算剩余距离,剩余时间,预计时间
|
||||
startOrStopCalculateRouteInfo(true);
|
||||
NaviToDestinationModel.getInstance(mContext).destroyAmaNavi();
|
||||
}
|
||||
|
||||
private void reportTotalDisAndTime() {
|
||||
|
||||
@@ -565,6 +565,7 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
|
||||
protected void showAmapNaviToStationFragment(boolean isShow) {
|
||||
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
|
||||
closeRouteViewIFHadeAdd(transaction);
|
||||
if (isShow) {
|
||||
// if (ochNaviFragment == null){
|
||||
ochAmapNaviFragment = TaxiAmapNaviFragment.newInstance();
|
||||
@@ -578,20 +579,34 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
flNaviPanelContainer.setVisibility(View.VISIBLE);
|
||||
CallerSmpManager.hidePanel();//隐藏小地图
|
||||
} else {
|
||||
if (ochAmapNaviFragment != null) {
|
||||
ochAmapNaviFragment.onDestroy();
|
||||
transaction.remove(ochAmapNaviFragment);
|
||||
transaction.commitAllowingStateLoss();
|
||||
ochAmapNaviFragment = null;
|
||||
}
|
||||
closeAmapViewIFHadeAdd(transaction);
|
||||
mCloseNaviIcon.setVisibility(View.GONE);
|
||||
flNaviPanelContainer.setVisibility(View.GONE);
|
||||
CallerSmpManager.showPanel();//显示小地图
|
||||
}
|
||||
}
|
||||
|
||||
private void closeAmapViewIFHadeAdd(FragmentTransaction transaction){
|
||||
if (ochAmapNaviFragment != null) {
|
||||
ochAmapNaviFragment.onDestroy();
|
||||
transaction.remove(ochAmapNaviFragment);
|
||||
transaction.commitAllowingStateLoss();
|
||||
ochAmapNaviFragment = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void closeRouteViewIFHadeAdd(FragmentTransaction transaction){
|
||||
if (ochAmapNaviFragment != null) {
|
||||
taxiRottingNaviFragment.onDestroy();
|
||||
transaction.remove(taxiRottingNaviFragment);
|
||||
transaction.commitAllowingStateLoss();
|
||||
taxiRottingNaviFragment = null;
|
||||
}
|
||||
}
|
||||
|
||||
protected void showRottingToStationFragment(boolean isShow) {
|
||||
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
|
||||
closeAmapViewIFHadeAdd(transaction);
|
||||
if (isShow) {
|
||||
// if (ochNaviFragment == null){
|
||||
taxiRottingNaviFragment = TaxiRottingNaviFragment.newInstance();
|
||||
@@ -605,12 +620,7 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
flNaviPanelContainer.setVisibility(View.VISIBLE);
|
||||
CallerSmpManager.hidePanel();//隐藏小地图
|
||||
} else {
|
||||
if (taxiRottingNaviFragment != null) {
|
||||
taxiRottingNaviFragment.onDestroy();
|
||||
transaction.remove(taxiRottingNaviFragment);
|
||||
transaction.commitAllowingStateLoss();
|
||||
taxiRottingNaviFragment = null;
|
||||
}
|
||||
closeRouteViewIFHadeAdd(transaction);
|
||||
mCloseNaviIcon.setVisibility(View.GONE);
|
||||
flNaviPanelContainer.setVisibility(View.GONE);
|
||||
CallerSmpManager.showPanel();//显示小地图
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.mogo.och.taxi.constant.TaxiConst;
|
||||
import com.mogo.och.taxi.constant.TaxiOrderStatusEnum;
|
||||
import com.mogo.och.taxi.bean.OrderQueryRespBean;
|
||||
import com.mogo.och.taxi.bean.OrderQueryRouteInfoRespBean;
|
||||
import com.mogo.och.taxi.model.NaviToDestinationModel;
|
||||
import com.mogo.och.taxi.model.TaxiModel;
|
||||
import com.mogo.och.taxi.presenter.TaxiPresenter;
|
||||
import com.mogo.och.taxi.utils.TPRouteDataTestUtils;
|
||||
@@ -395,6 +396,9 @@ public class TaxiFragment extends BaseTaxiTabFragment<TaxiFragment, TaxiPresente
|
||||
}
|
||||
TaxiModel.getInstance().setOnTheWayToEndStation();
|
||||
});
|
||||
findViewById(R.id.test_bar_route).setOnClickListener(v -> {
|
||||
testRouteInfoUpload();
|
||||
});
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
|
||||
@@ -29,7 +29,7 @@ public class TaxiRottingNaviFragment extends MvpFragment<TaxiRottingNaviFragment
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.taxi_rotting_navi_view;
|
||||
@@ -45,11 +45,6 @@ public class TaxiRottingNaviFragment extends MvpFragment<TaxiRottingNaviFragment
|
||||
mMapDirectionView = findViewById(R.id.rotting_navi_view);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initViews(Bundle savedInstanceState) {
|
||||
super.initViews(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
||||
@@ -85,5 +85,12 @@
|
||||
android:text="到达目的地"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/test_bar_route"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="模拟轨迹"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.mogo.och.common.module.wigets.OCHBorderShadowLayout>
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:cardCornerRadius="30px"
|
||||
app:cardElevation="8px"
|
||||
app:cardUseCompatPadding="true"
|
||||
@@ -11,6 +11,6 @@
|
||||
|
||||
<com.mogo.och.taxi.ui.TaxiMapDirectionView
|
||||
android:id="@+id/rotting_navi_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
Reference in New Issue
Block a user