Merge branch 'qa' into dev_change_dialog
This commit is contained in:
@@ -281,4 +281,3 @@ def getGitCommit() {
|
||||
assert !gitCommit.isEmpty()
|
||||
gitCommit
|
||||
}
|
||||
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
@@ -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
|
||||
# 广告资源位
|
||||
|
||||
@@ -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
|
||||
* <p>
|
||||
*/
|
||||
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++ );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
<dimen name="module_apps_navigator_icon_width">140px</dimen>
|
||||
<dimen name="module_apps_navigator_icon_height">140px</dimen>
|
||||
<dimen name="module_apps_navigator_icon_divider">30px</dimen>
|
||||
<dimen name="module_apps_voice_icon_width">110px</dimen>
|
||||
<dimen name="module_apps_voice_icon_height">110px</dimen>
|
||||
<dimen name="module_apps_voice_icon_width">100px</dimen>
|
||||
<dimen name="module_apps_voice_icon_height">100px</dimen>
|
||||
</resources>
|
||||
@@ -24,6 +24,6 @@
|
||||
<dimen name="module_apps_navigator_icon_width">78px</dimen>
|
||||
<dimen name="module_apps_navigator_icon_height">78px</dimen>
|
||||
<dimen name="module_apps_navigator_icon_divider">17px</dimen>
|
||||
<dimen name="module_apps_voice_icon_width">70px</dimen>
|
||||
<dimen name="module_apps_voice_icon_height">70px</dimen>
|
||||
<dimen name="module_apps_voice_icon_width">60px</dimen>
|
||||
<dimen name="module_apps_voice_icon_height">60px</dimen>
|
||||
</resources>
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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添加完成,但是并不确定已经绘制完成
|
||||
|
||||
@@ -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<View> viewCaches = new ArrayList<>();
|
||||
private Map<View, IMogoTopViewStatusListener> 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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -9,13 +9,7 @@
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_map_fragment_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_search_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</FrameLayout>
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_map_left_shadow_frame"
|
||||
@@ -54,6 +48,11 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_search_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_cover_up"
|
||||
android:layout_width="match_parent"
|
||||
@@ -61,4 +60,6 @@
|
||||
android:background="@drawable/module_main_launcher_bg"
|
||||
android:visibility="visible"
|
||||
tools:visibility="gone" />
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
@@ -647,6 +647,10 @@ public class MogoServices implements IMogoMapListener,
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !mStatusManager.isMainPageOnResume() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( mStatusManager.isSearchUIShow() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 ) {
|
||||
|
||||
@@ -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 ) {
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 7.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.0 KiB |
@@ -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">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/module_service_id_marker_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:layout_height="@dimen/module_services_info_window_height"
|
||||
android:background="@drawable/module_services_driver_blue_info"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -22,8 +20,9 @@
|
||||
|
||||
<com.mogo.service.imageloader.MogoImageView
|
||||
android:id="@+id/module_service_id_user_header"
|
||||
android:layout_width="@dimen/dp_76"
|
||||
android:layout_height="@dimen/dp_76"
|
||||
android:layout_width="@dimen/module_service_user_header_width"
|
||||
android:layout_height="@dimen/module_service_user_header_height"
|
||||
android:layout_marginLeft="2.5px"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
@@ -38,10 +37,10 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:ellipsize="end"
|
||||
android:minWidth="@dimen/module_service_content_minWidth"
|
||||
android:singleLine="true"
|
||||
android:minWidth="@dimen/dp_100"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="@dimen/sp_32"
|
||||
android:textSize="@dimen/module_service_content_textSize"
|
||||
app:layout_constraintStart_toEndOf="@+id/module_service_id_user_header"
|
||||
app:layout_constraintTop_toTopOf="@+id/module_service_id_user_header"
|
||||
app:layout_goneMarginRight="@dimen/dp_30"
|
||||
@@ -51,19 +50,21 @@
|
||||
android:id="@+id/module_service_id_tag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5px"
|
||||
android:background="@drawable/module_services_driver_type_blue_info"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="@dimen/sp_20"
|
||||
android:textSize="@dimen/module_service_tag_textSize"
|
||||
app:layout_constraintStart_toStartOf="@+id/module_service_id_content"
|
||||
app:layout_constraintTop_toBottomOf="@+id/module_service_id_content"
|
||||
tools:text="老司机" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/module_service_id_call"
|
||||
android:layout_width="@dimen/dp_85"
|
||||
android:layout_height="@dimen/dp_85"
|
||||
android:layout_width="@dimen/module_service_user_header_width"
|
||||
android:layout_height="@dimen/module_service_user_header_height"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:layout_marginRight="2.5px"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/module_service_ic_call"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
||||
@@ -12,22 +12,16 @@
|
||||
<FrameLayout
|
||||
android:id="@+id/clMarkerTopView"
|
||||
android:layout_width="@dimen/module_service_marker_bubble_width"
|
||||
android:background="@drawable/bg_map_marker_dark"
|
||||
android:layout_height="@dimen/module_service_marker_bubble_height">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBg"
|
||||
android:id="@+id/ivIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/bg_map_marker_dark" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivIcon"
|
||||
android:layout_width="@dimen/module_service_marker_bubble_icon_width"
|
||||
android:layout_height="@dimen/module_service_marker_bubble_icon_height"
|
||||
android:layout_marginTop="@dimen/module_service_marker_bubble_icon_marginTop"
|
||||
android:layout_gravity="center_horizontal"
|
||||
tools:src="@drawable/icon_map_marker_road_block_up"/>
|
||||
android:layout_marginBottom="@dimen/module_service_marker_bubble_icon_marginBottom"
|
||||
tools:src="@drawable/icon_map_marker_road_block_up" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -34,8 +32,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivIcon"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="@dimen/dp_15"
|
||||
android:visibility="invisible"
|
||||
|
||||
@@ -6,11 +6,19 @@
|
||||
<dimen name="module_service_marker_bubble_height">117px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_width">50px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_height">50px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_marginTop">24px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_marginBottom">8px</dimen>
|
||||
|
||||
<!-- 导航查看全程显示范围-->
|
||||
<dimen name="module_service_marker_bounds_leftMargin">1000px</dimen>
|
||||
<dimen name="module_service_marker_bounds_topMargin">390px</dimen>
|
||||
<dimen name="module_service_marker_bounds_bottomMargin">200px</dimen>
|
||||
<dimen name="module_service_marker_bounds_rightMargin">200px</dimen>
|
||||
<dimen name="module_services_info_window_paddingStart">10px</dimen>
|
||||
<dimen name="module_services_info_window_paddingEnd">10px</dimen>
|
||||
<dimen name="module_services_info_window_height">100px</dimen>
|
||||
<dimen name="module_service_user_header_width">80px</dimen>
|
||||
<dimen name="module_service_user_header_height">80px</dimen>
|
||||
<dimen name="module_service_content_textSize">24px</dimen>
|
||||
<dimen name="module_service_tag_textSize">20px</dimen>
|
||||
<dimen name="module_service_content_minWidth">120px</dimen>
|
||||
</resources>
|
||||
@@ -1,15 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="module_service_marker_anchor_size">16dp</dimen>
|
||||
<dimen name="module_service_marker_dot_marginTop">8dp</dimen>
|
||||
<dimen name="module_service_marker_dot_marginTop">4dp</dimen>
|
||||
<dimen name="module_service_marker_bubble_width">56px</dimen>
|
||||
<dimen name="module_service_marker_bubble_height">65px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_width">27px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_height">27px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_marginTop">14px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_marginBottom">4px</dimen>
|
||||
|
||||
<dimen name="module_service_marker_bounds_leftMargin">550px</dimen>
|
||||
<dimen name="module_service_marker_bounds_topMargin">208px</dimen>
|
||||
<dimen name="module_service_marker_bounds_bottomMargin">100px</dimen>
|
||||
<dimen name="module_service_marker_bounds_rightMargin">100px</dimen>
|
||||
<dimen name="module_services_info_window_paddingStart">100px</dimen>
|
||||
<dimen name="module_services_info_window_paddingEnd">10px</dimen>
|
||||
<dimen name="module_services_info_window_height">54px</dimen>
|
||||
<dimen name="module_service_user_header_width">44px</dimen>
|
||||
<dimen name="module_service_user_header_height">44px</dimen>
|
||||
<dimen name="module_service_content_textSize">14px</dimen>
|
||||
<dimen name="module_service_tag_textSize">12px</dimen>
|
||||
<dimen name="module_service_content_minWidth">64px</dimen>
|
||||
</resources>
|
||||
@@ -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"
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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 ) {
|
||||
|
||||
Reference in New Issue
Block a user