diff --git a/.idea/misc.xml b/.idea/misc.xml index 707ee6e613..2dc54c489f 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index c6fa98b877..e90b27d6bf 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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 } + diff --git a/config.gradle b/config.gradle index af1feb1af6..cb393debf5 100644 --- a/config.gradle +++ b/config.gradle @@ -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", - ] } \ No newline at end of file diff --git a/foudations/build/jrebel/project-cleaned.marker b/foudations/build/jrebel/project-cleaned.marker new file mode 100644 index 0000000000..e69de29bb2 diff --git a/foudations/mogo-commons/src/main/java/com/mogo/commons/voice/AIAssist.java b/foudations/mogo-commons/src/main/java/com/mogo/commons/voice/AIAssist.java index ef1a500a44..107c7770c8 100644 --- a/foudations/mogo-commons/src/main/java/com/mogo/commons/voice/AIAssist.java +++ b/foudations/mogo-commons/src/main/java/com/mogo/commons/voice/AIAssist.java @@ -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 ) { diff --git a/gradle.properties b/gradle.properties index 403af9cabd..06af0eb8b8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 \ No newline at end of file diff --git a/libraries/build/jrebel/project-cleaned.marker b/libraries/build/jrebel/project-cleaned.marker new file mode 100644 index 0000000000..e69de29bb2 diff --git a/libraries/map-amap/build.gradle b/libraries/map-amap/build.gradle index 5b36711ec6..555ca0b60e 100644 --- a/libraries/map-amap/build.gradle +++ b/libraries/map-amap/build.gradle @@ -20,6 +20,11 @@ android { } } + compileOptions { + sourceCompatibility 1.8 + targetCompatibility 1.8 + } + } dependencies { diff --git a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/AMapNaviViewWrapper.java b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/AMapNaviViewWrapper.java index 90adca4adb..b163ede5f4 100644 --- a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/AMapNaviViewWrapper.java +++ b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/AMapNaviViewWrapper.java @@ -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(); } diff --git a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/hook/BnHooker.java b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/hook/BnHooker.java index d40ead278a..06edf1be18 100644 --- a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/hook/BnHooker.java +++ b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/hook/BnHooker.java @@ -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" ); diff --git a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/navi/NaviClient.java b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/navi/NaviClient.java index f5cc05b264..279a4b5afa 100644 --- a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/navi/NaviClient.java +++ b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/navi/NaviClient.java @@ -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() { diff --git a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/navi/NaviListenerAdapter.java b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/navi/NaviListenerAdapter.java index 845e751f23..bf95e060c4 100644 --- a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/navi/NaviListenerAdapter.java +++ b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/navi/NaviListenerAdapter.java @@ -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 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(); diff --git a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/utils/MogoMapUtils.java b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/utils/MogoMapUtils.java index d4da664812..9fddebce13 100644 --- a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/utils/MogoMapUtils.java +++ b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/utils/MogoMapUtils.java @@ -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(); } } diff --git a/libraries/map-amap/src/main/res/layout/map_amap_cursor.xml b/libraries/map-amap/src/main/res/layout/map_amap_cursor.xml index 8e9c6bad3d..93cd5c4487 100644 --- a/libraries/map-amap/src/main/res/layout/map_amap_cursor.xml +++ b/libraries/map-amap/src/main/res/layout/map_amap_cursor.xml @@ -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" /> \ No newline at end of file diff --git a/libraries/mogo-map-api/src/main/res/drawable-ldpi/map_api_ic_current_location2.png b/libraries/mogo-map-api/src/main/res/drawable-ldpi/map_api_ic_current_location2.png index d60bb48336..e7914a741e 100644 Binary files a/libraries/mogo-map-api/src/main/res/drawable-ldpi/map_api_ic_current_location2.png and b/libraries/mogo-map-api/src/main/res/drawable-ldpi/map_api_ic_current_location2.png differ diff --git a/libraries/mogo-map-api/src/main/res/drawable-ldpi/map_api_ic_current_location2_cursor.png b/libraries/mogo-map-api/src/main/res/drawable-ldpi/map_api_ic_current_location2_cursor.png new file mode 100644 index 0000000000..374a153333 Binary files /dev/null and b/libraries/mogo-map-api/src/main/res/drawable-ldpi/map_api_ic_current_location2_cursor.png differ diff --git a/libraries/mogo-map-api/src/main/res/drawable-xhdpi/map_api_ic_current_location2.png b/libraries/mogo-map-api/src/main/res/drawable-xhdpi/map_api_ic_current_location2.png index 8696d07e68..8f8e62bae4 100644 Binary files a/libraries/mogo-map-api/src/main/res/drawable-xhdpi/map_api_ic_current_location2.png and b/libraries/mogo-map-api/src/main/res/drawable-xhdpi/map_api_ic_current_location2.png differ diff --git a/libraries/mogo-map-api/src/main/res/drawable-xhdpi/map_api_ic_current_location2_cursor.png b/libraries/mogo-map-api/src/main/res/drawable-xhdpi/map_api_ic_current_location2_cursor.png new file mode 100644 index 0000000000..a293f02f62 Binary files /dev/null and b/libraries/mogo-map-api/src/main/res/drawable-xhdpi/map_api_ic_current_location2_cursor.png differ diff --git a/modules/build/jrebel/project-cleaned.marker b/modules/build/jrebel/project-cleaned.marker new file mode 100644 index 0000000000..e69de29bb2 diff --git a/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/AppsListActivity.java b/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/AppsListActivity.java index ec753aaf98..82c116ec6f 100644 --- a/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/AppsListActivity.java +++ b/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/AppsListActivity.java @@ -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 diff --git a/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/view/PagerIndicator.java b/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/view/PagerIndicator.java index 0a7dc54191..20efc01576 100644 --- a/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/view/PagerIndicator.java +++ b/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/view/PagerIndicator.java @@ -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 ); } diff --git a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_aux.png b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_aux.png index 9d22f93729..425894b2c0 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_aux.png and b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_aux.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_bt.png b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_bt.png index b5d96df805..595b087455 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_bt.png and b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_bt.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_car_setting.png b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_car_setting.png index 073b9fce18..2f7c3a0726 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_car_setting.png and b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_car_setting.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_carcorder.png b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_carcorder.png index 3577b9485f..076e301e62 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_carcorder.png and b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_carcorder.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_clean_master.png b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_clean_master.png index a68bfab560..594b36fa2e 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_clean_master.png and b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_clean_master.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_equlizer.png b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_equlizer.png index 94a39cf6e0..d9e94aa25b 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_equlizer.png and b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_equlizer.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_fleet.png b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_fleet.png index 4b346b0d59..f9a9cb0b91 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_fleet.png and b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_fleet.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_fm.png b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_fm.png index f598aca684..bfec997202 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_fm.png and b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_fm.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_fota.png b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_fota.png index 2843ec7c68..1eb98da08b 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_fota.png and b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_fota.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_fresh_things.png b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_fresh_things.png index 17cd3c11ff..41ec3ad07d 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_fresh_things.png and b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_fresh_things.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_im.png b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_im.png index f43e1ddc20..9a08151023 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_im.png and b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_im.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_lrts.png b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_lrts.png index f49de083a7..b8b9cc814b 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_lrts.png and b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_lrts.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_qiyi.png b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_qiyi.png index 2a5d915995..1d885be37f 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_qiyi.png and b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_qiyi.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_qq_music.png b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_qq_music.png index eec0f6a944..dea1154a13 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_qq_music.png and b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_qq_music.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_road_condition.png b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_road_condition.png index 5677fbba98..12c5d954b8 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_road_condition.png and b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_road_condition.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_stee_product.png b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_stee_product.png index dca97089e9..e3040f195f 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_stee_product.png and b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_stee_product.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_wechat.png b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_wechat.png index 8c97473556..136b3e6ab8 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_wechat.png and b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_wechat.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_welfare.png b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_welfare.png index 39fd25a080..dc951e6133 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_welfare.png and b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_welfare.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_ximalaya.png b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_ximalaya.png index c820effc50..9c55842f45 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_ximalaya.png and b/modules/mogo-module-apps/src/main/res/drawable-ldpi/module_apps_ic_ximalaya.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_aux.png b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_aux.png index c47c8dc66c..662299b4f9 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_aux.png and b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_aux.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_bt.png b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_bt.png index bd7449878e..253cd8d7c5 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_bt.png and b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_bt.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_car_setting.png b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_car_setting.png index bb7ed874fb..cc80499158 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_car_setting.png and b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_car_setting.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_carcorder.png b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_carcorder.png index e5afd4d40a..c949e8c480 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_carcorder.png and b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_carcorder.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_clean_master.png b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_clean_master.png index 49c2bb68a4..359595a620 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_clean_master.png and b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_clean_master.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_equlizer.png b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_equlizer.png index 8cce9da01e..538b3111fd 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_equlizer.png and b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_equlizer.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_fleet.png b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_fleet.png index e64c7be5dc..81a6911102 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_fleet.png and b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_fleet.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_fm.png b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_fm.png index 0b2a2f9877..a60cb64208 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_fm.png and b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_fm.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_fota.png b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_fota.png index 4a2ac37ac2..f0cb755032 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_fota.png and b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_fota.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_fresh_things.png b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_fresh_things.png index 4353aebc16..3cbdfd1de4 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_fresh_things.png and b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_fresh_things.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_im.png b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_im.png index 2bd4af3c72..cb9eb9753d 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_im.png and b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_im.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_lrts.png b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_lrts.png index f741bac8b9..77e3c31a55 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_lrts.png and b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_lrts.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_qiyi.png b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_qiyi.png index 89f3042331..8ce12c8f73 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_qiyi.png and b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_qiyi.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_qq_music.png b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_qq_music.png index 96841dfd9c..a67563b193 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_qq_music.png and b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_qq_music.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_road_condition.png b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_road_condition.png index c27e01f347..cc9c20ad21 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_road_condition.png and b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_road_condition.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_stee_product.png b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_stee_product.png index d0ab5801f3..52d187838d 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_stee_product.png and b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_stee_product.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_wechat.png b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_wechat.png index a9ab6a46a4..413fdd812d 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_wechat.png and b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_wechat.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_welfare.png b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_welfare.png index 87b7aada94..adb740db77 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_welfare.png and b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_welfare.png differ diff --git a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_ximalaya.png b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_ximalaya.png index a40633f71f..1252187fbd 100755 Binary files a/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_ximalaya.png and b/modules/mogo-module-apps/src/main/res/drawable-xhdpi/module_apps_ic_ximalaya.png differ diff --git a/modules/mogo-module-apps/src/main/res/layout/module_apps_activiity_list.xml b/modules/mogo-module-apps/src/main/res/layout/module_apps_activity_list.xml similarity index 100% rename from modules/mogo-module-apps/src/main/res/layout/module_apps_activiity_list.xml rename to modules/mogo-module-apps/src/main/res/layout/module_apps_activity_list.xml diff --git a/modules/mogo-module-apps/src/main/res/layout/module_apps_fragment_apps_navigator.xml b/modules/mogo-module-apps/src/main/res/layout/module_apps_fragment_apps_navigator.xml index 514e28f04f..35a825c7c5 100644 --- a/modules/mogo-module-apps/src/main/res/layout/module_apps_fragment_apps_navigator.xml +++ b/modules/mogo-module-apps/src/main/res/layout/module_apps_fragment_apps_navigator.xml @@ -20,9 +20,9 @@ - 117px + 85px 2.7px 16px 2.3px 54.9px - 50px - 50px + 96px + @dimen/module_apps_navigation_icon_width 22px 33px 24px - 18px - 112px - 112px + 20px + 96px + 96px 279px - 89px + 88px 95px 9.5px 18px - + 50px + 50px \ No newline at end of file diff --git a/modules/mogo-module-apps/src/main/res/values-xhdpi/dimens.xml b/modules/mogo-module-apps/src/main/res/values-xhdpi/dimens.xml index 8981b061bc..2d59d27b6e 100644 --- a/modules/mogo-module-apps/src/main/res/values-xhdpi/dimens.xml +++ b/modules/mogo-module-apps/src/main/res/values-xhdpi/dimens.xml @@ -1,17 +1,23 @@ - 260px + 160px 5px 30px 4px 103px - 94px - 94px + 180px + @dimen/module_apps_navigation_icon_width 43px 60px 32px - 32px - 220px - 220px - 154px + 37.5px + 180px + 180px + 136px + 174px + 523px + 18px + 35px + 94px + 94px \ No newline at end of file diff --git a/modules/mogo-module-apps/src/main/res/values/dimens.xml b/modules/mogo-module-apps/src/main/res/values/dimens.xml index db48b6e2d3..c534a52e39 100644 --- a/modules/mogo-module-apps/src/main/res/values/dimens.xml +++ b/modules/mogo-module-apps/src/main/res/values/dimens.xml @@ -1,21 +1,23 @@ - 260px + 160px 5px 30px 2.3px 103px - 120px - 120px + 180px + @dimen/module_apps_navigation_icon_width 60px 60px 32px - 32px - 220px - 220px - 154px - 174px + 37.5px + 180px + 180px + 136px + 174px 523px 18px 37px + 120px + 120px \ No newline at end of file diff --git a/modules/mogo-module-common/src/main/res/drawable-ldpi/icon_default_user_head.png b/modules/mogo-module-common/src/main/res/drawable-ldpi/icon_default_user_head.png new file mode 100644 index 0000000000..a1349fc088 Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-ldpi/icon_default_user_head.png differ diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java index 0be64e7d37..e7984a154e 100644 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java +++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java @@ -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() { diff --git a/modules/mogo-module-main/src/main/AndroidManifest.xml b/modules/mogo-module-main/src/main/AndroidManifest.xml index ec58588f6d..d7dee65541 100644 --- a/modules/mogo-module-main/src/main/AndroidManifest.xml +++ b/modules/mogo-module-main/src/main/AndroidManifest.xml @@ -14,7 +14,7 @@ android:stateNotNeeded="true" android:taskAffinity="" android:theme="@style/Main" - android:windowSoftInputMode="adjustPan"> + android:windowSoftInputMode="adjustPan|stateHidden"> diff --git a/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java b/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java index 006760a9ad..be9d8f248c 100644 --- a/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java +++ b/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java @@ -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 ); } diff --git a/modules/mogo-module-main/src/main/java/com/mogo/module/main/assist/MapBroadCastHelper.java b/modules/mogo-module-main/src/main/java/com/mogo/module/main/assist/MapBroadCastHelper.java index 9e771b7f65..06f3f4dacb 100644 --- a/modules/mogo-module-main/src/main/java/com/mogo/module/main/assist/MapBroadCastHelper.java +++ b/modules/mogo-module-main/src/main/java/com/mogo/module/main/assist/MapBroadCastHelper.java @@ -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(); + } + } } diff --git a/modules/mogo-module-main/src/main/java/com/mogo/module/main/cards/HorizentalBaseTransformer.java b/modules/mogo-module-main/src/main/java/com/mogo/module/main/cards/HorizentalBaseTransformer.java new file mode 100644 index 0000000000..3983ef6b56 --- /dev/null +++ b/modules/mogo-module-main/src/main/java/com/mogo/module/main/cards/HorizentalBaseTransformer.java @@ -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)}. + *

