This commit is contained in:
wangcongtao
2020-01-12 09:46:00 +08:00
parent 63d4268eca
commit 714b974db2
13 changed files with 65 additions and 24 deletions

View File

@@ -1,6 +1,7 @@
package com.mogo.module.map;
import android.content.Intent;
import android.graphics.Rect;
import android.os.Bundle;
import android.text.TextUtils;
@@ -16,6 +17,8 @@ import com.mogo.map.uicontroller.EnumMapUI;
import com.mogo.service.MogoServicePaths;
import com.mogo.service.map.IMogoMapService;
import com.mogo.service.voice.IMogoVoiceListener;
import com.mogo.utils.ResourcesHelper;
import com.mogo.utils.WindowUtils;
import com.mogo.utils.logger.Logger;
import java.util.Map;
@@ -41,6 +44,14 @@ public class MapPresenter extends Presenter< MapView > implements IMogoVoiceList
super.onCreate( owner );
mMogoMapService = ( IMogoMapService ) ARouter.getInstance().build( MogoServicePaths.PATH_SERVICES_MAP ).navigation( getContext() );
registerUnWakeupCmd();
IMogoNavi mogoNavi = mMogoMapService.getNavi( getContext() );
mogoNavi.setCalculatePathDisplayBounds( new Rect(
ResourcesHelper.getDimensionPixelSize( getContext(), R.dimen.dp_730 ) + WindowUtils.dip2px( getContext(), 80 ),
ResourcesHelper.getDimensionPixelSize( getContext(), R.dimen.dp_120 ) + WindowUtils.dip2px( getContext(), 80 ),
WindowUtils.dip2px( getContext(), 80 ),
WindowUtils.dip2px( getContext(), 80 )
) );
}
private void registerUnWakeupCmd() {
@@ -157,7 +168,7 @@ public class MapPresenter extends Presenter< MapView > implements IMogoVoiceList
mView.getUIController().changeMapMode( EnumMapUI.Type_Night );
} else if ( action == 1 ) {
mView.getUIController().changeMapMode( EnumMapUI.Type_Light );
} else if( action == 2){
} else if ( action == 2 ) {
mView.getUIController().changeMapMode( EnumMapUI.Type_AUTO_LIGHT_Night );
}
break;