Merge remote-tracking branch 'origin/feature/v1.0.2' into feature/v1.0.2
2
.idea/misc.xml
generated
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -9,7 +9,7 @@ android {
|
||||
minSdkVersion rootProject.ext.android.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
||||
versionCode rootProject.ext.android.versionCode
|
||||
versionName "${rootProject.ext.android.versionName}_${getCurrentDate()}_${getGitCommit()}"
|
||||
versionName "${rootProject.ext.android.versionName}"
|
||||
applicationId rootProject.ext.android.applicationId
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
@@ -21,10 +21,10 @@ android {
|
||||
|
||||
multiDexEnabled true
|
||||
externalNativeBuild {
|
||||
ndk {
|
||||
// 设置支持的SO库架构
|
||||
abiFilters 'armeabi-v7a'
|
||||
}
|
||||
// ndk {
|
||||
// // 设置支持的SO库架构
|
||||
// abiFilters 'armeabi-v7a'
|
||||
// }
|
||||
}
|
||||
}
|
||||
signingConfigs {
|
||||
@@ -99,7 +99,9 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.carcallprovider
|
||||
implementation rootProject.ext.dependencies.carcall
|
||||
implementation rootProject.ext.dependencies.modulemedia
|
||||
implementation rootProject.ext.dependencies.modulefreshnews
|
||||
implementation rootProject.ext.dependencies.modulefreshnews,{
|
||||
exclude group:'com.mogo.module',module:'module-onlinecar'
|
||||
}
|
||||
|
||||
implementation rootProject.ext.dependencies.modulepush,{
|
||||
exclude group:'com.mogo.module',module:'module-common'
|
||||
@@ -163,3 +165,4 @@ def getGitCommit() {
|
||||
assert !gitCommit.isEmpty()
|
||||
gitCommit
|
||||
}
|
||||
|
||||
|
||||
@@ -128,6 +128,5 @@ ext {
|
||||
videoarm64 : "com.shuyu:gsyVideoPlayer-arm64:7.1.2",
|
||||
videojava : "com.shuyu:gsyVideoPlayer-java:7.1.2",
|
||||
eventbus : "org.greenrobot:eventbus:3.1.1",
|
||||
|
||||
]
|
||||
}
|
||||
0
foudations/build/jrebel/project-cleaned.marker
Normal file
@@ -42,6 +42,7 @@ public class AIAssist implements VoiceClient.VoiceCmdCallBack {
|
||||
}
|
||||
|
||||
public synchronized void release() {
|
||||
Logger.d( TAG, "release" );
|
||||
if ( mCmdMap != null && !mCmdMap.isEmpty() && mVoiceClient != null ) {
|
||||
for ( String cmd : mCmdMap.keySet() ) {
|
||||
mVoiceClient.unRegisterCustomWakeupCmd( cmd );
|
||||
@@ -235,10 +236,9 @@ public class AIAssist implements VoiceClient.VoiceCmdCallBack {
|
||||
if ( mHasFlush ) {
|
||||
mVoiceClient.registerCustomWakeupCmd( cmd, cmdWords );
|
||||
mCacheUnWakeupCommands.remove( cmd );
|
||||
} else {
|
||||
Logger.i( TAG, "cache un wakeup command2. %s", cmd );
|
||||
mCacheUnWakeupCommands.put( cmd, cmdWords );
|
||||
}
|
||||
Logger.i( TAG, "cache un wakeup command2. %s", cmd );
|
||||
mCacheUnWakeupCommands.put( cmd, cmdWords );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -251,10 +251,9 @@ public class AIAssist implements VoiceClient.VoiceCmdCallBack {
|
||||
if ( mHasFlush ) {
|
||||
mVoiceClient.registerCustomWakeupCmd( cmd, cmdWords );
|
||||
mCacheUnWakeupCommands.remove( cmd );
|
||||
} else {
|
||||
Logger.i( TAG, "cache un wakeup command. %s", cmd );
|
||||
mCacheUnWakeupCommands.put( cmd, cmdWords );
|
||||
}
|
||||
Logger.i( TAG, "cache un wakeup command. %s", cmd );
|
||||
mCacheUnWakeupCommands.put( cmd, cmdWords );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -287,12 +286,14 @@ public class AIAssist implements VoiceClient.VoiceCmdCallBack {
|
||||
* @param cmd
|
||||
*/
|
||||
public synchronized void unregisterUnWakeupCommand( String cmd, IMogoVoiceCmdCallBack callBack ) {
|
||||
mCacheUnWakeupCommands.remove( cmd );
|
||||
if ( mCmdMap.containsKey( cmd ) ) {
|
||||
List< IMogoVoiceCmdCallBack > callBacks = mCmdMap.get( cmd );
|
||||
if ( callBacks != null ) {
|
||||
callBacks.remove( callBack );
|
||||
}
|
||||
if ( callBacks.isEmpty() ) {
|
||||
mCacheUnWakeupCommands.remove( cmd );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -314,7 +315,6 @@ public class AIAssist implements VoiceClient.VoiceCmdCallBack {
|
||||
for ( String cmd : mCacheUnWakeupCommands.keySet() ) {
|
||||
registerUnWakeupCommand( cmd, mCacheUnWakeupCommands.get( cmd ) );
|
||||
}
|
||||
mCacheUnWakeupCommands.clear();
|
||||
}
|
||||
|
||||
private boolean isVoiceServiceReady( Context context ) {
|
||||
|
||||
@@ -50,10 +50,10 @@ MOGO_MODULE_BACK_VERSION=1.0.2-SNAPSHOT
|
||||
# 探路
|
||||
MOGO_MODULE_TANLU_VERSION=1.0.2-SNAPSHOT
|
||||
# 车聊聊
|
||||
CARCHATTING_VERSION=1.0.2-SNAPSHOT
|
||||
CARCHATTING_VERSION=1.0.2.2-SNAPSHOT
|
||||
# 车聊聊接口
|
||||
CARCHATTINGPROVIDER_VERSION=1.0.2-SNAPSHOT
|
||||
# 在线车辆
|
||||
CARCHATTINGPROVIDER_VERSION=1.0.2.2-SNAPSHOT
|
||||
# 在线车辆F
|
||||
MOGO_MODULE_ONLINECAR_VERSION=1.0.1-SNAPSHOT
|
||||
# v2x
|
||||
MOGO_MODULE_V2X_VERSION=1.0.2-SNAPSHOT
|
||||
@@ -63,5 +63,5 @@ MOGO_MODULE_MEDIA_VERSION=1.0.1-SNAPSHOT
|
||||
MOGO_MODULE_PUSH_VERSION=1.0.0-SNAPSHOT
|
||||
# 广告资源位
|
||||
MOGO_MODULE_AD_CARD_VERSION=1.0.0-SNAPSHOT
|
||||
# 新鲜水
|
||||
# 新鲜事
|
||||
MOGO_MODULE_FRESH_NEWS_VERSION=1.0.2-SNAPSHOT
|
||||
0
libraries/build/jrebel/project-cleaned.marker
Normal file
@@ -20,6 +20,11 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility 1.8
|
||||
targetCompatibility 1.8
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -82,7 +82,7 @@ public class AMapNaviViewWrapper implements IMogoMapView,
|
||||
this.mMapView = mapView;
|
||||
this.mIMap = new AMapWrapper( mMapView.getMap(), mMapView, this );
|
||||
try {
|
||||
new BnHooker( mMapView.getMap() );
|
||||
new BnHooker( mMapView.getMap(), mapView.getContext() );
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
package com.mogo.map.impl.amap.hook;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.amap.api.maps.AMap;
|
||||
import com.autonavi.amap.mapcore.interfaces.IAMap;
|
||||
import com.autonavi.base.amap.api.mapcore.IAMapDelegate;
|
||||
import com.autonavi.base.amap.mapcore.interfaces.IAMapListener;
|
||||
import com.mogo.map.impl.amap.navi.NaviClient;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
@@ -20,11 +23,13 @@ import java.lang.reflect.Proxy;
|
||||
public class BnHooker implements InvocationHandler {
|
||||
|
||||
private static final String TAG = "BnHooker";
|
||||
private final Context mContext;
|
||||
|
||||
private Object host;
|
||||
|
||||
public BnHooker( AMap map ) throws Exception {
|
||||
public BnHooker( AMap map, Context context ) throws Exception {
|
||||
|
||||
mContext = context;
|
||||
|
||||
if ( map == null ) {
|
||||
return;
|
||||
@@ -48,7 +53,9 @@ public class BnHooker implements InvocationHandler {
|
||||
@Override
|
||||
public Object invoke( Object proxy, Method method, Object[] args ) throws Throwable {
|
||||
if ( method.getName().equals( "setRenderFps" ) ) {
|
||||
return method.invoke( host, 10 );
|
||||
if ( !NaviClient.getInstance( mContext ).isNaviing() ) {
|
||||
return method.invoke( host, 10 );
|
||||
}
|
||||
}
|
||||
if ( method.getName().equals( "drawFrame" ) ) {
|
||||
Logger.d( TAG, "drawFrame" );
|
||||
|
||||
@@ -50,7 +50,7 @@ public class NaviClient implements IMogoNavi {
|
||||
|
||||
private NaviClient( Context context ) {
|
||||
mAMapNavi = AMapNavi.getInstance( context );
|
||||
//mAMapNavi.setEmulatorNaviSpeed( 120 );
|
||||
mAMapNavi.setEmulatorNaviSpeed( 120 );
|
||||
mAMapNavi.setUseInnerVoice( true );
|
||||
mAMapNaviListener = new NaviListenerAdapter( context, mAMapNavi, this );
|
||||
mAimlessModeListener = new AimlessModeListenerAdapter() {
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.mogo.map.navi.MogoCalculatePath;
|
||||
import com.mogo.map.navi.MogoNaviListenerHandler;
|
||||
import com.mogo.map.navi.MogoTraffic;
|
||||
import com.mogo.map.navi.OnCalculatePathItemClickInteraction;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import java.util.List;
|
||||
@@ -91,7 +92,7 @@ public class NaviListenerAdapter extends AMapNaviListenerAdapter {
|
||||
@Override
|
||||
public void onInitNaviSuccess() {
|
||||
MogoNaviListenerHandler.getInstance().onInitNaviSuccess();
|
||||
mAMapNavi.startAimlessMode(AimLessMode.CAMERA_AND_SPECIALROAD_DETECTED);
|
||||
mAMapNavi.startAimlessMode( AimLessMode.CAMERA_AND_SPECIALROAD_DETECTED );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -168,12 +169,21 @@ public class NaviListenerAdapter extends AMapNaviListenerAdapter {
|
||||
|
||||
@Override
|
||||
public void onEndEmulatorNavi() {
|
||||
stopNavi();
|
||||
stopNaviDelay();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArriveDestination() {
|
||||
stopNavi();
|
||||
stopNaviDelay();
|
||||
}
|
||||
|
||||
/**
|
||||
* 避免导航结束语音播报被立刻打断的情况
|
||||
*/
|
||||
private void stopNaviDelay() {
|
||||
UiThreadHandler.postDelayed( () -> {
|
||||
stopNavi();
|
||||
}, 5_000L );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -236,7 +246,7 @@ public class NaviListenerAdapter extends AMapNaviListenerAdapter {
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<MogoLatLng> getCalculatedPathPos() {
|
||||
public List< MogoLatLng > getCalculatedPathPos() {
|
||||
if ( mNaviOverlayHelper != null ) {
|
||||
return mNaviOverlayHelper.getCalculatedPathPos();
|
||||
}
|
||||
@@ -244,8 +254,6 @@ public class NaviListenerAdapter extends AMapNaviListenerAdapter {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public OnCalculatePathItemClickInteraction getItemClickInteraction() {
|
||||
if ( mNaviOverlayHelper != null ) {
|
||||
return mNaviOverlayHelper.getItemClickInteraction();
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.amap.api.maps.model.LatLng;
|
||||
import com.amap.api.maps.model.LatLngBounds;
|
||||
import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.map.exception.MogoMapException;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -15,6 +16,8 @@ import java.util.List;
|
||||
*/
|
||||
public class MogoMapUtils {
|
||||
|
||||
private static final String TAG = "MogoMapUtils";
|
||||
|
||||
public static LatLngBounds getLatLngBounds( MogoLatLng carPosition, List< MogoLatLng > lonLats, boolean lockCarPosition ) throws Exception {
|
||||
|
||||
if ( lonLats == null || lonLats.isEmpty() ) {
|
||||
@@ -74,6 +77,21 @@ public class MogoMapUtils {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ( east < west ) {
|
||||
double tmp = east;
|
||||
east = west;
|
||||
west = tmp;
|
||||
}
|
||||
|
||||
if( north < south ){
|
||||
double tmp = north;
|
||||
north = south;
|
||||
south = tmp;
|
||||
}
|
||||
|
||||
|
||||
Logger.d( TAG, "west = %s, east = %s, north = %s, south = %s", west, east, north, south );
|
||||
|
||||
return new LatLngBounds.Builder().include( new LatLng( east, north ) ).include( new LatLng( west, south ) ).build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,5 +8,5 @@
|
||||
android:id="@+id/map_amap_id_cursor"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_1" />
|
||||
android:src="@drawable/map_api_ic_current_location2_cursor" />
|
||||
</LinearLayout>
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 125 KiB |
|
After Width: | Height: | Size: 126 KiB |
0
modules/build/jrebel/project-cleaned.marker
Normal file
@@ -32,7 +32,7 @@ public class AppsListActivity extends MvpActivity< AppsListView, AppsListPresent
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.module_apps_activiity_list;
|
||||
return R.layout.module_apps_activity_list;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -30,7 +30,7 @@ public class PagerIndicator extends LinearLayout implements PagerSlidingTabStrip
|
||||
|
||||
public PagerIndicator( Context context, @Nullable AttributeSet attrs, int defStyleAttr ) {
|
||||
super( context, attrs, defStyleAttr );
|
||||
LayoutInflater.from( context ).inflate( R.layout.modle_apps_page_indicator, this, true );
|
||||
LayoutInflater.from( context ).inflate( R.layout.module_apps_page_indicator, this, true );
|
||||
mIndicator = findViewById( R.id.module_apps_id_indicator_dot );
|
||||
}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 24 KiB |
@@ -20,9 +20,9 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/module_apps_id_apps"
|
||||
android:layout_width="@dimen/module_apps_navigation_icon_width"
|
||||
android:layout_width="@dimen/module_apps_all_icon_width"
|
||||
android:layout_marginTop="@dimen/apps_margin_top"
|
||||
android:layout_height="@dimen/module_apps_navigation_icon_height"
|
||||
android:layout_height="@dimen/module_apps_all_icon_height"
|
||||
app:layout_constraintLeft_toRightOf="@id/module_apps_id_scroller"
|
||||
app:layout_constraintTop_toTopOf="@id/module_apps_id_scroller"
|
||||
android:layout_marginLeft="@dimen/module_apps_navigation_icon_marginLeft"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
android:id="@+id/module_apps_id_app_icon"
|
||||
android:layout_width="@dimen/module_apps_navigation_icon_width"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/module_apps_ic_chat"
|
||||
android:layout_height="@dimen/module_apps_navigation_icon_height" />
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="module_apps_pager_marginTop">117px</dimen>
|
||||
<dimen name="module_apps_pager_marginTop">85px</dimen>
|
||||
<dimen name="module_apps_indicator_height">2.7px</dimen>
|
||||
<dimen name="module_apps_indicator_width">16px</dimen>
|
||||
<dimen name="module_apps_indicator_interval">2.3px</dimen>
|
||||
<dimen name="module_apps_indicator_marginBottom">54.9px</dimen>
|
||||
<dimen name="module_apps_navigation_icon_width">50px</dimen>
|
||||
<dimen name="module_apps_navigation_icon_height">50px</dimen>
|
||||
<dimen name="module_apps_navigation_icon_width">96px</dimen>
|
||||
<dimen name="module_apps_navigation_icon_height">@dimen/module_apps_navigation_icon_width</dimen>
|
||||
<dimen name="module_apps_navigation_icon_marginLeft">22px</dimen>
|
||||
<dimen name="module_apps_navigation_icon_paddingBottom">33px</dimen>
|
||||
<dimen name="module_apps_app_name_marginTop">24px</dimen>
|
||||
<dimen name="module_apps_app_name_textSize">18px</dimen>
|
||||
<dimen name="module_apps_page_paddingLeft">112px</dimen>
|
||||
<dimen name="module_apps_page_paddingRight">112px</dimen>
|
||||
<dimen name="module_apps_app_name_textSize">20px</dimen>
|
||||
<dimen name="module_apps_page_paddingLeft">96px</dimen>
|
||||
<dimen name="module_apps_page_paddingRight">96px</dimen>
|
||||
<dimen name="apps_id_scroller_width">279px</dimen>
|
||||
<dimen name="module_apps_page_item_verticalSpacing">89px</dimen>
|
||||
<dimen name="module_apps_page_item_verticalSpacing">88px</dimen>
|
||||
<dimen name="module_apps_navigation_icon_container_height">95px</dimen>
|
||||
<dimen name="apps_margin_top">9.5px</dimen>
|
||||
<dimen name="apps_margin_left">18px</dimen>
|
||||
|
||||
<dimen name="module_apps_all_icon_width">50px</dimen>
|
||||
<dimen name="module_apps_all_icon_height">50px</dimen>
|
||||
</resources>
|
||||
@@ -1,17 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="module_apps_pager_marginTop">260px</dimen>
|
||||
<dimen name="module_apps_pager_marginTop">160px</dimen>
|
||||
<dimen name="module_apps_indicator_height">5px</dimen>
|
||||
<dimen name="module_apps_indicator_width">30px</dimen>
|
||||
<dimen name="module_apps_indicator_interval">4px</dimen>
|
||||
<dimen name="module_apps_indicator_marginBottom">103px</dimen>
|
||||
<dimen name="module_apps_navigation_icon_width">94px</dimen>
|
||||
<dimen name="module_apps_navigation_icon_height">94px</dimen>
|
||||
<dimen name="module_apps_navigation_icon_width">180px</dimen>
|
||||
<dimen name="module_apps_navigation_icon_height">@dimen/module_apps_navigation_icon_width</dimen>
|
||||
<dimen name="module_apps_navigation_icon_marginLeft">43px</dimen>
|
||||
<dimen name="module_apps_navigation_icon_paddingBottom">60px</dimen>
|
||||
<dimen name="module_apps_app_name_marginTop">32px</dimen>
|
||||
<dimen name="module_apps_app_name_textSize">32px</dimen>
|
||||
<dimen name="module_apps_page_paddingLeft">220px</dimen>
|
||||
<dimen name="module_apps_page_paddingRight">220px</dimen>
|
||||
<dimen name="module_apps_page_item_verticalSpacing">154px</dimen>
|
||||
<dimen name="module_apps_app_name_textSize">37.5px</dimen>
|
||||
<dimen name="module_apps_page_paddingLeft">180px</dimen>
|
||||
<dimen name="module_apps_page_paddingRight">180px</dimen>
|
||||
<dimen name="module_apps_page_item_verticalSpacing">136px</dimen>
|
||||
<dimen name="module_apps_navigation_icon_container_height">174px</dimen>
|
||||
<dimen name="apps_id_scroller_width">523px</dimen>
|
||||
<dimen name="apps_margin_top">18px</dimen>
|
||||
<dimen name="apps_margin_left">35px</dimen>
|
||||
<dimen name="module_apps_all_icon_width">94px</dimen>
|
||||
<dimen name="module_apps_all_icon_height">94px</dimen>
|
||||
</resources>
|
||||
@@ -1,21 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="module_apps_pager_marginTop">260px</dimen>
|
||||
<dimen name="module_apps_pager_marginTop">160px</dimen>
|
||||
<dimen name="module_apps_indicator_height">5px</dimen>
|
||||
<dimen name="module_apps_indicator_width">30px</dimen>
|
||||
<dimen name="module_apps_indicator_interval">2.3px</dimen>
|
||||
<dimen name="module_apps_indicator_marginBottom">103px</dimen>
|
||||
<dimen name="module_apps_navigation_icon_width">120px</dimen>
|
||||
<dimen name="module_apps_navigation_icon_height">120px</dimen>
|
||||
<dimen name="module_apps_navigation_icon_width">180px</dimen>
|
||||
<dimen name="module_apps_navigation_icon_height">@dimen/module_apps_navigation_icon_width</dimen>
|
||||
<dimen name="module_apps_navigation_icon_marginLeft">60px</dimen>
|
||||
<dimen name="module_apps_navigation_icon_paddingBottom">60px</dimen>
|
||||
<dimen name="module_apps_app_name_marginTop">32px</dimen>
|
||||
<dimen name="module_apps_app_name_textSize">32px</dimen>
|
||||
<dimen name="module_apps_page_paddingLeft">220px</dimen>
|
||||
<dimen name="module_apps_page_paddingRight">220px</dimen>
|
||||
<dimen name="module_apps_page_item_verticalSpacing">154px</dimen>
|
||||
<dimen name="module_apps_navigation_icon_container_height">174px</dimen>
|
||||
<dimen name="module_apps_app_name_textSize">37.5px</dimen>
|
||||
<dimen name="module_apps_page_paddingLeft">180px</dimen>
|
||||
<dimen name="module_apps_page_paddingRight">180px</dimen>
|
||||
<dimen name="module_apps_page_item_verticalSpacing">136px</dimen>
|
||||
<dimen name="module_apps_navigation_icon_container_height">174px</dimen>
|
||||
<dimen name="apps_id_scroller_width">523px</dimen>
|
||||
<dimen name="apps_margin_top">18px</dimen>
|
||||
<dimen name="apps_margin_left">37px</dimen>
|
||||
<dimen name="module_apps_all_icon_width">120px</dimen>
|
||||
<dimen name="module_apps_all_icon_height">120px</dimen>
|
||||
</resources>
|
||||
|
After Width: | Height: | Size: 6.8 KiB |
@@ -18,8 +18,10 @@ import com.mogo.map.location.IMogoLocationClient;
|
||||
import com.mogo.map.location.MogoLocation;
|
||||
import com.mogo.map.marker.IMogoMarkerManager;
|
||||
import com.mogo.map.model.MogoPoi;
|
||||
import com.mogo.map.navi.IMogoAimlessModeListener;
|
||||
import com.mogo.map.navi.IMogoNavi;
|
||||
import com.mogo.map.navi.IMogoNaviListener;
|
||||
import com.mogo.map.navi.MogoCongestionInfo;
|
||||
import com.mogo.map.navi.MogoNaviInfo;
|
||||
import com.mogo.map.navi.MogoTraffic;
|
||||
import com.mogo.map.overlay.IMogoPolyline;
|
||||
@@ -57,7 +59,9 @@ import java.util.Map;
|
||||
*/
|
||||
public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresenter >
|
||||
implements EntranceView,
|
||||
IMogoNaviListener, IMogoMapListener {
|
||||
IMogoNaviListener,
|
||||
IMogoMapListener,
|
||||
IMogoAimlessModeListener {
|
||||
|
||||
private static final String TAG = "EntranceFragment";
|
||||
|
||||
@@ -214,6 +218,7 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
|
||||
mMogoRegisterCenter.registerMogoNaviListener( ExtensionsModuleConst.TYPE_ENTRANCE, this );
|
||||
mMogoRegisterCenter.registerMogoMapListener( ExtensionsModuleConst.TYPE_ENTRANCE, this );
|
||||
mMogoRegisterCenter.registerMogoAimlessModeListener( TAG, this );
|
||||
|
||||
mMogoMarkerManager = mService.getMarkerManager( getContext() );
|
||||
}
|
||||
@@ -265,6 +270,10 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
|
||||
@Override
|
||||
public void onUpdateTraffic( MogoTraffic traffic ) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdateTraffic2( MogoTraffic traffic ) {
|
||||
if ( traffic == null ) {
|
||||
return;
|
||||
}
|
||||
@@ -277,6 +286,11 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdateCongestion( MogoCongestionInfo info ) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMapLoaded() {
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
android:stateNotNeeded="true"
|
||||
android:taskAffinity=""
|
||||
android:theme="@style/Main"
|
||||
android:windowSoftInputMode="adjustPan">
|
||||
android:windowSoftInputMode="adjustPan|stateHidden">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<!--调试用,暂时开启LAUNCHER这个属性-->
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.mogo.module.common.MogoModule;
|
||||
import com.mogo.module.common.MogoModulePaths;
|
||||
import com.mogo.module.main.assist.MapBroadCastHelper;
|
||||
import com.mogo.module.main.cards.CardModulesAdapter;
|
||||
import com.mogo.module.main.cards.HorizentalStackTransformer;
|
||||
import com.mogo.module.main.cards.MogoModulesHandler;
|
||||
import com.mogo.module.main.cards.MogoModulesManager;
|
||||
import com.mogo.module.main.cards.OnPageChangeListenerAdapter;
|
||||
@@ -42,6 +43,7 @@ import com.mogo.service.intent.IMogoIntentManager;
|
||||
import com.mogo.service.map.IMogoMapService;
|
||||
import com.mogo.service.module.IMogoModuleProvider;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import org.json.JSONException;
|
||||
@@ -56,8 +58,8 @@ import java.util.List;
|
||||
* 描述:加载各个模块
|
||||
*/
|
||||
public class MainActivity extends MvpActivity< MainView, MainPresenter > implements MainView,
|
||||
IMogoLocationListener,
|
||||
IMogoMarkerClickListener{
|
||||
IMogoLocationListener,
|
||||
IMogoMarkerClickListener {
|
||||
|
||||
private static final String TAG = "MainActivity";
|
||||
|
||||
@@ -70,7 +72,7 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
private IMogoStatusManager mMogoStatusManager;
|
||||
|
||||
private OrientedViewPager mCardsContainer;
|
||||
//private VerticalStackTransformer mTransformer;
|
||||
private HorizentalStackTransformer mTransformer;
|
||||
private CardModulesAdapter mCardModulesAdapter;
|
||||
|
||||
private View mHeader;
|
||||
@@ -102,7 +104,7 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
protected void initViews() {
|
||||
mCardsContainer = findViewById( R.id.module_main_id_cards_container );
|
||||
mCardsContainer.setOrientation( OrientedViewPager.Orientation.HORIZONTAL );
|
||||
//mTransformer = new VerticalStackTransformer( this );
|
||||
mTransformer = new HorizentalStackTransformer( this );
|
||||
mCardsContainer.setOnPageChangeListener( mOnPageChangeListener = new OnPageChangeListenerAdapter() {
|
||||
private boolean mIsLast = true;
|
||||
private boolean mCardFlipStatus = false;
|
||||
@@ -139,7 +141,7 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
}
|
||||
} else if ( state == ViewPager.SCROLL_STATE_IDLE ) {
|
||||
mCardFlipStatus = false;
|
||||
//mTransformer.resetOffsetScroll();
|
||||
mTransformer.resetOffsetScroll();
|
||||
}
|
||||
|
||||
int cardSize = mCardModulesAdapter.getCount();
|
||||
@@ -164,7 +166,7 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
int positionOffsetPixels ) {
|
||||
super.onPageScrolled( position, positionOffset, positionOffsetPixels );
|
||||
Logger.d( TAG, "pageScrolled : offset --- " + positionOffset );
|
||||
//mTransformer.offsetScrollChanged( positionOffset );
|
||||
mTransformer.offsetScrollChanged( positionOffset );
|
||||
}
|
||||
} );
|
||||
|
||||
@@ -215,7 +217,7 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
mPresenter.postLoadModuleMsg();
|
||||
}
|
||||
|
||||
private void init(){
|
||||
private void init() {
|
||||
mServiceApis = ( IMogoServiceApis ) ARouter.getInstance().build( MogoServicePaths.PATH_SERVICE_APIS ).navigation();
|
||||
mMogoStatusManager = mServiceApis.getStatusManagerApi();
|
||||
}
|
||||
@@ -265,6 +267,12 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
if ( size == 0 ) {
|
||||
showLayout();
|
||||
} else if ( size == 1 ) {
|
||||
UiThreadHandler.postDelayed(new Runnable() {
|
||||
@Override public void run() {
|
||||
mMogoMapUIController.setPointToCenter(0.5,0.5);
|
||||
|
||||
}
|
||||
},1000);
|
||||
hideLayout();
|
||||
}
|
||||
} );
|
||||
@@ -290,13 +298,13 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
// 默认触发第一个卡片
|
||||
mOnPageChangeListener.onPageSelected( 0 );
|
||||
}
|
||||
mCardCoverUpBottomLayout.setVisibility( View.VISIBLE );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hideCoverUpLayout() {
|
||||
mCoverUpLayout.setVisibility( View.GONE );
|
||||
mCardsBkg.setVisibility( View.VISIBLE );
|
||||
mCardCoverUpBottomLayout.setVisibility( View.VISIBLE );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -305,7 +313,7 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
List< IMogoModuleProvider > providers = mMogoModuleHandler.loadCardsModule();
|
||||
mCardModulesAdapter = new CardModulesAdapter( this, providers );
|
||||
mCardsContainer.setOffscreenPageLimit( providers.size() );
|
||||
//mCardsContainer.setPageTransformer( true, mTransformer );
|
||||
mCardsContainer.setPageTransformer( true, mTransformer );
|
||||
mCardsContainer.setAdapter( mCardModulesAdapter );
|
||||
}
|
||||
|
||||
|
||||
@@ -2,14 +2,18 @@ package com.mogo.module.main.assist;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import com.mogo.map.navi.MogoNaviInfo;
|
||||
import com.mogo.module.service.receiver.MogoReceiver;
|
||||
import com.mogo.service.impl.intent.IntentManager;
|
||||
import com.mogo.service.intent.IMogoIntentListener;
|
||||
|
||||
/**
|
||||
* @author zyz
|
||||
* 2020-01-17.
|
||||
*/
|
||||
public class MapBroadCastHelper {
|
||||
public class MapBroadCastHelper implements IMogoIntentListener {
|
||||
|
||||
private static volatile MapBroadCastHelper sInstance;
|
||||
private static final String ACTION_NAV_SEND = "AUTONAVI_STANDARD_BROADCAST_SEND";
|
||||
@@ -21,6 +25,8 @@ public class MapBroadCastHelper {
|
||||
|
||||
private MapBroadCastHelper(Context context) {
|
||||
this.context = context;
|
||||
|
||||
IntentManager.getInstance().registerIntentListener(MogoReceiver.ACTION_VOICE_READY,this);
|
||||
}
|
||||
|
||||
public static MapBroadCastHelper getInstance( Context context ) {
|
||||
@@ -71,6 +77,9 @@ public class MapBroadCastHelper {
|
||||
notifyXizhiNavStatus(STATUS_NAV_STOP);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override public void onIntentReceived(String intentStr, Intent intent) {
|
||||
if (TextUtils.equals(intentStr, MogoReceiver.ACTION_VOICE_READY)) {
|
||||
mapFrount();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
|
||||
package com.mogo.module.main.cards;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
/**
|
||||
* Created by Nate on 2016/7/22.
|
||||
*/
|
||||
public abstract class HorizentalBaseTransformer implements ViewPager.PageTransformer {
|
||||
/**
|
||||
* Called each {@link #transformPage(View, float)}.
|
||||
*
|
||||
* @param page Apply the transformation to this page
|
||||
* @param position Position of page relative to the current front-and-center position of the pager. 0 is front and
|
||||
* center. 1 is one full page position to the right, and -1 is one page position to the left.
|
||||
*/
|
||||
protected abstract void onTransform(View page, float position);
|
||||
|
||||
/**
|
||||
* Apply a property transformation to the given page. For most use cases, this method should not be overridden.
|
||||
* Instead use {@link #transformPage(View, float)} to perform typical transformations.
|
||||
*
|
||||
* @param page Apply the transformation to this page
|
||||
* @param position Position of page relative to the current front-and-center position of the pager. 0 is front and
|
||||
* center. 1 is one full page position to the right, and -1 is one page position to the left.
|
||||
*/
|
||||
@Override
|
||||
public void transformPage(View page, float position) {
|
||||
onPreTransform(page, position);
|
||||
onTransform(page, position);
|
||||
onPostTransform(page, position);
|
||||
}
|
||||
|
||||
/**
|
||||
* If the position offset of a fragment is less than negative one or greater than one, returning true will set the
|
||||
* fragment alpha to 0f. Otherwise fragment alpha is always defaulted to 1f.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
protected boolean hideOffscreenPages() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if the default animations of the view pager should be used.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
protected boolean isPagingEnabled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called each {@link #transformPage(View, float)} before {{@link #onTransform(View, float)}.
|
||||
* <p/>
|
||||
* The default implementation attempts to reset all view properties. This is useful when toggling transforms that do
|
||||
* not modify the same page properties. For instance changing from a transformation that applies rotation to a
|
||||
* transformation that fades can inadvertently leave a fragment stuck with a rotation or with some degree of applied
|
||||
* alpha.
|
||||
*
|
||||
* @param page Apply the transformation to this page
|
||||
* @param position Position of page relative to the current front-and-center position of the pager. 0 is front and
|
||||
* center. 1 is one full page position to the right, and -1 is one page position to the left.
|
||||
*/
|
||||
protected void onPreTransform(View page, float position) {
|
||||
final float width = page.getWidth();
|
||||
//final float height = page.getHeight();
|
||||
|
||||
page.setRotationX(0);
|
||||
page.setRotationY(0);
|
||||
page.setRotation(0);
|
||||
page.setScaleX(1);
|
||||
page.setScaleY(1);
|
||||
page.setPivotX(0);
|
||||
page.setPivotY(0);
|
||||
page.setTranslationY(0);
|
||||
page.setTranslationX(isPagingEnabled() ? 0f : -width * position);
|
||||
|
||||
if (hideOffscreenPages()) {
|
||||
page.setAlpha(position <= -1f || position >= 1f ? 0f : 1f);
|
||||
} else {
|
||||
page.setAlpha(1f);
|
||||
}
|
||||
|
||||
/*final float normalizedposition = Math.abs(Math.abs(position) - 1);
|
||||
page.setAlpha(normalizedposition);*/
|
||||
}
|
||||
|
||||
/**
|
||||
* Called each {@link #transformPage(View, float)} after {@link #onTransform(View, float)}.
|
||||
*
|
||||
* @param page Apply the transformation to this page
|
||||
* @param position Position of page relative to the current front-and-center position of the pager. 0 is front and
|
||||
* center. 1 is one full page position to the right, and -1 is one page position to the left.
|
||||
*/
|
||||
protected void onPostTransform(View page, float position) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Same as {@link Math#min(double, double)} without double casting, zero closest to infinity handling, or NaN support.
|
||||
*
|
||||
* @param val
|
||||
* @param min
|
||||
* @return
|
||||
*/
|
||||
protected static final float min(float val, float min) {
|
||||
return val < min ? min : val;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.mogo.module.main.cards;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import com.mogo.module.main.R;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
public class HorizentalStackTransformer extends HorizentalBaseTransformer {
|
||||
|
||||
private Context context;
|
||||
private int spaceBetweenFirAndSecWith;//第一张卡片和第二张卡片宽度差
|
||||
private int spaceBetweenFirAndSecHeight;//第一张卡片和第二张卡片高度差
|
||||
private float offsetScroll = 0.0f;//ViewPager滑动时变化幅度
|
||||
|
||||
public HorizentalStackTransformer( Context context ) {
|
||||
this.context = context;
|
||||
spaceBetweenFirAndSecHeight = 0;
|
||||
spaceBetweenFirAndSecWith = context.getResources().getDimensionPixelSize( R.dimen.module_main_card_card_shadow_width_div );
|
||||
}
|
||||
|
||||
public HorizentalStackTransformer( Context context, int spaceBetweenFirAndSecWith, int spaceBetweenFirAndSecHeight ) {
|
||||
this.context = context;
|
||||
this.spaceBetweenFirAndSecWith = spaceBetweenFirAndSecWith;
|
||||
this.spaceBetweenFirAndSecHeight = spaceBetweenFirAndSecHeight;
|
||||
}
|
||||
|
||||
public void offsetScrollChanged(float offset){
|
||||
if(offset ==0){
|
||||
return;
|
||||
}
|
||||
offsetScroll = offset;
|
||||
}
|
||||
|
||||
public void resetOffsetScroll(){
|
||||
offsetScroll = 0.0f;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onTransform( View page, float position ) {
|
||||
if ( position == 0.0f ) {
|
||||
page.setAlpha( 1.0f );
|
||||
page.setTranslationX( 0f );
|
||||
//控制停止滑动切换的时候,只有最上面的一张卡片可以点击
|
||||
page.setClickable( true );
|
||||
} else if(position>0){
|
||||
float scale = ( float ) ( page.getWidth() - spaceBetweenFirAndSecWith * position ) / ( float ) ( page.getWidth() );
|
||||
Logger.d("VerticalStackTransformer","scale :" + scale);
|
||||
//控制下面卡片的可见度
|
||||
page.setAlpha( 1.0f );
|
||||
//控制停止滑动切换的时候,只有最上面的一张卡片可以点击
|
||||
page.setClickable( false );
|
||||
page.setPivotX( page.getWidth() / 2f );
|
||||
page.setPivotY( page.getHeight() / 2f );
|
||||
page.setScaleX( scale );
|
||||
page.setScaleY( scale );
|
||||
page.setTranslationX( -page.getHeight() * position + ( page.getHeight() * 0.5f ) * ( 1 - scale ) + spaceBetweenFirAndSecHeight * position );
|
||||
}else{
|
||||
float currentPage;
|
||||
if(offsetScroll > 0.2f){
|
||||
currentPage = 0.2f;
|
||||
}else{
|
||||
currentPage = offsetScroll;
|
||||
}
|
||||
page.setAlpha( 1 );
|
||||
page.setScaleX(1-currentPage);
|
||||
page.setScaleY(1-currentPage);
|
||||
page.setPivotX( page.getWidth() / 2f );
|
||||
page.setPivotY( page.getHeight() / 2f );
|
||||
page.setTranslationX( 0f );
|
||||
page.setClickable( false );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
BIN
modules/mogo-module-main/src/main/res/drawable-xhdpi/module_apps_bg_card.png
Executable file → Normal file
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 68 KiB |
@@ -82,9 +82,14 @@ public class MapPresenter extends Presenter<MapView> implements
|
||||
mView.getUIController().changeMapMode(EnumMapUI.CarUp_2D);
|
||||
} else if (opera_type == 1) {
|
||||
mView.getUIController().changeMapMode(EnumMapUI.NorthUP_2D);
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice("已切换", null);
|
||||
|
||||
} else if (opera_type == 2) {
|
||||
mView.getUIController().changeMapMode(EnumMapUI.CarUp_3D);
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice("已切换", null);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
} else if (key_type == 10048) {
|
||||
//* @param type 0:自动; 1:白天; 2:黑夜
|
||||
@@ -111,11 +116,11 @@ public class MapPresenter extends Presenter<MapView> implements
|
||||
|
||||
int extra_is_show = intent.getIntExtra("EXTRA_IS_SHOW", 0);
|
||||
|
||||
if (extra_is_show == 0) {
|
||||
mView.getUIController().displayOverview();
|
||||
} else {
|
||||
mView.getUIController().recoverLockMode();
|
||||
}
|
||||
//if (extra_is_show == 0) {
|
||||
// mView.getUIController().displayOverview();
|
||||
//} else {
|
||||
// mView.getUIController().recoverLockMode();
|
||||
//}
|
||||
}else if (key_type == 10005){
|
||||
int navi_route_prefer = intent.getIntExtra("NAVI_ROUTE_PREFER", type);
|
||||
|
||||
@@ -247,11 +252,15 @@ public class MapPresenter extends Presenter<MapView> implements
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice("已切换", null);
|
||||
case VoiceConstants.CMD_MAP_NORTH_UP_MODE:
|
||||
mView.getUIController().changeMapMode(EnumMapUI.NorthUP_2D);
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice("已切换", null);
|
||||
|
||||
break;
|
||||
case VoiceConstants.CMD_MAP_3D_UN_WAKEUP:
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice("已切换", null);
|
||||
case VoiceConstants.CMD_MAP_3D:
|
||||
mView.getUIController().changeMapMode(EnumMapUI.CarUp_3D);
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice("已切换", null);
|
||||
|
||||
break;
|
||||
case VoiceConstants.CMD_MAP_DAY_TIME_MODE_UN_WAKEUP:
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice("已切换", null);
|
||||
|
||||
@@ -84,7 +84,7 @@ public abstract class BaseFragment extends Fragment {
|
||||
* 移动地图中心点到屏幕中心
|
||||
*/
|
||||
protected void moveMapToCenter(){
|
||||
SearchServiceHolder.INSTANCE.getMapUIController().setPointToCenter(0.5,0.5);
|
||||
//SearchServiceHolder.INSTANCE.getMapUIController().setPointToCenter(0.5,0.5);
|
||||
}
|
||||
|
||||
//mMogoMapUIController.setPointToCenter( 0.66145, 0.590688 );
|
||||
|
||||
@@ -56,7 +56,9 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
|
||||
"startNavi" -> {
|
||||
startNavi()
|
||||
}
|
||||
|
||||
"retry" -> {
|
||||
retry()
|
||||
}
|
||||
"cancel" -> {
|
||||
SearchServiceHolder.fragmentManager
|
||||
.clearAll()
|
||||
@@ -107,17 +109,22 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
|
||||
mAdapter.setDatas(calculatedStrategies)
|
||||
mAdapter.selectTag = calculatedStrategies[0].tagId
|
||||
}
|
||||
AIAssist.getInstance(context).speakTTSVoice(String.format("已为你规划处%d条路线,请选择",calculatedStrategies.size))
|
||||
AIAssist.getInstance(context)
|
||||
.speakTTSVoice(String.format("已为你规划处%d条路线,请选择", calculatedStrategies.size))
|
||||
pb_path.visibility = View.GONE
|
||||
group_path.visibility = View.GONE
|
||||
tv_navi_navi.text = getString(R.string.start_navi)
|
||||
|
||||
unregisterRetryVoice()
|
||||
|
||||
}
|
||||
|
||||
override fun onoCalculateFailed() {
|
||||
group_path.visibility = View.VISIBLE
|
||||
tv_navi_navi.text = "重试"
|
||||
pb_path.visibility=View.GONE
|
||||
pb_path.visibility = View.GONE
|
||||
|
||||
registerRetryVoice()
|
||||
|
||||
}
|
||||
|
||||
@@ -176,10 +183,7 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
|
||||
tv_navi_navi.setOnClickListener {
|
||||
|
||||
if (group_path.visibility == View.VISIBLE) {
|
||||
SearchServiceHolder.getNavi()
|
||||
.naviTo(mogoTip)
|
||||
pb_path.visibility=View.VISIBLE
|
||||
group_path.visibility=View.GONE
|
||||
retry()
|
||||
} else {
|
||||
startNavi()
|
||||
}
|
||||
@@ -212,14 +216,33 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
|
||||
|
||||
}
|
||||
|
||||
private fun registerRetryVoice(){
|
||||
AIAssist.getInstance(context)
|
||||
.registerUnWakeupCommand("retry", arrayOf<String>("重试"), this)
|
||||
}
|
||||
|
||||
private fun unregisterRetryVoice(){
|
||||
AIAssist.getInstance(context)
|
||||
.unregisterUnWakeupCommand("retry")
|
||||
|
||||
}
|
||||
|
||||
private fun retry() {
|
||||
SearchServiceHolder.getNavi()
|
||||
.naviTo(mogoTip)
|
||||
pb_path.visibility = View.VISIBLE
|
||||
group_path.visibility = View.GONE
|
||||
}
|
||||
|
||||
private fun startNavi() {
|
||||
moveMapToRight()
|
||||
|
||||
SearchServiceHolder.getNavi()
|
||||
.startNavi(!SettingManager.isMonitor())
|
||||
SearchServiceHolder.getMapUIController()
|
||||
.recoverLockMode()
|
||||
isStartedNavi = true
|
||||
SearchServiceHolder.fragmentManager.clearAll()
|
||||
moveMapToRight()
|
||||
}
|
||||
|
||||
private fun selectPath(item: MogoCalculatePath?) {
|
||||
@@ -253,7 +276,6 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
|
||||
AIAssist.getInstance(context)
|
||||
.unregisterUnWakeupCommand("startNavi")
|
||||
|
||||
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
@@ -134,15 +134,7 @@ public class SearchFragment extends BaseSearchFragment
|
||||
mPoiAdapter.setOnClickListener(new View.OnClickListener() {
|
||||
@Override public void onClick(View v) {
|
||||
MogoTip tag = (MogoTip) v.getTag(R.id.tag_position);
|
||||
SearchPoi searchPoi = EntityConvertUtils.tipToPoi(tag);
|
||||
if (tag.getPoint() == null) {
|
||||
goCategory(tag.getName());
|
||||
} else {
|
||||
mSearchPresenter.insert(searchPoi);
|
||||
SearchServiceHolder.INSTANCE.push(
|
||||
ChoosePathFragment.Companion.newInstance(tag.getPoint()),
|
||||
MogoModulePaths.PATH_FRAGMENT_CHOOSE_PAHT);
|
||||
}
|
||||
goResult(tag);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -190,6 +182,18 @@ public class SearchFragment extends BaseSearchFragment
|
||||
registerVoidCmd();
|
||||
}
|
||||
|
||||
private void goResult(MogoTip tag) {
|
||||
SearchPoi searchPoi = EntityConvertUtils.tipToPoi(tag);
|
||||
if (tag.getPoint() == null) {
|
||||
goCategory(tag.getName());
|
||||
} else {
|
||||
mSearchPresenter.insert(searchPoi);
|
||||
SearchServiceHolder.INSTANCE.push(
|
||||
ChoosePathFragment.Companion.newInstance(tag.getPoint()),
|
||||
MogoModulePaths.PATH_FRAGMENT_CHOOSE_PAHT);
|
||||
}
|
||||
}
|
||||
|
||||
private void goSetting() {
|
||||
SearchServiceHolder.INSTANCE.getAnalyticsManager()
|
||||
.track("Navigation_button_setting", new HashMap<String, Object>());
|
||||
@@ -331,6 +335,7 @@ public class SearchFragment extends BaseSearchFragment
|
||||
}
|
||||
showResult();
|
||||
mPoiAdapter.setDatas(datums);
|
||||
registerResult();
|
||||
}
|
||||
|
||||
@Override public void showHistory(List<SearchPoi> datums) {
|
||||
@@ -358,6 +363,21 @@ public class SearchFragment extends BaseSearchFragment
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void registerResult() {
|
||||
List<MogoTip> datums = mPoiAdapter.getList();
|
||||
for (int i = 0; i < datums.size(); i++) {
|
||||
String s = StringUtils.int2String(i + 1);
|
||||
AIAssist.getInstance(getContext())
|
||||
.registerUnWakeupCommand("history" + i,
|
||||
new String[] { "第" + s + "个", "第" + s + "条" }, this);
|
||||
if (cmds.contains("history" + i)) {
|
||||
continue;
|
||||
}
|
||||
cmds.add("history" + i);
|
||||
}
|
||||
}
|
||||
|
||||
private List<String> cmds = new ArrayList<String>();
|
||||
|
||||
@Override
|
||||
@@ -470,6 +490,10 @@ public class SearchFragment extends BaseSearchFragment
|
||||
tvEmpty.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
private boolean isHistory(){
|
||||
return rlHistory.getVisibility()==View.VISIBLE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 类别
|
||||
*/
|
||||
@@ -552,10 +576,18 @@ public class SearchFragment extends BaseSearchFragment
|
||||
if (!TextUtils.isEmpty(cmd) && cmd.startsWith("history")) {
|
||||
String index = cmd.substring(7);
|
||||
Integer integer = Integer.valueOf(index);
|
||||
if (isHistory()){
|
||||
if (integer < mHistoryAdapter.getItemCount()) {
|
||||
SearchPoi item = mHistoryAdapter.getItem(integer);
|
||||
goHistory(item);
|
||||
}
|
||||
}else {
|
||||
if (integer < mPoiAdapter.getItemCount()) {
|
||||
MogoTip item = mPoiAdapter.getItem(integer);
|
||||
goResult(item);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
switch (cmd) {
|
||||
|
||||
BIN
modules/mogo-module-service/src/main/res/drawable-ldpi/bg_map_marker_blue.png
Executable file
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
BIN
modules/mogo-module-service/src/main/res/drawable-ldpi/bg_map_marker_green.png
Executable file
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
BIN
modules/mogo-module-service/src/main/res/drawable-ldpi/bg_map_marker_oragne.png
Executable file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
modules/mogo-module-service/src/main/res/drawable-ldpi/bg_map_marker_purple.png
Executable file
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |