diff --git a/app/build.gradle b/app/build.gradle
index a4be1c2467..9ec67a2001 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -281,4 +281,3 @@ def getGitCommit() {
assert !gitCommit.isEmpty()
gitCommit
}
-
diff --git a/foudations/mogo-commons/src/main/java/com/mogo/commons/AbsMogoApplication.java b/foudations/mogo-commons/src/main/java/com/mogo/commons/AbsMogoApplication.java
index b1e7afd023..53d2b568cc 100644
--- a/foudations/mogo-commons/src/main/java/com/mogo/commons/AbsMogoApplication.java
+++ b/foudations/mogo-commons/src/main/java/com/mogo/commons/AbsMogoApplication.java
@@ -133,9 +133,9 @@ public class AbsMogoApplication extends Application {
} );
}
- private static void getTicket(TicketInfoCallback callback){
+ private static void getTicket( TicketInfoCallback callback ) {
if ( DebugConfig.isLauncher() ) {
- AccountClientManager.getTicket(callback);
+ AccountClientManager.getTicket( callback );
} else {
AccountClientManager.getAppTicket( callback );
}
diff --git a/gradle.properties b/gradle.properties
index 2be089adf2..2edb4df825 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -27,43 +27,43 @@ PASSWORD=xintai2018
RELEASE=false
# 模块版本
## 工程内模块
-MOGO_COMMONS_VERSION=1.2.1
-MOGO_UTILS_VERSION=1.2.1
-MAP_AMAP_VERSION=1.2.1
-MAP_AUTONAVI_VERSION=1.2.1
-MOGO_MAP_VERSION=1.2.1
-MOGO_MAP_API_VERSION=1.2.1
-MOGO_SERVICE_VERSION=1.2.1
-MOGO_SERVICE_API_VERSION=1.2.1
-MOGO_CONNECTION_VERSION=1.2.1
-MOGO_MODULE_APPS_VERSION=1.2.1
-MOGO_MODULE_NAVI_VERSION=1.2.1
-MOGO_MODULE_SHARE_VERSION=1.2.1
-MOGO_MODULE_COMMON_VERSION=1.2.1
-MOGO_MODULE_MAIN_VERSION=1.2.1
-MOGO_MODULE_MAP_VERSION=1.2.1
-MOGO_MODULE_SERVICE_VERSION=1.2.1
-MOGO_MODULE_EXTENSIONS_VERSION=1.2.1
-MOGO_MODULE_SEARCH_VERSION=1.2.1
-MOGO_MODULE_BACK_VERSION=1.2.1
-MOGO_MODULE_GPS_SIMULATOR_VERSION=1.2.1
-MOGO_MODULE_GPS_SIMULATOR_DEBUG_VERSION=1.2.1
-MOGO_MODULE_GPS_SIMULATOR_NOOP_VERSION=1.2.1
-MOGO_MODULE_AUTHORIZE_VERSION=1.2.1
-MOGO_MODULE_GUIDE_VERSION=1.2.1
-MOGO_MODULE_MEDIA_VERSION=1.2.1
+MOGO_COMMONS_VERSION=1.2.1.4
+MOGO_UTILS_VERSION=1.2.1.4
+MAP_AMAP_VERSION=1.2.1.4
+MAP_AUTONAVI_VERSION=1.2.1.4
+MOGO_MAP_VERSION=1.2.1.4
+MOGO_MAP_API_VERSION=1.2.1.4
+MOGO_SERVICE_VERSION=1.2.1.4
+MOGO_SERVICE_API_VERSION=1.2.1.4
+MOGO_CONNECTION_VERSION=1.2.1.4
+MOGO_MODULE_APPS_VERSION=1.2.1.4
+MOGO_MODULE_NAVI_VERSION=1.2.1.4
+MOGO_MODULE_SHARE_VERSION=1.2.1.4
+MOGO_MODULE_COMMON_VERSION=1.2.1.4
+MOGO_MODULE_MAIN_VERSION=1.2.1.4
+MOGO_MODULE_MAP_VERSION=1.2.1.4
+MOGO_MODULE_SERVICE_VERSION=1.2.1.4
+MOGO_MODULE_EXTENSIONS_VERSION=1.2.1.4
+MOGO_MODULE_SEARCH_VERSION=1.2.1.4
+MOGO_MODULE_BACK_VERSION=1.2.1.4
+MOGO_MODULE_GPS_SIMULATOR_VERSION=1.2.1.4
+MOGO_MODULE_GPS_SIMULATOR_DEBUG_VERSION=1.2.1.4
+MOGO_MODULE_GPS_SIMULATOR_NOOP_VERSION=1.2.1.4
+MOGO_MODULE_AUTHORIZE_VERSION=1.2.1.4
+MOGO_MODULE_GUIDE_VERSION=1.2.1.4
+MOGO_MODULE_MEDIA_VERSION=1.2.1.4
-MOGO_MODULE_MAIN_LAUNCHER_VERSION = 1.0.0.2
-MOGO_MODULE_MAIN_INDEPENDENT_VERSION = 1.0.0.2
+MOGO_MODULE_MAIN_LAUNCHER_VERSION = 1.0.0.6
+MOGO_MODULE_MAIN_INDEPENDENT_VERSION = 1.0.0.6
## 工程外部模块
# 探路
MOGO_MODULE_TANLU_VERSION=1.1.0.1-SNAPSHOT
# 车聊聊
-CARCHATTING_VERSION=1.0.6-SNAPSHOT
+CARCHATTING_VERSION=1.0.6
# 车聊聊接口
-CARCHATTINGPROVIDER_VERSION=1.0.6-SNAPSHOT
+CARCHATTINGPROVIDER_VERSION=1.0.6
# 视频引导
MOGO_MODULE_GUIDESHOW_VERSION=1.0.2-SNAPSHOT
# 视频引导接口
@@ -71,7 +71,7 @@ MOGO_MODULE_GUIDESHOW_PROVIDER_VERSION=1.0.2-SNAPSHOT
# 在线车辆F
MOGO_MODULE_ONLINECAR_VERSION=1.0.3.2
# v2x
-MOGO_MODULE_V2X_VERSION=1.1.13
+MOGO_MODULE_V2X_VERSION=1.1.18
# 推送
MOGO_MODULE_PUSH_VERSION=1.0.1
# 广告资源位
diff --git a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/marker/CombineMovingPointOverlay.java b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/marker/CombineMovingPointOverlay.java
new file mode 100644
index 0000000000..4d7d1fb929
--- /dev/null
+++ b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/marker/CombineMovingPointOverlay.java
@@ -0,0 +1,330 @@
+package com.mogo.map.impl.amap.marker;
+
+import com.amap.api.maps.AMap;
+import com.amap.api.maps.AMapUtils;
+import com.amap.api.maps.model.BasePointOverlay;
+import com.amap.api.maps.model.LatLng;
+import com.autonavi.amap.mapcore.IPoint;
+import com.autonavi.amap.mapcore.MapProjection;
+import com.mogo.utils.logger.Logger;
+
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.SynchronousQueue;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+/**
+ * @author congtaowang
+ * @since 2020/6/15
+ *
+ */
+class CombineMovingPointOverlay {
+
+ private static final String TAG = "CombineMovingPointOverlay";
+
+ private AMap mAMap;
+ private long mDuration = 1_000L;
+ private long mStepDuration = 20L;
+ private LinkedList< LatLng > mPoints = new LinkedList<>();
+ private LinkedList< Double > mEachDistance = new LinkedList<>();
+
+ private double mTotalDistance = 0.0D;
+ private double mRemainDistance = 0.0D;
+ private ExecutorService mThreadPools;
+ private Object mLock = new Object();
+ private BasePointOverlay mBaseOverlay = null;
+ private int mIndex = 0;
+ private boolean mUseDefaultDescriptor = false;
+ AtomicBoolean mExitFlag = new AtomicBoolean( false );
+ private MoveListener mMoveListener;
+ private Status mStatus;
+ private long mPauseMillis;
+ private long mAnimationBeginTime;
+
+ public CombineMovingPointOverlay( AMap amap, BasePointOverlay baseOverlay ) {
+ mStatus = Status.Status1;
+ mAnimationBeginTime = System.currentTimeMillis();
+ if ( amap != null && baseOverlay != null ) {
+ this.mAMap = amap;
+ this.mBaseOverlay = baseOverlay;
+ mThreadPools = new ThreadPoolExecutor( 1, 2, 5L, TimeUnit.SECONDS, new SynchronousQueue(), new ThreadFactoryImpl() );
+ }
+ }
+
+ public void setMoveListener( MoveListener moveListener ) {
+ this.mMoveListener = moveListener;
+ }
+
+ public void setPoints( List< LatLng > list ) {
+ synchronized ( mLock ) {
+ if ( list != null && list.size() >= 2 ) {
+ stopMove();
+ if ( mPoints != null ) {
+ mPoints.clear();
+ }
+ Iterator< LatLng > iterator = list.listIterator();
+ while ( iterator.hasNext() ) {
+ LatLng latLng = iterator.next();
+ if ( latLng != null ) {
+ mPoints.add( latLng );
+ }
+ }
+
+ mEachDistance.clear();
+ mTotalDistance = 0.0D;
+
+ for ( int i = 0; i < mPoints.size(); i++ ) {
+ double distance = AMapUtils.calculateLineDistance( mPoints.get( i ), mPoints.get( i + 1 ) );
+ mEachDistance.add( distance );
+ mTotalDistance += distance;
+ }
+
+ mRemainDistance = mTotalDistance;
+ mBaseOverlay.setPosition( mPoints.get( 0 ) );
+ reset();
+ }
+ }
+ }
+
+
+ public int getIndex() {
+ return mIndex;
+ }
+
+ public BasePointOverlay getBaseOverlay() {
+ return mBaseOverlay;
+ }
+
+ public void destroy() {
+ try {
+ removeMarker();
+ mThreadPools.shutdown();
+ synchronized ( mLock ) {
+ mPoints.clear();
+ mEachDistance.clear();
+ ;
+ }
+ } catch ( Exception e ) {
+
+ }
+ }
+
+ public void removeMarker() {
+ try {
+ reset();
+ if ( mBaseOverlay != null ) {
+ mBaseOverlay.remove();
+ mBaseOverlay = null;
+ }
+ } catch ( Exception e ) {
+ Logger.e( TAG, e, "error." );
+ }
+ }
+
+ public void stopMove() {
+ if ( mStatus == Status.Status3 ) {
+ mStatus = Status.Status4;
+ mPauseMillis = System.currentTimeMillis();
+ }
+ }
+
+ private void reset() {
+ if ( mStatus == Status.Status3 || mStatus == Status.Status4 ) {
+ mExitFlag.set( true );
+ try {
+ mThreadPools.awaitTermination( mStepDuration + 20L, TimeUnit.MICROSECONDS );
+ mBaseOverlay.setAnimation( null );
+ mStatus = Status.Status1;
+ } catch ( InterruptedException e ) {
+ Logger.e( TAG, e, "error." );
+ }
+ }
+ }
+
+ public void resetIndex() {
+ mIndex = 0;
+ }
+
+
+ public void setTotalDuration( int seconds ) {
+ mDuration = seconds * 1_000L;
+ }
+
+ public void startSmoothMove() {
+ if ( mStatus == Status.Status4 ) {
+ mStatus = Status.Status3;
+ long interval = System.currentTimeMillis() - mPauseMillis;
+ mAnimationBeginTime += interval;
+ } else {
+ if ( mStatus == Status.Status1 || mStatus == Status.Status5 ) {
+ if ( mPoints.size() <= 0 ) {
+ return;
+ }
+ mIndex = 0;
+ mThreadPools.execute( new MarkerMovingRunnable() );
+ }
+ }
+ }
+
+ public void setVisible( boolean visible ) {
+ if ( mBaseOverlay != null ) {
+ try {
+ mBaseOverlay.setVisible( visible );
+ } catch ( Exception e ) {
+ Logger.e( TAG, e, "error." );
+ }
+ }
+ }
+
+ private class MarkerMovingRunnable implements Runnable {
+
+ @Override
+ public void run() {
+ mAnimationBeginTime = System.currentTimeMillis();
+ mStatus = Status.Status2;
+ mExitFlag.set( false );
+
+ try {
+ for ( ; !mExitFlag.get() && mIndex <= mPoints.size() - 1; Thread.sleep( mStepDuration ) ) {
+ synchronized ( mLock ) {
+ if ( mExitFlag.get() ) {
+ return;
+ }
+ if ( mStatus == Status.Status4 ) {
+ long interval = System.currentTimeMillis() - mAnimationBeginTime;
+ IPoint point = getCurPosition( interval );
+ mBaseOverlay.setGeoPoint( point );
+ mStatus = Status.Status3;
+ }
+ }
+ }
+ mStatus = Status.Status5;
+ } catch ( Exception e ) {
+ Logger.e( TAG, e, "error." );
+ }
+ }
+ }
+
+ private IPoint getCurPosition( long interval ) {
+ if ( interval > mDuration ) {
+ mExitFlag.set( true );
+ IPoint point = new IPoint();
+ mIndex = mPoints.size() - 1;
+ LatLng latLng = mPoints.get( mIndex );
+ --mIndex;
+ mIndex = Math.max( mIndex, 0 );
+ mRemainDistance = 0.0D;
+ MapProjection.lonlat2Geo( latLng.longitude, latLng.latitude, point );
+ if ( mMoveListener != null ) {
+ mMoveListener.move( mRemainDistance );
+ }
+ return point;
+ } else {
+ double step = interval * mTotalDistance / mDuration;
+ mRemainDistance = mTotalDistance - step;
+ int targetIndex = 0;
+ double val = 1.0D;
+
+ for ( int i = 0; i < mEachDistance.size(); i++ ) {
+ double distance = mEachDistance.get( i );
+ if ( step <= distance ) {
+ if ( distance > 0.0D ) {
+ val = step / distance;
+ }
+ targetIndex = i;
+ break;
+ }
+ step -= distance;
+ }
+
+ if ( targetIndex != mIndex && mMoveListener != null ) {
+ mMoveListener.move( mRemainDistance );
+ }
+
+ mIndex = targetIndex;
+ LatLng latLng = mPoints.get( mIndex );
+ LatLng latLng1 = mPoints.get( mIndex + 1 );
+ IPoint point = new IPoint();
+ MapProjection.lonlat2Geo( latLng.longitude, latLng.latitude, point );
+ IPoint point1 = new IPoint();
+ MapProjection.lonlat2Geo( latLng1.longitude, latLng1.latitude, point1 );
+
+ int xDelta = point1.x - point.x;
+ int yDelta = point1.y - point.y;
+
+ if ( AMapUtils.calculateLineDistance( latLng, latLng1 ) > 1.0F ) {
+ float rotate = getRotate( point, point1 );
+ setRotate( rotate );
+ }
+ return new IPoint( ( ( int ) ( point.x + ( ( double ) xDelta ) * val ) ), ( ( int ) ( point.y + ( ( double ) yDelta ) * val ) ) );
+ }
+ }
+
+ private float getRotate( IPoint point, IPoint point1 ) {
+ if ( point != null && point1 != null ) {
+ double py1 = ( double ) point1.y;
+ double py = ( double ) point.y;
+ double px = ( double ) point.x;
+ return ( float ) ( Math.atan2( ( double ) point1.x - px, py - py1 ) / 3.141592653589793D * 180.0D );
+ } else {
+ return 0.0F;
+ }
+ }
+
+ public void setPoint( LatLng latLng ) {
+ if ( mBaseOverlay != null ) {
+ try {
+ mBaseOverlay.setPosition( latLng );
+ } catch ( Exception e ) {
+ Logger.e( TAG, e, "error." );
+ }
+ }
+ }
+
+ public void setRotate( float rotate ) {
+ if ( mBaseOverlay == null ) {
+ return;
+ }
+ if ( mAMap == null ) {
+ return;
+ }
+ if ( mAMap.getCameraPosition() == null ) {
+ return;
+ }
+ mBaseOverlay.setRotateAngle( 360.0F - rotate + mAMap.getCameraPosition().bearing );
+ }
+
+ public LatLng getPosition() {
+ if ( mBaseOverlay != null ) {
+ return mBaseOverlay.getPosition();
+ }
+ return null;
+ }
+
+ private enum Status {
+ Status1,
+ Status2,
+ Status3,
+ Status4,
+ Status5
+ }
+
+ public interface MoveListener {
+ void move( double val );
+ }
+
+ private static class ThreadFactoryImpl implements ThreadFactory {
+
+ private static int mCounter = 1;
+
+ @Override
+ public Thread newThread( Runnable r ) {
+ return new Thread( r, "MoveSmoothThread - " + mCounter++ );
+ }
+ }
+}
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 cc9250b150..631ac5de16 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
@@ -27,6 +27,8 @@ import com.mogo.service.fragmentmanager.IMogoFragmentManager;
*/
public class AppsListActivity extends MvpActivity< AppsListView, AppsListPresenter > implements AppsListView, FragmentStackTransactionListener {
+ private static final String TAG = "AppsListActivity";
+
private BottomSheetBehavior mBottomSheetBehavior;
private IMogoFragmentManager mMogoFragmentManager;
@@ -38,12 +40,13 @@ public class AppsListActivity extends MvpActivity< AppsListView, AppsListPresent
@Override
protected void onCreate( @Nullable Bundle savedInstanceState ) {
- overridePendingTransition( R.anim.module_apps_anim_enter, 0);
- getWindow().addFlags( WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
+ overridePendingTransition( R.anim.module_apps_anim_enter, 0 );
+ getWindow().addFlags( WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS );
if ( Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP ) {
getWindow().setStatusBarColor( Color.BLACK );
}
super.onCreate( savedInstanceState );
+ AppServiceHandler.getApis().getStatusManagerApi().setAppListUIShow( TAG, true );
}
@Override
@@ -53,8 +56,9 @@ public class AppsListActivity extends MvpActivity< AppsListView, AppsListPresent
@Override
protected void initViews() {
+
getSupportFragmentManager().beginTransaction()
- .add( R.id.module_apps_id_container, new AppsFragment() )
+ .replace( R.id.module_apps_id_container, new AppsFragment() )
.commitAllowingStateLoss();
mBottomSheetBehavior = BottomSheetBehavior.from( findViewById( R.id.module_apps_id_container ) );
@@ -74,14 +78,14 @@ public class AppsListActivity extends MvpActivity< AppsListView, AppsListPresent
} );
mBottomSheetBehavior.setState( BottomSheetBehavior.STATE_EXPANDED );
- mMogoFragmentManager = ( IMogoFragmentManager ) ARouter.getInstance().build( MogoServicePaths.PATH_FRAGMENT_MANAGER ).navigation( this );
+ mMogoFragmentManager = AppServiceHandler.getApis().getFragmentManagerApi();
mMogoFragmentManager.addMainFragmentStackTransactionListener( this );
}
@NonNull
@Override
protected AppsListPresenter createPresenter() {
- return new AppsListPresenter(this);
+ return new AppsListPresenter( this );
}
@Override
@@ -100,12 +104,13 @@ public class AppsListActivity extends MvpActivity< AppsListView, AppsListPresent
@Override
public void closeAppsPanel() {
finish();
- overridePendingTransition( R.anim.module_apps_anim_enter, R.anim.module_apps_anim_exit);
+ overridePendingTransition( R.anim.module_apps_anim_enter, R.anim.module_apps_anim_exit );
}
@Override
protected void onDestroy() {
super.onDestroy();
+ AppServiceHandler.getApis().getStatusManagerApi().setAppListUIShow( TAG, false );
mMogoFragmentManager.removeMainFragmentStackTransactionListener( this );
mMogoFragmentManager = null;
mBottomSheetBehavior = null;
diff --git a/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/AppsPresenter.java b/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/AppsPresenter.java
index d7705da71e..942568fc7f 100644
--- a/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/AppsPresenter.java
+++ b/modules/mogo-module-apps/src/main/java/com/mogo/module/apps/AppsPresenter.java
@@ -72,7 +72,6 @@ public class AppsPresenter extends Presenter< AppsView > {
mAnalytics = mApis.getAnalyticsApi();
mMogoStatusManager = mApis.getStatusManagerApi();
- mMogoStatusManager.setAppListUIShow( TAG, true );
}
private void renderAppsList() {
@@ -202,7 +201,6 @@ public class AppsPresenter extends Presenter< AppsView > {
@Override
public void onDestroy( @NonNull LifecycleOwner owner ) {
super.onDestroy( owner );
- mMogoStatusManager.setAppListUIShow( TAG, false );
AppsListChangedLiveData.getInstance().release();
mView = null;
mLauncher.destroy();
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 e4753b0f9d..a9ba5a2fef 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
@@ -24,6 +24,6 @@
140px
140px
30px
- 110px
- 110px
+ 100px
+ 100px
\ 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 c9efac23e8..679816b821 100644
--- a/modules/mogo-module-apps/src/main/res/values/dimens.xml
+++ b/modules/mogo-module-apps/src/main/res/values/dimens.xml
@@ -24,6 +24,6 @@
78px
78px
17px
- 70px
- 70px
+ 60px
+ 60px
\ No newline at end of file
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/map/MapCenterPointStrategy.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/map/MapCenterPointStrategy.java
index daec2f73d1..42426edf27 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/map/MapCenterPointStrategy.java
+++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/map/MapCenterPointStrategy.java
@@ -56,9 +56,9 @@ public class MapCenterPointStrategy {
{
// 导航场景 vs 道路事件展示场景,定位视图右下角偏下
Map< Integer, MapCenterPoint > naviWithRoadEvent = new HashMap<>();
- naviWithRoadEvent.put( CarSeries.CAR_SERIES_D80X, new MapCenterPoint( 0.669444444444444, 0.68333333333D ) );
- naviWithRoadEvent.put( CarSeries.CAR_SERIES_E84X, new MapCenterPoint( 0.734375D, 0.68333333333D ) );
- naviWithRoadEvent.put( CarSeries.CAR_SERIES_E84XCD, new MapCenterPoint( 0.734375D, 0.68333333333D ) );
+ naviWithRoadEvent.put( CarSeries.CAR_SERIES_D80X, new MapCenterPoint( 0.669444444444444, 0.73936170212766D ) );
+ naviWithRoadEvent.put( CarSeries.CAR_SERIES_E84X, new MapCenterPoint( 0.734375D, 0.73936170212766D ) );
+ naviWithRoadEvent.put( CarSeries.CAR_SERIES_E84XCD, new MapCenterPoint( 0.734375D, 0.73936170212766D ) );
naviWithRoadEvent.put( CarSeries.CAR_SERIES_F80X, new MapCenterPoint( 0.705208333D, 0.683333333333D ) );
sStrategies.put( Scene.NAVI_WITH_ROAD_EVENT, naviWithRoadEvent );
}
@@ -76,9 +76,9 @@ public class MapCenterPointStrategy {
{
// 巡航场景 vs 道路事件展示场景
Map< Integer, MapCenterPoint > aimlessWithRoadEvent = new HashMap<>();
- aimlessWithRoadEvent.put( CarSeries.CAR_SERIES_D80X, new MapCenterPoint( 0.669444444444444, 0.585 ) );
- aimlessWithRoadEvent.put( CarSeries.CAR_SERIES_E84X, new MapCenterPoint( 0.734375D, 0.585 ) );
- aimlessWithRoadEvent.put( CarSeries.CAR_SERIES_E84XCD, new MapCenterPoint( 0.734375D, 0.585 ) );
+ aimlessWithRoadEvent.put( CarSeries.CAR_SERIES_D80X, new MapCenterPoint( 0.669444444444444, 0.68617 ) );
+ aimlessWithRoadEvent.put( CarSeries.CAR_SERIES_E84X, new MapCenterPoint( 0.734375D, 0.68617 ) );
+ aimlessWithRoadEvent.put( CarSeries.CAR_SERIES_E84XCD, new MapCenterPoint( 0.734375D, 0.68617 ) );
aimlessWithRoadEvent.put( CarSeries.CAR_SERIES_F80X, new MapCenterPoint( 0.705208333D, 0.599074074D ) );
sStrategies.put( Scene.AIMLESS_WITH_ROAD_EVENT, aimlessWithRoadEvent );
}
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 9648fe49a8..f49414dd40 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
@@ -49,7 +49,6 @@ import com.mogo.service.module.IMogoRegisterCenter;
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
import com.mogo.service.statusmanager.IMogoStatusManager;
import com.mogo.service.statusmanager.StatusDescriptor;
-import com.mogo.utils.AppUtils;
import com.mogo.utils.LaunchUtils;
import com.mogo.utils.ResourcesHelper;
import com.mogo.utils.UiThreadHandler;
@@ -184,6 +183,8 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
private List< View > demoCache = new ArrayList<>();
+ private int[] heights = new int[]{100,200,300};
+
@Override
protected void initViews() {
mApis = ( IMogoServiceApis ) ARouter.getInstance().build( MogoServicePaths.PATH_SERVICE_APIS ).navigation( getContext() );
@@ -200,9 +201,12 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
// // todo 测试动画
// View v = LayoutInflater.from(getContext()).inflate(R.layout.demo_top, null);
// TextView tv = v.findViewById(R.id.tvIndex);
-// tv.setText(demoCache.size() + ": " + v);
+// Random random = new Random();
+// int height = heights[random.nextInt(3)];
+// tv.setText(demoCache.size()+" height: "+height + ": " + v);
// demoCache.add(v);
-// mApis.getTopViewManager().addView(v, new IMogoTopViewStatusListener() {
+// LayoutParams params = new ViewGroup.LayoutParams(LayoutParams.MATCH_PARENT, height);
+// mApis.getTopViewManager().addView(v, params,new IMogoTopViewStatusListener() {
// @Override
// public void onViewAdded(View view) {
// Logger.d(TAG, "onViewAdded: " + view);
@@ -212,6 +216,16 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
// public void onViewRemoved(View view) {
// Logger.d(TAG, "onViewRemoved: " + view);
// }
+//
+// @Override
+// public void beforeViewAddAnim(View view) {
+// Logger.d(TAG, "beforeViewAddAnim: " + view);
+// }
+//
+// @Override
+// public void beforeViewRemoveAnim(View view) {
+// Logger.d(TAG, "beforeViewRemoveAnim: " + view);
+// }
// });
// 原始逻辑
showShareDialog();
diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/navi/TopView.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/navi/TopView.java
index a4ef3f3a3e..0f98f21a68 100644
--- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/navi/TopView.java
+++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/navi/TopView.java
@@ -82,6 +82,12 @@ public class TopView extends FrameLayout {
});
}
+ @Override
+ public void onViewRemoved(View child) {
+ super.onViewRemoved(child);
+ Logger.d("TopView", "onViewRemoved: " + child);
+ }
+
public interface OnChildAddedListener {
/**
* 子view添加完成,但是并不确定已经绘制完成
diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/TopViewAnimHelper.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/TopViewAnimHelper.java
index 0b6ebc03de..01570674a2 100644
--- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/TopViewAnimHelper.java
+++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/TopViewAnimHelper.java
@@ -8,6 +8,7 @@ import android.transition.TransitionManager;
import android.util.ArrayMap;
import android.view.View;
import android.view.ViewGroup;
+import android.view.ViewGroup.LayoutParams;
import android.view.animation.BounceInterpolator;
import android.view.animation.OvershootInterpolator;
import android.widget.ImageView;
@@ -152,7 +153,7 @@ public class TopViewAnimHelper {
hideNaviView();
}
- private boolean isTopViewOut = true;
+ private volatile boolean isTopViewOut = true;
private List viewCaches = new ArrayList<>();
private Map statusListenerMap = new ArrayMap<>();
@@ -174,16 +175,45 @@ public class TopViewAnimHelper {
}
if (!viewCaches.contains(view)) {
// 判断此view是否已经增加到了顶部view,如果增加过就不增加了
+ view.setTranslationY(0);
statusListenerMap.put(view, statusListener);
Logger.d(TAG, "开始执行");
isTopViewOut = false;
if (topContainer.getChildCount() > 0) {
// 顶部view已经有了内容,新增内容无需整体布局变化,只是新增布局加个动画
viewCaches.add(view);
+
+ // 生硬的删掉上一个view
+ View lastView = topContainer.getChildAt(0);
+ if (statusListenerMap.get(lastView) != null) {
+ statusListenerMap.get(lastView).beforeViewRemoveAnim(lastView);
+ }
+ topContainer.removeView(lastView);
+ viewCaches.remove(lastView);
+ if (statusListenerMap.get(lastView) != null) {
+ statusListenerMap.remove(lastView).onViewRemoved(lastView);
+ }
+ // 如果高度变化,生硬的变化一下高度
+ Logger.d(TAG,"container.height: "+topContainer.getHeight());
+ if (topContainer.getHeight() != params.height) {
+ constraintSet.clone(topMotionLayout);
+ LayoutParams p = topContainer.getLayoutParams();
+ p.height = params.height;
+ topContainer.setLayoutParams(p);
+ constraintSet.connect(naviBg.getId(), ConstraintSet.TOP,
+ R.id.module_entrance_id_top_motion_layout, ConstraintSet.TOP,
+ computeNaviMarginTop(params.height));
+ constraintSet.applyTo(topMotionLayout);
+ Logger.d(TAG,"改变container的高度===");
+ }
+
view.setTranslationY(-(params.height));
topContainer.addView(view, params);
Logger.d(TAG, "顶部view已经有布局了,增加新增view滑入动画: " + view.getTranslationY() + " height:" +
" " + view.getHeight() + " paramsHeight: " + params.height);
+ if (statusListenerMap.get(view) != null) {
+ statusListenerMap.get(view).beforeViewAddAnim(view);
+ }
view.animate().translationY(0).setDuration(500).setListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animation) {
@@ -217,8 +247,13 @@ public class TopViewAnimHelper {
// tvNextRoad.setTextSize(getDimen(R.dimen.dp_34));
// }
topContainer.addView(view, params);
-
+ Logger.d(TAG, "整体进入==== view.visibility: " + view.getVisibility() + " view" +
+ ".position: (" + view.getX() + ", " + view.getY() + ") params.width: " + params.width + " params.height: " + params.height);
+ if (statusListenerMap.get(view) != null) {
+ statusListenerMap.get(view).beforeViewAddAnim(view);
+ }
topContainer.setChildAddedListener(child -> {
+ topContainer.setChildAddedListener(null);
if (naviBg.getVisibility() == View.VISIBLE) {
remainDistanceGroup.setVisibility(View.GONE);
remainTimeGroup.setVisibility(View.GONE);
@@ -253,7 +288,7 @@ public class TopViewAnimHelper {
constraintSet.connect(naviBg.getId(), ConstraintSet.TOP,
R.id.module_entrance_id_top_motion_layout, ConstraintSet.TOP,
- (int) getDimen(R.dimen.dp_316));
+ computeNaviMarginTop(params.height));
}
constraintSet.applyTo(topMotionLayout);
ivTurnIcon.getLayoutParams().height =
@@ -300,6 +335,9 @@ public class TopViewAnimHelper {
// 顶部view包含多个view,只推出当前view,不进行整体上移
Logger.d(TAG,
"小view退出: " + view.getTranslationY() + " height: " + view.getHeight());
+ if (statusListenerMap.get(view) != null) {
+ statusListenerMap.get(view).beforeViewRemoveAnim(view);
+ }
view.animate().translationY(-(view.getHeight())).setDuration(500).setListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animation) {
@@ -333,6 +371,9 @@ public class TopViewAnimHelper {
} else {
// 顶部view仅剩一个view,需要整体上移
currentAnimatingView = view;
+ if (statusListenerMap.get(view) != null) {
+ statusListenerMap.get(view).beforeViewRemoveAnim(view);
+ }
isTopViewOut = true;
// if (naviBg.getVisibility() == View.VISIBLE) {
// tvNextRoad.setTextSize(getDimen(R.dimen
@@ -441,7 +482,7 @@ public class TopViewAnimHelper {
(int) topMotionLayout.getContext().getResources().getDimension(R.dimen.dp_46));
constraintSet.connect(naviBg.getId(), ConstraintSet.TOP,
R.id.module_entrance_id_top_motion_layout, ConstraintSet.TOP,
- (int) getDimen(R.dimen.dp_316));
+ computeNaviMarginTop(topContainer.getHeight()));
// ivTurnIcon.getLayoutParams().height =
// (int) getDimen(R.dimen.module_ext_navi_info_panel_turn_icon_small_height);
// ivTurnIcon.getLayoutParams().width =
@@ -473,9 +514,9 @@ public class TopViewAnimHelper {
arriveTimeGroup.setVisibility(View.GONE);
int scene = 0;
if (isTopViewOut) {
- scene = Scene.AIMLESS_WITH_ROAD_EVENT;
- } else {
scene = Scene.AIMLESS;
+ } else {
+ scene = Scene.AIMLESS_WITH_ROAD_EVENT;
}
Logger.d(TAG, "hide navi setMapCenterPointByScene: " + scene);
MapCenterPointStrategy.setMapCenterPointByScene(mogoMapUIController, scene);
@@ -510,6 +551,12 @@ public class TopViewAnimHelper {
return (int) topMotionLayout.getContext().getResources().getDimension(resId);
}
+ private int computeNaviMarginTop(int height) {
+ int result = (int) (height - (getDimen(R.dimen.dp_350) - getDimen(R.dimen.dp_316)));
+ Logger.d(TAG, "computeNaviMarginTop: " + height + " result: " + result);
+ return result;
+ }
+
interface OnTopViewAnimSimpleListener {
void onAnimStart();
diff --git a/modules/mogo-module-main/src/main/java/com/mogo/module/main/EventDispatchCenter.java b/modules/mogo-module-main/src/main/java/com/mogo/module/main/EventDispatchCenter.java
index 48a0812257..937548ba6e 100644
--- a/modules/mogo-module-main/src/main/java/com/mogo/module/main/EventDispatchCenter.java
+++ b/modules/mogo-module-main/src/main/java/com/mogo/module/main/EventDispatchCenter.java
@@ -2,7 +2,6 @@ package com.mogo.module.main;
import android.content.Intent;
import android.location.Location;
-import android.text.TextUtils;
import android.view.MotionEvent;
import com.mogo.map.MogoLatLng;
@@ -21,20 +20,14 @@ import com.mogo.map.navi.MogoCongestionInfo;
import com.mogo.map.navi.MogoNaviInfo;
import com.mogo.map.navi.MogoTraffic;
import com.mogo.map.uicontroller.EnumMapUI;
-import com.mogo.module.common.entity.MarkerNoveltyInfo;
-import com.mogo.module.common.entity.MarkerShareMusic;
-import com.mogo.module.common.entity.MarkerShowEntity;
import com.mogo.module.main.registercenter.MogoRegisterCenterHandler;
-import com.mogo.module.service.MarkerServiceHandler;
import com.mogo.module.service.receiver.MogoReceiver;
import com.mogo.service.intent.IMogoIntentListener;
import com.mogo.service.intent.IMogoIntentManager;
import com.mogo.service.module.IMogoModuleLifecycle;
import com.mogo.utils.logger.Logger;
-import java.util.HashMap;
import java.util.Iterator;
-import java.util.Map;
/**
* @author congtaowang
@@ -83,7 +76,6 @@ public class EventDispatchCenter implements
IMogoMarkerClickListener listener = MogoRegisterCenterHandler.getInstance().getMarkerListener( marker.getOwner() );
if ( listener != null ) {
try {
- trackMarkerClickEvent( marker );
return listener.onMarkerClicked( marker );
} catch ( Exception e ) {
Logger.e( TAG, e, "error." );
@@ -92,28 +84,6 @@ public class EventDispatchCenter implements
return false;
}
- /**
- * marker 点击埋点
- *
- * @param marker
- */
- private void trackMarkerClickEvent( IMogoMarker marker ) {
- if ( marker == null || TextUtils.isEmpty( marker.getOwner() ) ) {
- return;
- }
- // 数据统计代码
- final Map< String, Object > properties = new HashMap<>();
- properties.put( "poitype", marker.getOwner() );
- MarkerShowEntity showEntity = ( MarkerShowEntity ) marker.getObject();
- Object bindObj = showEntity.getBindObj();
- if ( bindObj instanceof MarkerNoveltyInfo ) {
- properties.put( "contenttype", ( ( MarkerNoveltyInfo ) bindObj ).getPoiType() );
- } else if ( bindObj instanceof MarkerShareMusic ) {
- properties.put( "contenttype", ( ( MarkerShareMusic ) bindObj ).getShareType() + "" );
- }
- MarkerServiceHandler.getMogoAnalytics().track( "Launcher_Icon_Click", properties );
- }
-
@Override
public void onUpdateTraffic2( MogoTraffic traffic ) {
Iterator< IMogoAimlessModeListener > iterator = MogoRegisterCenterHandler.getInstance().getAimlessModeListeners();
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 73e215fa53..5553aeab37 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
@@ -147,6 +147,8 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
// 启动一些基本的服务:定位等
startBaseService();
+
+ Log.i( "timer", "cost " + ( System.currentTimeMillis() - start ) + "ms" );
} );
MogoModulesManager.getInstance().loadMapModule( R.id.module_main_id_map_fragment_container );
@@ -159,8 +161,6 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
hideLayout();
}
} );
-
- Log.i( "timer", "cost " + ( System.currentTimeMillis() - start ) + "ms" );
}
private void startBaseService() {
diff --git a/modules/mogo-module-main/src/main/res/layout/module_main_activity_main.xml b/modules/mogo-module-main/src/main/res/layout/module_main_activity_main.xml
index 96f61eca7b..1f9c30d179 100644
--- a/modules/mogo-module-main/src/main/res/layout/module_main_activity_main.xml
+++ b/modules/mogo-module-main/src/main/res/layout/module_main_activity_main.xml
@@ -9,13 +9,7 @@
-
-
-
+ android:layout_height="match_parent"/>
+
+
+
+
\ No newline at end of file
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java
index 8a7f1e1c06..9837155cae 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java
+++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java
@@ -647,6 +647,10 @@ public class MogoServices implements IMogoMapListener,
return;
}
+ if ( !mStatusManager.isMainPageOnResume() ) {
+ return;
+ }
+
if ( mStatusManager.isSearchUIShow() ) {
return;
}
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/Utils.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/Utils.java
index ef4534ac61..9978faf668 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/Utils.java
+++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/Utils.java
@@ -66,7 +66,7 @@ public class Utils {
}
public static void main( String[] args ) {
- double calculateLineDistance = calculateLineDistance( new MogoLatLng( 39.955533, 116.423262 ), new MogoLatLng( 39.955385, 116.414604 ) );
+ double calculateLineDistance = calculateLineDistance( new MogoLatLng( 39.968598, 116.411121 ), new MogoLatLng( 39.968598, 116.411121 ) );
System.out.println( "距离点 calculateLineDistance:" + calculateLineDistance );
}
}
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java
index e292dd6a94..064551593a 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java
+++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java
@@ -120,7 +120,11 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
Map< String, Object > properties = new HashMap<>();
if ( marker.getObject() instanceof MarkerShowEntity ) {
- properties.put( "sn", getCarSnFromMarker( marker ) );
+ final String sn = getCarSnFromMarker( marker );
+ if ( TextUtils.isEmpty( sn ) ) {
+ return false;
+ }
+ properties.put( "sn", sn );
if ( ( ( MarkerShowEntity ) marker.getObject() ).getBindObj() instanceof MarkerExploreWay ) {
MarkerExploreWay exploreWay = ( MarkerExploreWay ) ( ( MarkerShowEntity ) marker.getObject() ).getBindObj();
properties.put( "dbid", exploreWay.getInfoId() );
@@ -482,7 +486,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
} else if ( entity instanceof MarkerNoveltyInfo ) {
return ( ( MarkerNoveltyInfo ) entity ).getSn();
} else if ( entity instanceof MarkerExploreWay ) {
- return ( ( MarkerExploreWay ) entity ).getInfoId();
+ return ( ( MarkerExploreWay ) entity ).getUserInfo().getSn();
}
} catch ( Exception e ) {
@@ -844,6 +848,10 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
}
List< MogoLatLng > points = new ArrayList<>();
+
+ double lastLat = 0.0d;
+ double lastLon = 0.0d;
+
for ( int j = 0; j < poiList.size(); j++ ) {
MarkerCarPois poi = poiList.get( j );
if ( poi == null || poi.getCoordinates() == null && poi.getCoordinates().size() != 2 ) {
@@ -852,6 +860,14 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
try {
double lat = Double.valueOf( poi.getCoordinates().get( 1 ) + "" );
double lng = Double.valueOf( poi.getCoordinates().get( 0 ) + "" );
+
+ float distance = Utils.calculateLineDistance( lastLon, lastLat, lng, lat );
+ lastLon = lng;
+ lastLat = lat;
+ if ( distance < 0.2f ) {// 距离过短,认为静止不动
+ continue;
+ }
+
points.add( new MogoLatLng( lat, lng ) );
} catch ( Exception e ) {
}
@@ -859,6 +875,8 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
if ( points.size() >= 1 ) {
points.add( new MogoLatLng( markerLocation.getLat(), markerLocation.getLon() ) );
iMogoMarker.startSmooth( points, SMOOTH_DURATION );
+ } else {
+ Logger.d( TAG, "静止小车,但是有相同的连续坐标" );
}
}
@@ -892,7 +910,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
return MarkerServiceHandler.getMogoStatusManager().isSearchUIShow()
|| MarkerServiceHandler.getMogoStatusManager().isV2XShow()
|| !MarkerServiceHandler.getMogoStatusManager().isMainPageLaunched()
- || !MarkerServiceHandler.getMogoStatusManager().isMainPageLaunched();
+ || !MarkerServiceHandler.getMogoStatusManager().isMainPageOnResume();
}
private void runOnTargetThread( Runnable runnable ) {
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerView.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerView.java
index 9b7153b574..6d2d7affe2 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerView.java
+++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerView.java
@@ -24,8 +24,6 @@ import com.mogo.module.service.ServiceConst;
public class MapMarkerView extends MapMarkerBaseView {
private String TAG = "MapMarkerView";
- private ImageView ivBg;
-
public MapMarkerView( Context context ) {
super( context );
}
@@ -48,7 +46,6 @@ public class MapMarkerView extends MapMarkerBaseView {
LayoutInflater.from( context ).inflate( R.layout.view_map_marker, this );
ivIcon = findViewById( R.id.ivIcon );
ivCar = findViewById( R.id.ivCar );
- ivBg = findViewById( R.id.ivBg );
}
public void updateView( MarkerShowEntity markerShowEntity ) {
diff --git a/modules/mogo-module-service/src/main/res/drawable-xhdpi/module_service_ic_call.png b/modules/mogo-module-service/src/main/res/drawable-xhdpi/module_service_ic_call.png
index 89680bd182..9a9321b3a6 100644
Binary files a/modules/mogo-module-service/src/main/res/drawable-xhdpi/module_service_ic_call.png and b/modules/mogo-module-service/src/main/res/drawable-xhdpi/module_service_ic_call.png differ
diff --git a/modules/mogo-module-service/src/main/res/drawable/module_service_ic_call.png b/modules/mogo-module-service/src/main/res/drawable/module_service_ic_call.png
index 3f90fd4af5..a66ed29d09 100644
Binary files a/modules/mogo-module-service/src/main/res/drawable/module_service_ic_call.png and b/modules/mogo-module-service/src/main/res/drawable/module_service_ic_call.png differ
diff --git a/modules/mogo-module-service/src/main/res/layout/view_map_data_user_info_window.xml b/modules/mogo-module-service/src/main/res/layout/view_map_data_user_info_window.xml
index 5028bcbe89..0967298a46 100644
--- a/modules/mogo-module-service/src/main/res/layout/view_map_data_user_info_window.xml
+++ b/modules/mogo-module-service/src/main/res/layout/view_map_data_user_info_window.xml
@@ -7,14 +7,12 @@
android:background="@android:color/transparent"
android:gravity="center"
android:orientation="vertical"
- android:paddingStart="@dimen/dp_5"
- android:paddingEnd="@dimen/dp_5"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
-
-
+ android:layout_marginBottom="@dimen/module_service_marker_bubble_icon_marginBottom"
+ tools:src="@drawable/icon_map_marker_road_block_up" />
diff --git a/modules/mogo-module-service/src/main/res/layout/view_map_marker_info.xml b/modules/mogo-module-service/src/main/res/layout/view_map_marker_info.xml
index 1917bf59ae..028892962e 100644
--- a/modules/mogo-module-service/src/main/res/layout/view_map_marker_info.xml
+++ b/modules/mogo-module-service/src/main/res/layout/view_map_marker_info.xml
@@ -7,8 +7,6 @@
android:gravity="center"
android:orientation="vertical"
android:padding="1px"
- android:paddingStart="@dimen/dp_5"
- android:paddingEnd="@dimen/dp_5"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
117px
50px
50px
- 24px
+ 8px
1000px
390px
200px
200px
+ 10px
+ 10px
+ 100px
+ 80px
+ 80px
+ 24px
+ 20px
+ 120px
\ No newline at end of file
diff --git a/modules/mogo-module-service/src/main/res/values/dimens.xml b/modules/mogo-module-service/src/main/res/values/dimens.xml
index 451d9a661b..03b1e6650a 100644
--- a/modules/mogo-module-service/src/main/res/values/dimens.xml
+++ b/modules/mogo-module-service/src/main/res/values/dimens.xml
@@ -1,15 +1,23 @@
16dp
- 8dp
+ 4dp
56px
65px
27px
27px
- 14px
+ 4px
550px
208px
100px
100px
+ 100px
+ 10px
+ 54px
+ 44px
+ 44px
+ 14px
+ 12px
+ 64px
\ No newline at end of file
diff --git a/modules/mogo-module-share/src/main/java/com/mogo/module/share/manager/UploadHelper.kt b/modules/mogo-module-share/src/main/java/com/mogo/module/share/manager/UploadHelper.kt
index 545ab05cce..61fcc30ad9 100644
--- a/modules/mogo-module-share/src/main/java/com/mogo/module/share/manager/UploadHelper.kt
+++ b/modules/mogo-module-share/src/main/java/com/mogo/module/share/manager/UploadHelper.kt
@@ -2,6 +2,7 @@ package com.mogo.module.share.manager
import android.content.Context
import android.content.Intent
+import com.mogo.commons.debug.DebugConfig
import com.mogo.commons.voice.AIAssist
import com.mogo.module.share.ShareControl
import com.mogo.module.share.dialog.LaucherShareDialog
@@ -18,7 +19,9 @@ object UploadHelper {
TipToast.tip("正在上报,请稍后重试")
}else {
ServiceApisManager.serviceApis.statusManagerApi.setUploadingStatus("CARD_TYPE_ROAD_CONDITION", true)
- AIAssist.getInstance(context).speakTTSVoice("感谢分享,正在上传")
+ if(DebugConfig.getAIType() == DebugConfig.AI_TYPE_TXZ) {
+ AIAssist.getInstance(context).speakTTSVoice("感谢分享,正在上传")
+ }
Logger.d("UploadHelper", "upload ----> $type")
val intent = Intent()
intent.action = "com.zhidao.share.roadcondition.action"
diff --git a/services/mogo-service-api/src/main/java/com/mogo/service/windowview/IMogoTopViewStatusListener.java b/services/mogo-service-api/src/main/java/com/mogo/service/windowview/IMogoTopViewStatusListener.java
index db9df440b4..c3316b01ed 100644
--- a/services/mogo-service-api/src/main/java/com/mogo/service/windowview/IMogoTopViewStatusListener.java
+++ b/services/mogo-service-api/src/main/java/com/mogo/service/windowview/IMogoTopViewStatusListener.java
@@ -19,4 +19,16 @@ public interface IMogoTopViewStatusListener {
* @param view 移除的view
*/
void onViewRemoved(View view);
+
+ /**
+ * view添加动画开始之前
+ * @param view 添加的view
+ */
+ void beforeViewAddAnim(View view);
+
+ /**
+ * view 移除动画开始之前
+ * @param view 移除的view
+ */
+ void beforeViewRemoveAnim(View view);
}
diff --git a/services/mogo-service/src/main/java/com/mogo/service/impl/adas/MogoADASController.java b/services/mogo-service/src/main/java/com/mogo/service/impl/adas/MogoADASController.java
index 8e1839fde8..f877ac186b 100644
--- a/services/mogo-service/src/main/java/com/mogo/service/impl/adas/MogoADASController.java
+++ b/services/mogo-service/src/main/java/com/mogo/service/impl/adas/MogoADASController.java
@@ -74,16 +74,17 @@ public class MogoADASController implements IMogoADASController {
init( AbsMogoApplication.getApp() );
}
- if ( mStatusManager.isSearchUIShow() ) {
- return;
- }
- if ( !mStatusManager.isMainPageOnResume() ) {
- return;
- }
-
int delay = CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X ? 0 : 100;
UiThreadHandler.postDelayed( () -> {
+
+ if ( mStatusManager.isSearchUIShow() ) {
+ return;
+ }
+ if ( !mStatusManager.isMainPageOnResume() ) {
+ return;
+ }
+
try {
AutopilotServiceManage.getInstance().showAdas();
} catch ( Exception e ) {