+ * 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; + } +} \ No newline at end of file diff --git a/modules/mogo-module-main/src/main/java/com/mogo/module/main/cards/HorizentalStackTransformer.java b/modules/mogo-module-main/src/main/java/com/mogo/module/main/cards/HorizentalStackTransformer.java new file mode 100644 index 0000000000..16f7ea21f6 --- /dev/null +++ b/modules/mogo-module-main/src/main/java/com/mogo/module/main/cards/HorizentalStackTransformer.java @@ -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 ); + } + } +} \ No newline at end of file diff --git a/modules/mogo-module-main/src/main/res/drawable-ldpi/module_apps_bg_card.png b/modules/mogo-module-main/src/main/res/drawable-ldpi/module_apps_bg_card.png index 3e68a54a4a..50943aa8c9 100644 Binary files a/modules/mogo-module-main/src/main/res/drawable-ldpi/module_apps_bg_card.png and b/modules/mogo-module-main/src/main/res/drawable-ldpi/module_apps_bg_card.png differ diff --git a/modules/mogo-module-main/src/main/res/drawable-xhdpi/module_apps_bg_card.png b/modules/mogo-module-main/src/main/res/drawable-xhdpi/module_apps_bg_card.png old mode 100755 new mode 100644 index bb0c8aef1c..d2b6a05cb6 Binary files a/modules/mogo-module-main/src/main/res/drawable-xhdpi/module_apps_bg_card.png and b/modules/mogo-module-main/src/main/res/drawable-xhdpi/module_apps_bg_card.png differ diff --git a/modules/mogo-module-map/src/main/java/com/mogo/module/map/MapPresenter.java b/modules/mogo-module-map/src/main/java/com/mogo/module/map/MapPresenter.java index f821dda80e..a10e28ec59 100644 --- a/modules/mogo-module-map/src/main/java/com/mogo/module/map/MapPresenter.java +++ b/modules/mogo-module-map/src/main/java/com/mogo/module/map/MapPresenter.java @@ -82,9 +82,14 @@ public class MapPresenter extends Presenter 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 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 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); diff --git a/modules/mogo-module-search/src/main/java/com/mogo/module/navi/ui/base/BaseFragment.java b/modules/mogo-module-search/src/main/java/com/mogo/module/navi/ui/base/BaseFragment.java index d8f6584ede..02bc1b9482 100644 --- a/modules/mogo-module-search/src/main/java/com/mogo/module/navi/ui/base/BaseFragment.java +++ b/modules/mogo-module-search/src/main/java/com/mogo/module/navi/ui/base/BaseFragment.java @@ -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 ); diff --git a/modules/mogo-module-search/src/main/java/com/mogo/module/navi/ui/search/ChoosePathFragment.kt b/modules/mogo-module-search/src/main/java/com/mogo/module/navi/ui/search/ChoosePathFragment.kt index 9459b25520..95f9f99352 100644 --- a/modules/mogo-module-search/src/main/java/com/mogo/module/navi/ui/search/ChoosePathFragment.kt +++ b/modules/mogo-module-search/src/main/java/com/mogo/module/navi/ui/search/ChoosePathFragment.kt @@ -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("重试"), 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 { diff --git a/modules/mogo-module-search/src/main/java/com/mogo/module/navi/ui/search/SearchFragment.java b/modules/mogo-module-search/src/main/java/com/mogo/module/navi/ui/search/SearchFragment.java index 42ed9b596b..a2b25b8e8b 100644 --- a/modules/mogo-module-search/src/main/java/com/mogo/module/navi/ui/search/SearchFragment.java +++ b/modules/mogo-module-search/src/main/java/com/mogo/module/navi/ui/search/SearchFragment.java @@ -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()); @@ -331,6 +335,7 @@ public class SearchFragment extends BaseSearchFragment } showResult(); mPoiAdapter.setDatas(datums); + registerResult(); } @Override public void showHistory(List datums) { @@ -358,6 +363,21 @@ public class SearchFragment extends BaseSearchFragment } } + + private void registerResult() { + List 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 cmds = new ArrayList(); @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) { diff --git a/modules/mogo-module-service/src/main/res/drawable-ldpi/bg_map_marker_blue.png b/modules/mogo-module-service/src/main/res/drawable-ldpi/bg_map_marker_blue.png new file mode 100755 index 0000000000..53a17783bb Binary files /dev/null and b/modules/mogo-module-service/src/main/res/drawable-ldpi/bg_map_marker_blue.png differ diff --git a/modules/mogo-module-service/src/main/res/drawable-ldpi/bg_map_marker_blue_dark.png b/modules/mogo-module-service/src/main/res/drawable-ldpi/bg_map_marker_blue_dark.png new file mode 100755 index 0000000000..674ef02f31 Binary files /dev/null and b/modules/mogo-module-service/src/main/res/drawable-ldpi/bg_map_marker_blue_dark.png differ diff --git a/modules/mogo-module-service/src/main/res/drawable-ldpi/bg_map_marker_green.png b/modules/mogo-module-service/src/main/res/drawable-ldpi/bg_map_marker_green.png new file mode 100755 index 0000000000..b848a42232 Binary files /dev/null and b/modules/mogo-module-service/src/main/res/drawable-ldpi/bg_map_marker_green.png differ diff --git a/modules/mogo-module-service/src/main/res/drawable-ldpi/bg_map_marker_green_dark.png b/modules/mogo-module-service/src/main/res/drawable-ldpi/bg_map_marker_green_dark.png new file mode 100644 index 0000000000..0feaf8ae71 Binary files /dev/null and b/modules/mogo-module-service/src/main/res/drawable-ldpi/bg_map_marker_green_dark.png differ diff --git a/modules/mogo-module-service/src/main/res/drawable-ldpi/bg_map_marker_oragne.png b/modules/mogo-module-service/src/main/res/drawable-ldpi/bg_map_marker_oragne.png new file mode 100755 index 0000000000..c9c886a543 Binary files /dev/null and b/modules/mogo-module-service/src/main/res/drawable-ldpi/bg_map_marker_oragne.png differ diff --git a/modules/mogo-module-service/src/main/res/drawable-ldpi/bg_map_marker_purple.png b/modules/mogo-module-service/src/main/res/drawable-ldpi/bg_map_marker_purple.png new file mode 100755 index 0000000000..a1c6408a30 Binary files /dev/null and b/modules/mogo-module-service/src/main/res/drawable-ldpi/bg_map_marker_purple.png differ diff --git a/modules/mogo-module-service/src/main/res/drawable-ldpi/bg_map_marker_red.png b/modules/mogo-module-service/src/main/res/drawable-ldpi/bg_map_marker_red.png new file mode 100644 index 0000000000..994e8b92c4 Binary files /dev/null and b/modules/mogo-module-service/src/main/res/drawable-ldpi/bg_map_marker_red.png differ diff --git a/modules/mogo-module-service/src/main/res/drawable-xhdpi/icon_map_marker_car_blue.png b/modules/mogo-module-service/src/main/res/drawable-xhdpi/icon_map_marker_car_blue.png deleted file mode 100644 index 0bd9d83a57..0000000000 Binary files a/modules/mogo-module-service/src/main/res/drawable-xhdpi/icon_map_marker_car_blue.png and /dev/null differ diff --git a/modules/mogo-module-service/src/main/res/drawable-xhdpi/icon_map_marker_music_play.png b/modules/mogo-module-service/src/main/res/drawable-xhdpi/icon_map_marker_music_play.png deleted file mode 100644 index 551334ee17..0000000000 Binary files a/modules/mogo-module-service/src/main/res/drawable-xhdpi/icon_map_marker_music_play.png and /dev/null differ diff --git a/services/build/jrebel/project-cleaned.marker b/services/build/jrebel/project-cleaned.marker new file mode 100644 index 0000000000..e69de29bb2