opt
@@ -3,6 +3,6 @@
|
||||
<corners android:radius="90dp" />
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:endColor="#2A2B38"
|
||||
android:startColor="#3F4057" />
|
||||
android:endColor="#F2161616"
|
||||
android:startColor="#F2161616" />
|
||||
</shape>
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_commons_toast_msg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="@dimen/module_commons_toast_marginLeft"
|
||||
@@ -17,9 +17,10 @@
|
||||
android:layout_marginBottom="@dimen/module_commons_toast_marginBottom"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxWidth="@dimen/module_commons_toast_minWidth"
|
||||
android:maxLines="2"
|
||||
android:minWidth="@dimen/module_commons_toast_maxWidth"
|
||||
android:maxWidth="@dimen/module_commons_toast_maxWidth"
|
||||
android:maxLength="20"
|
||||
android:maxLines="1"
|
||||
android:minWidth="@dimen/module_commons_toast_minWidth"
|
||||
android:textColor="#FFFF"
|
||||
android:textSize="@dimen/module_commons_toast_textSize"
|
||||
tools:text="测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试" />
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<dimen name="module_commons_toast_marginTop">16px</dimen>
|
||||
<dimen name="module_commons_toast_marginBottom">16px</dimen>
|
||||
<dimen name="module_commons_toast_textSize">22px</dimen>
|
||||
<dimen name="module_commons_toast_maxWidth">75px</dimen>
|
||||
<dimen name="module_commons_toast_minWidth">500px</dimen>
|
||||
<dimen name="module_commons_toast_y_offset">108px</dimen>
|
||||
<dimen name="module_commons_toast_minWidth">371px</dimen>
|
||||
<dimen name="module_commons_toast_maxWidth">500px</dimen>
|
||||
<dimen name="module_commons_toast_y_offset">72px</dimen>
|
||||
</resources>
|
||||
@@ -5,9 +5,9 @@
|
||||
<dimen name="module_commons_toast_marginTop">32px</dimen>
|
||||
<dimen name="module_commons_toast_marginBottom">32px</dimen>
|
||||
<dimen name="module_commons_toast_textSize">40px</dimen>
|
||||
<dimen name="module_commons_toast_maxWidth">150px</dimen>
|
||||
<dimen name="module_commons_toast_minWidth">900px</dimen>
|
||||
<dimen name="module_commons_toast_y_offset">172px</dimen>
|
||||
<dimen name="module_commons_toast_minWidth">698px</dimen>
|
||||
<dimen name="module_commons_toast_maxWidth">900px</dimen>
|
||||
<dimen name="module_commons_toast_y_offset">130px</dimen>
|
||||
</resources>
|
||||
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
<dimen name="module_commons_toast_marginTop">32px</dimen>
|
||||
<dimen name="module_commons_toast_marginBottom">32px</dimen>
|
||||
<dimen name="module_commons_toast_textSize">40px</dimen>
|
||||
<dimen name="module_commons_toast_maxWidth">150px</dimen>
|
||||
<dimen name="module_commons_toast_minWidth">900px</dimen>
|
||||
<dimen name="module_commons_toast_y_offset">172px</dimen>
|
||||
<dimen name="module_commons_toast_minWidth">698px</dimen>
|
||||
<dimen name="module_commons_toast_maxWidth">900px</dimen>
|
||||
<dimen name="module_commons_toast_y_offset">130px</dimen>
|
||||
</resources>
|
||||
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ MOGO_MODULE_GUIDE_VERSION=1.0.0
|
||||
|
||||
## 工程外部模块
|
||||
# 探路
|
||||
MOGO_MODULE_TANLU_VERSION=1.0.3.2
|
||||
MOGO_MODULE_TANLU_VERSION=1.0.4.2
|
||||
# 车聊聊
|
||||
CARCHATTING_VERSION=1.0.3
|
||||
# 车聊聊接口
|
||||
@@ -68,7 +68,7 @@ MOGO_MODULE_ONLINECAR_VERSION=1.0.3.1
|
||||
# v2x
|
||||
MOGO_MODULE_V2X_VERSION=1.0.3.2
|
||||
# 媒体卡片
|
||||
MOGO_MODULE_MEDIA_VERSION=1.0.3
|
||||
MOGO_MODULE_MEDIA_VERSION=1.0.4
|
||||
# 推送
|
||||
MOGO_MODULE_PUSH_VERSION=1.0.1
|
||||
# 广告资源位
|
||||
|
||||
@@ -39,10 +39,12 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.mogoutils
|
||||
implementation rootProject.ext.dependencies.mogomapapi
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
implementation rootProject.ext.dependencies.mogomapapi
|
||||
} else {
|
||||
implementation project(':foudations:mogo-utils')
|
||||
implementation project(':libraries:mogo-map-api')
|
||||
implementation project(':foudations:mogo-commons')
|
||||
implementation project(':services:mogo-service-api')
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,14 +39,14 @@ public class MapCenterPointStrategy {
|
||||
// 导航场景,定位视图右下角偏下
|
||||
Map< Integer, MapCenterPoint > navi = new HashMap<>();
|
||||
navi.put( CarSeries.CAR_SERIES_D80X, new MapCenterPoint( 0.7734375D, 0.65D ) );
|
||||
navi.put( CarSeries.CAR_SERIES_F80X, new MapCenterPoint( 0.775521D, 0.6759259D ) );
|
||||
navi.put( CarSeries.CAR_SERIES_F80X, new MapCenterPoint( 0.775521D, 0.661165D ) );
|
||||
sStrategies.put( Scene.NAVI, navi );
|
||||
|
||||
|
||||
// 巡航场景,定位视图右下角偏下
|
||||
Map< Integer, MapCenterPoint > aimless = new HashMap<>();
|
||||
aimless.put( CarSeries.CAR_SERIES_D80X, new MapCenterPoint( 0.677734375D, 0.54D ) );
|
||||
aimless.put( CarSeries.CAR_SERIES_F80X, new MapCenterPoint( 0.6963541D, 0.6833333D ) );
|
||||
aimless.put( CarSeries.CAR_SERIES_F80X, new MapCenterPoint( 0.6963541D, 0.558737D ) );
|
||||
sStrategies.put( Scene.AIMLESS, aimless );
|
||||
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ import com.mogo.module.service.receiver.MogoReceiver;
|
||||
import com.mogo.module.service.refresh.AutoRefreshStrategy;
|
||||
import com.mogo.module.service.refresh.CustomRefreshStrategy;
|
||||
import com.mogo.module.service.refresh.RefreshObject;
|
||||
import com.mogo.module.service.strategy.CarIconDisplayStrategy;
|
||||
import com.mogo.service.adas.IMogoADASController;
|
||||
import com.mogo.service.cardmanager.IMogoCardManager;
|
||||
import com.mogo.service.fragmentmanager.FragmentStackTransactionListener;
|
||||
@@ -60,6 +61,7 @@ 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.TipToast;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.WorkThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
@@ -668,22 +670,18 @@ public class MogoServices implements IMogoMapListener,
|
||||
}
|
||||
break;
|
||||
case SEEK_HELPING:
|
||||
if ( isTrue ) {
|
||||
mUiController.setCarCursorOption( new CarCursorOption.Builder().carCursorRes( R.drawable.module_service_ic_seek_helping ).build() );
|
||||
} else {
|
||||
mUiController.setCarCursorOption( null );
|
||||
}
|
||||
CarIconDisplayStrategy.getInstance().changeCarIconStatus( mUiController, isTrue );
|
||||
notifySeekHelpingStatusChanged( isTrue );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void notifySeekHelpingStatusChanged( boolean open ) {
|
||||
private void notifySeekHelpingStatusChanged( boolean seekHelpingStatus ) {
|
||||
Intent intent = new Intent( "com.mogo.launcher.adas.app" );
|
||||
try {
|
||||
JSONObject data = new JSONObject();
|
||||
data.put( "object", "辅助驾驶" );
|
||||
data.put( "action", open ? "2" : "1" );
|
||||
data.put( "action", seekHelpingStatus ? "2" : "1" );
|
||||
data.put( "des", "自身故障报警" );
|
||||
data.put( "v2x_warning_type", "20007" );// 后台返回
|
||||
intent.putExtra( "data", data.toString() );
|
||||
@@ -861,13 +859,25 @@ public class MogoServices implements IMogoMapListener,
|
||||
}, 2_000L );
|
||||
}
|
||||
} else if ( MogoReceiver.ACTION_MOCK.equals( command ) ) {
|
||||
|
||||
if ( !DebugConfig.isDebug() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
final int oper = intent.getIntExtra( "oper", -1 );
|
||||
switch ( oper ) {
|
||||
case 1:
|
||||
mUiController.showMyLocation( true );
|
||||
break;
|
||||
case 2:
|
||||
mStatusManager.setSeekHelping( TAG, false );
|
||||
boolean status = intent.getBooleanExtra( "status", false );
|
||||
mStatusManager.setSeekHelping( TAG, status );
|
||||
break;
|
||||
case 3:
|
||||
String msg = intent.getStringExtra( "msg" );
|
||||
if ( !TextUtils.isEmpty( msg ) ) {
|
||||
TipToast.shortTip( msg );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -904,11 +914,13 @@ public class MogoServices implements IMogoMapListener,
|
||||
if ( !mStatusManager.isMainPageOnResume() ) {
|
||||
return;
|
||||
}
|
||||
if ( mStatusManager.isSeekHelping() ) {
|
||||
return;
|
||||
}
|
||||
if ( mUiController.getCurrentUiMode() != EnumMapUI.NorthUP_2D ) {
|
||||
return;
|
||||
}
|
||||
UiThreadHandler.post( () -> {
|
||||
|
||||
mUiController.showMyLocation( inflateCursorView( degree ) );
|
||||
} );
|
||||
}
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
package com.mogo.module.service.strategy;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
|
||||
import com.mogo.map.uicontroller.CarCursorOption;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.module.common.utils.CarSeries;
|
||||
import com.mogo.module.service.R;
|
||||
import com.mogo.utils.WorkThreadHandler;
|
||||
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-04-16
|
||||
* <p>
|
||||
* 上报故障求助之后自车的图标显示策略
|
||||
*/
|
||||
public class CarIconDisplayStrategy {
|
||||
|
||||
public static final int MSG_SEEK_HELPING_ANIM = 2000;
|
||||
|
||||
// F 系列才有这个帧动画
|
||||
public static final int[] sFrame = {
|
||||
R.drawable.module_service_ic_seek_helping_00000,
|
||||
R.drawable.module_service_ic_seek_helping_00001,
|
||||
R.drawable.module_service_ic_seek_helping_00002,
|
||||
R.drawable.module_service_ic_seek_helping_00003,
|
||||
R.drawable.module_service_ic_seek_helping_00004,
|
||||
R.drawable.module_service_ic_seek_helping_00005,
|
||||
R.drawable.module_service_ic_seek_helping_00006,
|
||||
R.drawable.module_service_ic_seek_helping_00007,
|
||||
R.drawable.module_service_ic_seek_helping_00008,
|
||||
R.drawable.module_service_ic_seek_helping_00009,
|
||||
R.drawable.module_service_ic_seek_helping_00010,
|
||||
R.drawable.module_service_ic_seek_helping_00011,
|
||||
R.drawable.module_service_ic_seek_helping_00012,
|
||||
R.drawable.module_service_ic_seek_helping_00013,
|
||||
R.drawable.module_service_ic_seek_helping_00014,
|
||||
R.drawable.module_service_ic_seek_helping_00015,
|
||||
R.drawable.module_service_ic_seek_helping_00016,
|
||||
R.drawable.module_service_ic_seek_helping_00017,
|
||||
R.drawable.module_service_ic_seek_helping_00018,
|
||||
R.drawable.module_service_ic_seek_helping_00019,
|
||||
R.drawable.module_service_ic_seek_helping_00020,
|
||||
R.drawable.module_service_ic_seek_helping_00021,
|
||||
R.drawable.module_service_ic_seek_helping_00022,
|
||||
R.drawable.module_service_ic_seek_helping_00023,
|
||||
R.drawable.module_service_ic_seek_helping_00024,
|
||||
R.drawable.module_service_ic_seek_helping_00025,
|
||||
R.drawable.module_service_ic_seek_helping_00026,
|
||||
R.drawable.module_service_ic_seek_helping_00027,
|
||||
R.drawable.module_service_ic_seek_helping_00028,
|
||||
R.drawable.module_service_ic_seek_helping_00029,
|
||||
R.drawable.module_service_ic_seek_helping_00030,
|
||||
R.drawable.module_service_ic_seek_helping_00031,
|
||||
R.drawable.module_service_ic_seek_helping_00032,
|
||||
R.drawable.module_service_ic_seek_helping_00033,
|
||||
R.drawable.module_service_ic_seek_helping_00034,
|
||||
R.drawable.module_service_ic_seek_helping_00035,
|
||||
R.drawable.module_service_ic_seek_helping_00036,
|
||||
R.drawable.module_service_ic_seek_helping_00037,
|
||||
R.drawable.module_service_ic_seek_helping_00038,
|
||||
R.drawable.module_service_ic_seek_helping_00039,
|
||||
R.drawable.module_service_ic_seek_helping_00040,
|
||||
R.drawable.module_service_ic_seek_helping_00041,
|
||||
R.drawable.module_service_ic_seek_helping_00042,
|
||||
R.drawable.module_service_ic_seek_helping_00043,
|
||||
R.drawable.module_service_ic_seek_helping_00044,
|
||||
R.drawable.module_service_ic_seek_helping_00045,
|
||||
R.drawable.module_service_ic_seek_helping_00046,
|
||||
R.drawable.module_service_ic_seek_helping_00047,
|
||||
R.drawable.module_service_ic_seek_helping_00048,
|
||||
R.drawable.module_service_ic_seek_helping_00049,
|
||||
R.drawable.module_service_ic_seek_helping_00050,
|
||||
R.drawable.module_service_ic_seek_helping_00051,
|
||||
R.drawable.module_service_ic_seek_helping_00052,
|
||||
R.drawable.module_service_ic_seek_helping_00053,
|
||||
R.drawable.module_service_ic_seek_helping_00054,
|
||||
R.drawable.module_service_ic_seek_helping_00055,
|
||||
R.drawable.module_service_ic_seek_helping_00056,
|
||||
R.drawable.module_service_ic_seek_helping_00057,
|
||||
R.drawable.module_service_ic_seek_helping_00058,
|
||||
R.drawable.module_service_ic_seek_helping_00059,
|
||||
R.drawable.module_service_ic_seek_helping_00060,
|
||||
R.drawable.module_service_ic_seek_helping_00061,
|
||||
R.drawable.module_service_ic_seek_helping_00062,
|
||||
R.drawable.module_service_ic_seek_helping_00063,
|
||||
R.drawable.module_service_ic_seek_helping_00064
|
||||
};
|
||||
|
||||
private static volatile CarIconDisplayStrategy sInstance;
|
||||
private IMogoMapUIController mController;
|
||||
|
||||
private CarIconDisplayStrategy() {
|
||||
mOption = new CarCursorOption.Builder().carCursorRes( R.drawable.module_service_ic_seek_helping ).build();
|
||||
}
|
||||
|
||||
public static CarIconDisplayStrategy getInstance() {
|
||||
if ( sInstance == null ) {
|
||||
synchronized ( CarIconDisplayStrategy.class ) {
|
||||
if ( sInstance == null ) {
|
||||
sInstance = new CarIconDisplayStrategy();
|
||||
}
|
||||
}
|
||||
}
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public synchronized void release() {
|
||||
sInstance = null;
|
||||
}
|
||||
|
||||
private Handler mSeekHelpingHandler;
|
||||
private int mCounter = 0;
|
||||
private boolean mStopStatus = true;
|
||||
private CarCursorOption mOption;
|
||||
|
||||
public void changeCarIconStatus( IMogoMapUIController controller, boolean seekHelpingStatus ) {
|
||||
mController = controller;
|
||||
if ( CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X ) {
|
||||
if ( seekHelpingStatus ) {
|
||||
playSeekHelpingAnim();
|
||||
} else {
|
||||
stopSeekHelpingAnim();
|
||||
}
|
||||
} else {
|
||||
if ( seekHelpingStatus ) {
|
||||
controller.setCarCursorOption( mOption );
|
||||
} else {
|
||||
controller.setCarCursorOption( null );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void playSeekHelpingAnim() {
|
||||
initHandler();
|
||||
mStopStatus = false;
|
||||
Message msg = Message.obtain();
|
||||
msg.what = MSG_SEEK_HELPING_ANIM;
|
||||
msg.arg1 = mCounter++;
|
||||
mSeekHelpingHandler.sendMessageDelayed( msg, 100 );
|
||||
}
|
||||
|
||||
private void initHandler() {
|
||||
if ( mSeekHelpingHandler != null ) {
|
||||
return;
|
||||
}
|
||||
mSeekHelpingHandler = new Handler( WorkThreadHandler.getInstance().getLooper() ) {
|
||||
@Override
|
||||
public void handleMessage( Message msg ) {
|
||||
super.handleMessage( msg );
|
||||
if ( mStopStatus ) {
|
||||
mSeekHelpingHandler.removeMessages( MSG_SEEK_HELPING_ANIM );
|
||||
mCounter = 0;
|
||||
mController.setCarCursorOption( null );
|
||||
return;
|
||||
}
|
||||
switch ( msg.what ) {
|
||||
case MSG_SEEK_HELPING_ANIM:
|
||||
mOption.setCarCursorRes( sFrame[msg.arg1 % sFrame.length] );
|
||||
mController.setCarCursorOption( mOption );
|
||||
playSeekHelpingAnim();
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private void stopSeekHelpingAnim() {
|
||||
mStopStatus = true;
|
||||
if ( mSeekHelpingHandler == null ) {
|
||||
return;
|
||||
}
|
||||
mCounter = 0;
|
||||
mSeekHelpingHandler.removeMessages( MSG_SEEK_HELPING_ANIM );
|
||||
mController.setCarCursorOption( null );
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 20 KiB |