bugfix
This commit is contained in:
@@ -6,11 +6,9 @@ import android.widget.FrameLayout;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.module.common.map.CustomNaviInterrupter;
|
||||
import com.mogo.module.main.MainActivity;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
|
||||
/**
|
||||
* 针对独立应用形式,做单独定制
|
||||
@@ -18,6 +16,7 @@ import com.mogo.service.MogoServicePaths;
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class MainIndependentActivity extends MainActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate( @Nullable Bundle savedInstanceState ) {
|
||||
super.onCreate( savedInstanceState );
|
||||
@@ -31,7 +30,7 @@ public class MainIndependentActivity extends MainActivity {
|
||||
FrameLayout.LayoutParams entranceParams = ( ( FrameLayout.LayoutParams ) mEntrance.getLayoutParams() );
|
||||
entranceParams.leftMargin = getResources().getDimensionPixelSize( R.dimen.module_main_entrance_fragment_container_marginLeft );
|
||||
mEntrance.setLayoutParams( entranceParams );
|
||||
mLeftShadowFrame.setVisibility(View.VISIBLE);
|
||||
mLeftShadowFrame.setVisibility( View.VISIBLE );
|
||||
mApps.setVisibility( View.GONE );
|
||||
}
|
||||
|
||||
@@ -48,4 +47,17 @@ public class MainIndependentActivity extends MainActivity {
|
||||
super.onPause();
|
||||
mServiceApis.getAdasControllerApi().setUseAlgorithm( false );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean doWhenBackPressed() {
|
||||
return exitCustomNaviIfNecessary();
|
||||
}
|
||||
|
||||
private boolean exitCustomNaviIfNecessary() {
|
||||
if ( CustomNaviInterrupter.getInstance().interrupt() ) {
|
||||
return false;
|
||||
}
|
||||
mServiceApis.getMapServiceApi().getNavi( this ).stopNavi();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user