2.0.3导航需求
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
package com.mogo.module.extensions.entrance;
|
package com.mogo.module.extensions.entrance;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -46,6 +48,7 @@ import com.mogo.service.MogoServicePaths;
|
|||||||
import com.mogo.service.analytics.IMogoAnalytics;
|
import com.mogo.service.analytics.IMogoAnalytics;
|
||||||
import com.mogo.service.fragmentmanager.FragmentDescriptor;
|
import com.mogo.service.fragmentmanager.FragmentDescriptor;
|
||||||
import com.mogo.service.fragmentmanager.IMogoFragmentManager;
|
import com.mogo.service.fragmentmanager.IMogoFragmentManager;
|
||||||
|
import com.mogo.service.intent.IMogoIntentListener;
|
||||||
import com.mogo.service.map.IMogoMapService;
|
import com.mogo.service.map.IMogoMapService;
|
||||||
import com.mogo.service.module.IMogoAddressManager;
|
import com.mogo.service.module.IMogoAddressManager;
|
||||||
import com.mogo.service.module.IMogoModuleProvider;
|
import com.mogo.service.module.IMogoModuleProvider;
|
||||||
@@ -215,8 +218,29 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
|||||||
mSpeedLimit = findViewById( R.id.module_entrance_id_speed_limit_container );
|
mSpeedLimit = findViewById( R.id.module_entrance_id_speed_limit_container );
|
||||||
mSpeedLimitValue = findViewById( R.id.module_entrance_id_speed_limit_value );
|
mSpeedLimitValue = findViewById( R.id.module_entrance_id_speed_limit_value );
|
||||||
mSpeedLimitUnit = findViewById( R.id.module_entrance_id_speed_limit_unit );
|
mSpeedLimitUnit = findViewById( R.id.module_entrance_id_speed_limit_unit );
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
mApis.getIntentManagerApi().registerIntentListener(AUTONAVI_STANDARD_BROADCAST_RECV, new IMogoIntentListener() {
|
||||||
|
@Override public void onIntentReceived(String intentStr, Intent intent) {
|
||||||
|
int key_type = intent.getIntExtra("KEY_TYPE", 0);
|
||||||
|
|
||||||
|
int type = intent.getIntExtra("EXTRA_TYPE", -1);
|
||||||
|
int opera_type = intent.getIntExtra("EXTRA_OPERA", -1);
|
||||||
|
if (key_type == 10027) {
|
||||||
|
if (opera_type == 0) {
|
||||||
|
ivMode.setSelected(false);
|
||||||
|
} else if (opera_type == 1) {
|
||||||
|
ivMode.setSelected(true);
|
||||||
|
}
|
||||||
|
ivMode.setText(
|
||||||
|
getString( ivMode.isSelected() ? R.string.mode_car_up : R.string.mode_north_up ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
private static final String AUTONAVI_STANDARD_BROADCAST_RECV =
|
||||||
|
"AUTONAVI_STANDARD_BROADCAST_RECV";
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
protected EntrancePresenter createPresenter() {
|
protected EntrancePresenter createPresenter() {
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import com.mogo.commons.mvp.MvpFragment;
|
|||||||
import com.mogo.map.IMogoMap;
|
import com.mogo.map.IMogoMap;
|
||||||
import com.mogo.map.IMogoUiSettings;
|
import com.mogo.map.IMogoUiSettings;
|
||||||
import com.mogo.map.MogoMapView;
|
import com.mogo.map.MogoMapView;
|
||||||
|
import com.mogo.map.uicontroller.EnumMapUI;
|
||||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||||
import com.mogo.service.MogoServicePaths;
|
import com.mogo.service.MogoServicePaths;
|
||||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||||
@@ -122,6 +123,7 @@ public class MapFragment extends MvpFragment< MapView, MapPresenter > implements
|
|||||||
uiSettings.setZoomControlsEnabled( false );
|
uiSettings.setZoomControlsEnabled( false );
|
||||||
//设置双指缩放手势是否可用。
|
//设置双指缩放手势是否可用。
|
||||||
uiSettings.setZoomGesturesEnabled( true );
|
uiSettings.setZoomGesturesEnabled( true );
|
||||||
|
mMogoMap.getUIController().changeMapMode(EnumMapUI.NorthUP_2D);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,6 +79,8 @@ public class MapPresenter extends Presenter<MapView> implements
|
|||||||
mMogoMapService.getMapUIController().recoverLockMode();//缩放地图会导致锁车发生改变,这里强制锁车
|
mMogoMapService.getMapUIController().recoverLockMode();//缩放地图会导致锁车发生改变,这里强制锁车
|
||||||
}, 1_000 );
|
}, 1_000 );
|
||||||
} else if (type == 2) {
|
} else if (type == 2) {
|
||||||
|
|
||||||
|
mMogoIntentManager.invoke(AUTONAVI_STANDARD_BROADCAST_RECV,intent);
|
||||||
if (opera_type == 0) {
|
if (opera_type == 0) {
|
||||||
mView.getUIController().changeMapMode(EnumMapUI.CarUp_2D);
|
mView.getUIController().changeMapMode(EnumMapUI.CarUp_2D);
|
||||||
} else if (opera_type == 1) {
|
} else if (opera_type == 1) {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user