[2.12.0] opt
This commit is contained in:
@@ -291,7 +291,7 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
onChangeOperationStatus();
|
||||
});
|
||||
mCloseNaviIcon.setOnClickListener(v -> {
|
||||
showNaviToStartStationFragment(false);
|
||||
showNaviToStationFragment(false);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -564,7 +564,7 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
//todo ui 切换
|
||||
}
|
||||
|
||||
protected void showNaviToStartStationFragment(boolean isShow) {
|
||||
protected void showNaviToStationFragment(boolean isShow) {
|
||||
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
|
||||
if (isShow) {
|
||||
// if (ochNaviFragment == null){
|
||||
|
||||
@@ -354,11 +354,21 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment implement
|
||||
NaviToDestinationModel.getInstance(getContext()).setOCHTaciNaviChangedCallback(this);
|
||||
}
|
||||
|
||||
private void startNaviToEndStation(boolean isShow, double orderEndStationLat, double orderEndStationLng) {
|
||||
NaviToDestinationModel.getInstance(getContext()).destroyAmaNavi();
|
||||
CallerLogger.INSTANCE.d(M_TAXI + TAG, "currentLatLng=" + mTaxiFragment.mCurLatitude + " " + mTaxiFragment.mCurLongitude);
|
||||
NaviLatLng startNaviLatLng = new NaviLatLng(mTaxiFragment.mCurLatitude, mTaxiFragment.mCurLongitude);
|
||||
NaviLatLng endNaviLatLng = new NaviLatLng(orderEndStationLat, orderEndStationLng);
|
||||
NaviToDestinationModel.getInstance(getContext()).initAMapNavi(startNaviLatLng, endNaviLatLng);
|
||||
NaviToDestinationModel.getInstance(getContext()).setVoiceIsMute(isShow);
|
||||
NaviToDestinationModel.getInstance(getContext()).setOCHTaciNaviChangedCallback(this);
|
||||
}
|
||||
|
||||
private void showOrHideNavi(boolean isShow) {
|
||||
if (!isShow) {
|
||||
mNaviIcon.setVisibility(View.GONE);
|
||||
NaviToDestinationModel.getInstance(getContext()).destroyAmaNavi();
|
||||
mTaxiFragment.showNaviToStartStationFragment(false);
|
||||
mTaxiFragment.showNaviToStationFragment(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -567,7 +577,9 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment implement
|
||||
}
|
||||
} else if (v.getId() == R.id.module_och_taxi_navi_end_iv){
|
||||
// TODO: 2021/11/30 打开去往乘客下车点的导航页面
|
||||
|
||||
if (mTaxiFragment != null) {
|
||||
showNaviToEndStationFragment(true);
|
||||
}
|
||||
}else if (v.getId() == R.id.taxi_start_by_auto){//自驾模式
|
||||
CallerLogger.INSTANCE.d(M_TAXI + TAG, "自驾模式");
|
||||
mOrderStartModeBtn.setTag(0);
|
||||
@@ -585,10 +597,20 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment implement
|
||||
* @param isShow
|
||||
*/
|
||||
private void showNaviToStartStationFragment(boolean isShow) {
|
||||
mTaxiFragment.showNaviToStartStationFragment(isShow);
|
||||
mTaxiFragment.showNaviToStationFragment(isShow);
|
||||
startNaviToStartStation(isShow, mOrderStartStationLat, mOrderStartStationLng);
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示/隐藏 前往乘客目的地的导航
|
||||
*
|
||||
* @param isShow
|
||||
*/
|
||||
private void showNaviToEndStationFragment(boolean isShow) {
|
||||
mTaxiFragment.showNaviToStationFragment(isShow);
|
||||
startNaviToEndStation(isShow, mOrderStartStationLat, mOrderStartStationLng);
|
||||
}
|
||||
|
||||
|
||||
public void onCurrentOrderCancelDone() {
|
||||
//去除起终点
|
||||
@@ -633,10 +655,10 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment implement
|
||||
public void reInitNaviAmap(boolean isPlay, boolean isRestart) {
|
||||
CallerLogger.INSTANCE.d(M_TAXI + TAG, "isPlay = " + isPlay + ", isRestart=" + isRestart);
|
||||
if (!isRestart) {
|
||||
mTaxiFragment.showNaviToStartStationFragment(false);
|
||||
mTaxiFragment.showNaviToStationFragment(false);
|
||||
return;
|
||||
}
|
||||
mTaxiFragment.showNaviToStartStationFragment(false);
|
||||
mTaxiFragment.showNaviToStationFragment(false);
|
||||
UiThreadHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
@@ -50,13 +50,7 @@ public class TaxiNaviFragment extends BaseTaxiUIFragment implements AMapNaviView
|
||||
}
|
||||
|
||||
private void initMapView(View view) {
|
||||
// mOverviewButtonView = view.findViewById(R.id.navi_overviewbuttonview);
|
||||
// mAMapNaviView.setLazyOverviewButtonView(mOverviewButtonView);
|
||||
// mOverviewButtonView.setOnClickListener(this);
|
||||
// DriveWayView mDriveWayView = view.findViewById(R.id.navi_drivewayview);
|
||||
// mAMapNaviView.setLazyDriveWayView(mDriveWayView);
|
||||
// mNextTurnTipView = view.findViewById(R.id.navi_nextturntipview);
|
||||
// mAMapNaviView.setLazyNextTurnTipView(mNextTurnTipView);
|
||||
|
||||
mAMapNaviView = view.findViewById(R.id.navi_view);
|
||||
mAMapNaviView.setAMapNaviViewListener(this);
|
||||
//车头向上模式
|
||||
|
||||
Reference in New Issue
Block a user