+
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index dd70785bb6..a4902d69a3 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -300,7 +300,7 @@ dependencies {
releaseImplementation project(':modules:mogo-module-gps-simulator-noop')
implementation project(':modules:mogo-module-media')
implementation project(':modules:mogo-module-service')
-// implementation project(':modules:mogo-module-splash')
+ implementation project(':modules:mogo-module-splash')
// 事件面板分渠道引用
d82xImplementation project(':modules:mogo-module-event-panel-noop')
em1Implementation project(':modules:mogo-module-event-panel-noop')
diff --git a/gradle.properties b/gradle.properties
index 72b5712428..da46466c07 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -57,7 +57,7 @@ MOGO_MODULE_MAIN_INDEPENDENT_VERSION = 1.2.1.17
## 工程外部模块
# 探路
-MOGO_MODULE_TANLU_VERSION=1.3.0.2
+MOGO_MODULE_TANLU_VERSION=1.3.0.3-byd
# 车聊聊
CARCHATTING_VERSION=1.3.2
# 车聊聊接口
@@ -77,7 +77,7 @@ MOGO_MODULE_PUSH_NOOP_VERSION=1.1.5.5
# 广告资源位
MOGO_MODULE_AD_CARD_VERSION=1.0.1
# 探路上报和分享模块
-TANLULIB_VERSION=1.3.0.2
+TANLULIB_VERSION=1.3.0.3-byd
MOGO_MODULE_EVENT_PANEL_VERSION = 1.0.0-SNAPSHOT
MOGO_MODULE_EVENT_PANEL_NOOP_VERSION = 1.0.0-SNAPSHOT
#左侧面板模块
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/dialog/BaseFloatDialog.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/dialog/BaseFloatDialog.java
index 3a66bd5939..58eb4cab55 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/dialog/BaseFloatDialog.java
+++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/dialog/BaseFloatDialog.java
@@ -6,6 +6,7 @@ import android.view.WindowManager;
import androidx.annotation.NonNull;
+import com.mogo.commons.debug.DebugConfig;
import com.mogo.module.common.R;
/**
@@ -20,7 +21,9 @@ public class BaseFloatDialog extends Dialog {
public BaseFloatDialog(@NonNull Context context, int themeResId) {
super(context, themeResId);
- addFlag();
+ if(DebugConfig.getCarMachineType() != DebugConfig.CAR_MACHINE_TYPE_BYD) {
+ addFlag();
+ }
}
private void addFlag() {
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 369370088f..203580640d 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
@@ -6,7 +6,10 @@ import android.os.Bundle;
import android.util.Log;
import android.text.TextUtils;
import android.util.TypedValue;
+import android.view.LayoutInflater;
import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
@@ -49,6 +52,7 @@ 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.service.windowview.IMogoTopViewStatusListener;
import com.mogo.utils.LaunchUtils;
import com.mogo.utils.ResourcesHelper;
import com.mogo.utils.UiThreadHandler;
@@ -58,6 +62,7 @@ import com.zhidao.roadcondition.service.DelayService;
import java.util.HashMap;
import java.util.Map;
+import java.util.Random;
/**
@@ -66,7 +71,7 @@ import java.util.Map;
*
* 描述
*/
-public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresenter >
+public class EntranceFragment extends MvpFragment
implements EntranceView,
IMogoNaviListener,
IMogoMapListener,
@@ -128,10 +133,10 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
private Runnable mLockCarRunnable = new Runnable() {
@Override
public void run() {
- if ( !mStatusManager.isDisplayOverview() ) {
+ if (!mStatusManager.isDisplayOverview()) {
return;
}
- mStatusManager.setDisplayOverview( TAG, false );
+ mStatusManager.setDisplayOverview(TAG, false);
mMApUIController.recoverLockMode();
}
};
@@ -145,180 +150,186 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
@Override
protected void initViews() {
- mApis = ( IMogoServiceApis ) ARouter.getInstance().build( MogoServicePaths.PATH_SERVICE_APIS ).navigation( getContext() );
+ mApis = (IMogoServiceApis) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation(getContext());
- mEntrancePresenter = new EntrancePresenter( getContext(), this );
+ mEntrancePresenter = new EntrancePresenter(getContext(), this);
mMogoFragmentManager = mApis.getFragmentManagerApi();
mStatusManager = mApis.getStatusManagerApi();
- mUploadRoadCondition = findViewById( R.id.module_entrance_id_upload_road_condition );
- mUpload = findViewById( R.id.module_entrance_id_upload );
- mUploading = findViewById( R.id.module_entrance_id_uploading );
- mUploadRoadCondition.setOnClickListener( view -> {
+ mUploadRoadCondition = findViewById(R.id.module_entrance_id_upload_road_condition);
+ mUpload = findViewById(R.id.module_entrance_id_upload);
+ mUploading = findViewById(R.id.module_entrance_id_uploading);
+ mUploadRoadCondition.setOnClickListener(view -> {
showShareDialog();
- } );
+ });
- mDisplayOverview = findViewById( R.id.module_ext_id_display_overview );
- mDisplayOverviewText = findViewById( R.id.module_ext_id_display_overview_text );
- mDisplayOverviewIcon = findViewById( R.id.module_ext_id_display_overview_icon );
- mDisplayOverview.setOnClickListener( view -> {
- if ( !mStatusManager.isDisplayOverview() ) {
- mMApUIController.displayOverview( mDisplayOverviewBounds );
- UiThreadHandler.removeCallbacks( mLockCarRunnable );
- UiThreadHandler.postDelayed( mLockCarRunnable, 20_000 );
+ mDisplayOverview = findViewById(R.id.module_ext_id_display_overview);
+ mDisplayOverviewText = findViewById(R.id.module_ext_id_display_overview_text);
+ mDisplayOverviewIcon = findViewById(R.id.module_ext_id_display_overview_icon);
+ mDisplayOverview.setOnClickListener(view -> {
+ if (!mStatusManager.isDisplayOverview()) {
+ mMApUIController.displayOverview(mDisplayOverviewBounds);
+ UiThreadHandler.removeCallbacks(mLockCarRunnable);
+ UiThreadHandler.postDelayed(mLockCarRunnable, 20_000);
} else {
mMApUIController.recoverLockMode();
- UiThreadHandler.removeCallbacks( mLockCarRunnable );
+ UiThreadHandler.removeCallbacks(mLockCarRunnable);
}
- mStatusManager.setDisplayOverview( TAG, !mStatusManager.isDisplayOverview() );
- } );
+ mStatusManager.setDisplayOverview(TAG, !mStatusManager.isDisplayOverview());
+ });
- mMove2CurrentLocation = findViewById( R.id.module_entrance_id_move2_current_location );
- mMove2CurrentLocation.setOnClickListener( view -> {
+ mMove2CurrentLocation = findViewById(R.id.module_entrance_id_move2_current_location);
+ mMove2CurrentLocation.setOnClickListener(view -> {
final MogoLocation location = mMogoLocationClient.getLastKnowLocation();
- if ( location != null ) {
- if ( !mStatusManager.isV2XShow() ) {
- mStatusManager.setUserInteractionStatus( TAG, true, false );
- mMApUIController.setLockZoom( 16 );
- mMApUIController.changeZoom( 16.0f );
+ if (location != null) {
+ if (!mStatusManager.isV2XShow()) {
+ mStatusManager.setUserInteractionStatus(TAG, true, false);
+ mMApUIController.setLockZoom(16);
+ mMApUIController.changeZoom(16.0f);
}
- if ( mStatusManager.isDisplayOverview() ) {
- mStatusManager.setDisplayOverview( TAG, false );
- UiThreadHandler.removeCallbacks( mLockCarRunnable );
+ if (mStatusManager.isDisplayOverview()) {
+ mStatusManager.setDisplayOverview(TAG, false);
+ UiThreadHandler.removeCallbacks(mLockCarRunnable);
}
- mStatusManager.setUserInteractionStatus( TAG, true, false );
+ mStatusManager.setUserInteractionStatus(TAG, true, false);
mMApUIController.recoverLockMode();
}
- } );
+ });
- if ( DebugConfig.isDebug() ) {
- mMove2CurrentLocation.setOnLongClickListener( view -> {
+ if (DebugConfig.isDebug()) {
+ mMove2CurrentLocation.setOnLongClickListener(view -> {
mApis.getSearchManagerApi().goSettings();
return true;
- } );
+ });
}
- ConstraintLayout rootView = findViewById( R.id.module_entrance_id_top_motion_layout );
- if ( rootView != null ) {
- TopViewAnimHelper.getInstance().init( rootView );
+ ConstraintLayout rootView = findViewById(R.id.module_entrance_id_top_motion_layout);
+ if (rootView != null) {
+ TopViewAnimHelper.getInstance().init(rootView);
}
- mExitNavi = findViewById( R.id.module_entrance_id_exit_navi );
- mExitNavi.setOnClickListener( view -> {
- if ( mMogoNavi != null ) {
- if ( mIsLock ) {
- new WMDialog.Builder( getContext() )
- .setOkButton( R.string.module_commons_button_ok, ( dlg, which ) -> {
+ mExitNavi = findViewById(R.id.module_entrance_id_exit_navi);
+ mExitNavi.setOnClickListener(view -> {
+ if (mMogoNavi != null) {
+ if (mIsLock) {
+ new WMDialog.Builder(getContext())
+ .setOkButton(R.string.module_commons_button_ok, (dlg, which) -> {
dlg.dismiss();
mMogoNavi.stopNavi();
- } )
- .setCancelButton( R.string.module_commons_button_cancel,
- ( dlg, which ) -> {
+ })
+ .setCancelButton(R.string.module_commons_button_cancel,
+ (dlg, which) -> {
dlg.dismiss();
- } )
- .setContent( R.string.module_commons_exit_navi_content )
+ })
+ .setContent(R.string.module_commons_exit_navi_content)
.build()
.show();
} else {
- MapCenterPointStrategy.setMapCenterPointByScene( mMApUIController, Scene.NAVI );
+ MapCenterPointStrategy.setMapCenterPointByScene(mMApUIController, Scene.NAVI);
mMApUIController.recoverLockMode();
}
}
- } );
+ });
- mCameraMode = findViewById( R.id.module_ext_id_north );
- mCameraMode.setOnClickListener( view -> {
- if ( mCameraMode.isSelected() ) {
- mMApUIController.changeMapMode( EnumMapUI.CarUp_2D );
+ mCameraMode = findViewById(R.id.module_ext_id_north);
+ mCameraMode.setOnClickListener(view -> {
+ if (mCameraMode.isSelected()) {
+ mMApUIController.changeMapMode(EnumMapUI.CarUp_2D);
} else {
- mMApUIController.changeMapMode( EnumMapUI.NorthUP_2D );
+ mMApUIController.changeMapMode(EnumMapUI.NorthUP_2D);
}
- mCameraMode.setSelected( !mCameraMode.isSelected() );
- mCameraMode.setText( getString( mCameraMode.isSelected() ? R.string.mode_car_up :
- R.string.mode_north_up ) );
- } );
+ mCameraMode.setSelected(!mCameraMode.isSelected());
+ mCameraMode.setText(getString(mCameraMode.isSelected() ? R.string.mode_car_up :
+ R.string.mode_north_up));
+ });
- mApis.getIntentManagerApi().registerIntentListener( AUTONAVI_STANDARD_BROADCAST_RECV,
+ mApis.getIntentManagerApi().registerIntentListener(AUTONAVI_STANDARD_BROADCAST_RECV,
new IMogoIntentListener() {
@Override
- public void onIntentReceived( String intentStr, Intent intent ) {
- int key_type = intent.getIntExtra( "KEY_TYPE", 0 );
- int type = intent.getIntExtra( "EXTRA_TYPE", -1 );
- int opera_type = intent.getIntExtra( "EXTRA_OPERA", -1 );
- if ( key_type == 10027 ) {
- if ( opera_type == 0 ) {
- mCameraMode.setSelected( false );
- } else if ( opera_type == 1 ) {
- mCameraMode.setSelected( true );
+ public void onIntentReceived(String intentStr, Intent intent) {
+ int key_type = intent.getIntExtra("KEY_TYPE", 0);
+ int type = intent.getIntExtra("EXTRA_TYPE", -1);
+ int opera_type = intent.getIntExtra("EXTRA_OPERA", -1);
+ if (key_type == 10027) {
+ if (opera_type == 0) {
+ mCameraMode.setSelected(false);
+ } else if (opera_type == 1) {
+ mCameraMode.setSelected(true);
}
- mCameraMode.setText( getString( mCameraMode.isSelected() ?
- R.string.mode_car_up : R.string.mode_north_up ) );
+ mCameraMode.setText(getString(mCameraMode.isSelected() ?
+ R.string.mode_car_up : R.string.mode_north_up));
}
}
- } );
- MogoEntranceButtons.save( ButtonIndex.BUTTON1, findViewById( R.id.module_entrance_id_button1 ) );
- MogoEntranceButtons.save( ButtonIndex.BUTTON2, findViewById( R.id.module_entrance_id_button2 ) );
+ });
+ MogoEntranceButtons.save(ButtonIndex.BUTTON1,
+ findViewById(R.id.module_entrance_id_button1));
+ MogoEntranceButtons.save(ButtonIndex.BUTTON2,
+ findViewById(R.id.module_entrance_id_button2));
mDisplayOverviewBounds = new Rect(
- ResourcesHelper.getDimensionPixelSize( getContext(),
- R.dimen.module_map_display_overview_left_margin ),
- ResourcesHelper.getDimensionPixelSize( getContext(),
- R.dimen.module_map_display_overview_top_margin ),
- ResourcesHelper.getDimensionPixelSize( getContext(),
- R.dimen.module_map_display_overview_right_margin ),
- ResourcesHelper.getDimensionPixelSize( getContext(),
- R.dimen.module_map_display_overview_bottom_margin )
+ ResourcesHelper.getDimensionPixelSize(getContext(),
+ R.dimen.module_map_display_overview_left_margin),
+ ResourcesHelper.getDimensionPixelSize(getContext(),
+ R.dimen.module_map_display_overview_top_margin),
+ ResourcesHelper.getDimensionPixelSize(getContext(),
+ R.dimen.module_map_display_overview_right_margin),
+ ResourcesHelper.getDimensionPixelSize(getContext(),
+ R.dimen.module_map_display_overview_bottom_margin)
);
mNaviInfo = new NaviInfoView();
- mNaviInfo.inflate( rootView );
+ mNaviInfo.inflate(rootView);
- findViewById( R.id.module_map_id_navi_bg ).setOnClickListener( view -> {
+ findViewById(R.id.module_map_id_navi_bg).setOnClickListener(view -> {
try {
- LaunchUtils.launchByPkg( getContext(), "com.autonavi.amapauto" );
- } catch ( Exception e ) {
+ LaunchUtils.launchByPkg(getContext(), "com.autonavi.amapauto");
+ } catch (Exception e) {
e.printStackTrace();
}
- } );
+ });
- mWeatherContainer = findViewById( R.id.module_ext_id_weather_container );
- mWeatherIcon = findViewById( R.id.module_ext_id_weather_icon );
- mWeatherTemp = findViewById( R.id.module_ext_id_weather_temp );
+ mWeatherContainer = findViewById(R.id.module_ext_id_weather_container);
+ mWeatherIcon = findViewById(R.id.module_ext_id_weather_icon);
+ mWeatherTemp = findViewById(R.id.module_ext_id_weather_temp);
- mUserHeadImg = findViewById( R.id.ivUserHeadImg );
+ mUserHeadImg = findViewById(R.id.ivUserHeadImg);
- mMsgContainer = findViewById( R.id.module_ext_id_msg );
+ mMsgContainer = findViewById(R.id.module_ext_id_msg);
- mMsgContainer.setOnClickListener( view -> {
- ARouter.getInstance().build( "/push/ui/message" ).navigation( getContext() );
- } );
- mMsgCounter = findViewById( R.id.module_ext_id_msg_counter );
- mUserHeadImg.setOnClickListener( view -> {
+ mMsgContainer.setOnClickListener(view -> {
+ ARouter.getInstance().build("/push/ui/message").navigation(getContext());
+ });
+ mMsgCounter = findViewById(R.id.module_ext_id_msg_counter);
+ mUserHeadImg.setOnClickListener(view -> {
// todo 测试代码
// mApis.getEventPanelManager().showPanel();
// 原始逻辑
try {
- LaunchUtils.launchByPkg( getContext(), "com.zhidao.auto.personal" );
+ LaunchUtils.launchByPkg(getContext(), "com.zhidao.auto.personal");
// 埋点
- final Map< String, Object > properties = new HashMap<>();
- properties.put( "type", 3 );
- ServiceApisManager.serviceApis.getAnalyticsApi().track( "Launcher_APP_Icon", properties );
- } catch ( Exception e ) {
- Logger.e( TAG, e, "打开个人中心Exception" );
+ final Map properties = new HashMap<>();
+ properties.put("type", 3);
+ ServiceApisManager.serviceApis.getAnalyticsApi().track("Launcher_APP_Icon",
+ properties);
+ } catch (Exception e) {
+ Logger.e(TAG, e, "打开个人中心Exception");
}
- } );
+ });
- mUserHeadImg.setVisibility( DebugConfig.isLauncher() ? View.VISIBLE : View.GONE );
+ mUserHeadImg.setVisibility(DebugConfig.isLauncher() ? View.VISIBLE : View.GONE);
- mUploadButtonAnimatorController = new UploadButtonAnimatorController( mUploading, mUpload, mStatusManager );
+ mUploadButtonAnimatorController = new UploadButtonAnimatorController(mUploading, mUpload,
+ mStatusManager);
+
+ debugTopView();
}
public void showShareDialog() {
isClickShare = true;
mApis.getShareManager().showShareDialog();
- traceData( "1" );
+ traceData("1");
}
private static final String AUTONAVI_STANDARD_BROADCAST_RECV =
@@ -331,25 +342,25 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
}
@Override
- public void onActivityCreated( @Nullable Bundle savedInstanceState ) {
- super.onActivityCreated( savedInstanceState );
+ public void onActivityCreated(@Nullable Bundle savedInstanceState) {
+ super.onActivityCreated(savedInstanceState);
mService = mApis.getMapServiceApi();
mMogoRegisterCenter = mApis.getRegisterCenterApi();
mMApUIController = mService.getMapUIController();
- mMogoLocationClient = mService.getSingletonLocationClient( getContext() );
- mMogoNavi = mService.getNavi( getContext() );
+ mMogoLocationClient = mService.getSingletonLocationClient(getContext());
+ mMogoNavi = mService.getNavi(getContext());
mAnalytics = mApis.getAnalyticsApi();
- mMogoRegisterCenter.registerMogoNaviListener( ExtensionsModuleConst.TYPE_ENTRANCE, this );
- mMogoRegisterCenter.registerMogoMapListener( ExtensionsModuleConst.TYPE_ENTRANCE, this );
- mMogoRegisterCenter.registerMogoAimlessModeListener( TAG, this );
+ mMogoRegisterCenter.registerMogoNaviListener(ExtensionsModuleConst.TYPE_ENTRANCE, this);
+ mMogoRegisterCenter.registerMogoMapListener(ExtensionsModuleConst.TYPE_ENTRANCE, this);
+ mMogoRegisterCenter.registerMogoAimlessModeListener(TAG, this);
- mMogoMarkerManager = mService.getMarkerManager( getContext() );
+ mMogoMarkerManager = mService.getMarkerManager(getContext());
- mStatusManager.registerStatusChangedListener( TAG, StatusDescriptor.UPLOADING, this );
- mStatusManager.registerStatusChangedListener( TAG, StatusDescriptor.DISPLAY_OVERVIEW, this );
+ mStatusManager.registerStatusChangedListener(TAG, StatusDescriptor.UPLOADING, this);
+ mStatusManager.registerStatusChangedListener(TAG, StatusDescriptor.DISPLAY_OVERVIEW, this);
- TopViewAnimHelper.getInstance().setIMogoMapUIController( mMApUIController );
+ TopViewAnimHelper.getInstance().setIMogoMapUIController(mMApUIController);
}
@Override
@@ -359,147 +370,219 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
}
@Override
- public void onNaviInfoUpdate( MogoNaviInfo naviinfo ) {
- if ( naviinfo == null ) {
+ public void onNaviInfoUpdate(MogoNaviInfo naviinfo) {
+ if (naviinfo == null) {
return;
}
- if ( mNaviInfo != null ) {
- if ( !mNaviInfo.isVisible() ) {
+ if (mNaviInfo != null) {
+ if (!mNaviInfo.isVisible()) {
// 避免导航先开启,再开启app的情况
onStartNavi();
}
- mNaviInfo.notifyChanged( naviinfo );
+ mNaviInfo.notifyChanged(naviinfo);
}
}
@Override
public void onStartNavi() {
TopViewAnimHelper.getInstance().showNaviView();
- mMApUIController.changeMapMode( mCameraMode.isSelected() ? EnumMapUI.NorthUP_2D :
- EnumMapUI.CarUp_2D );
- MapCenterPointStrategy.setMapCenterPointBySceneAndDelay( mMApUIController, Scene.NAVI, 500
+ mMApUIController.changeMapMode(mCameraMode.isSelected() ? EnumMapUI.NorthUP_2D :
+ EnumMapUI.CarUp_2D);
+ MapCenterPointStrategy.setMapCenterPointBySceneAndDelay(mMApUIController, Scene.NAVI, 500
, () -> {
return !mMogoNavi.isNaviing();
- } );
- if ( CustomNaviInterrupter.getInstance().interrupt() ) {
- mDisplayOverview.setVisibility( View.GONE );
- mCameraMode.setVisibility( View.GONE );
- mExitNavi.setVisibility( View.GONE );
+ });
+ if (CustomNaviInterrupter.getInstance().interrupt()) {
+ mDisplayOverview.setVisibility(View.GONE);
+ mCameraMode.setVisibility(View.GONE);
+ mExitNavi.setVisibility(View.GONE);
} else {
- mExitNavi.setVisibility( View.VISIBLE );
- mDisplayOverview.setVisibility( View.VISIBLE );
- mCameraMode.setVisibility( View.VISIBLE );
+ mExitNavi.setVisibility(View.VISIBLE);
+ mDisplayOverview.setVisibility(View.VISIBLE);
+ mCameraMode.setVisibility(View.VISIBLE);
}
- mApis.getAnalyticsApi().track( "Navigation_begin", new HashMap<>() );
+ mApis.getAnalyticsApi().track("Navigation_begin", new HashMap<>());
}
@Override
public void onStopNavi() {
TopViewAnimHelper.getInstance().hideNaviView();
- mExitNavi.setVisibility( View.GONE );
- mMApUIController.changeMapMode( EnumMapUI.NorthUP_2D );
- mDisplayOverview.setVisibility( View.GONE );
- mCameraMode.setVisibility( View.GONE );
- MapCenterPointStrategy.setMapCenterPointByScene( mMApUIController, Scene.AIMLESS );
+ mExitNavi.setVisibility(View.GONE);
+ mMApUIController.changeMapMode(EnumMapUI.NorthUP_2D);
+ mDisplayOverview.setVisibility(View.GONE);
+ mCameraMode.setVisibility(View.GONE);
+ MapCenterPointStrategy.setMapCenterPointByScene(mMApUIController, Scene.AIMLESS);
}
@Override
- public void onUpdateTraffic2( MogoTraffic traffic ) {
- if ( traffic == null ) {
+ public void onUpdateTraffic2(MogoTraffic traffic) {
+ if (traffic == null) {
return;
}
}
@Override
- public void onLockMap( boolean isLock ) {
+ public void onLockMap(boolean isLock) {
mIsLock = isLock;
- if ( isLock ) {
- mExitNavi.setText( R.string.module_ext_str_exit_navi );
- if ( mStatusManager.isDisplayOverview() ) {
- mStatusManager.setDisplayOverview( TAG, false );
+ if (isLock) {
+ mExitNavi.setText(R.string.module_ext_str_exit_navi);
+ if (mStatusManager.isDisplayOverview()) {
+ mStatusManager.setDisplayOverview(TAG, false);
}
} else {
- mExitNavi.setText( R.string.module_ext_str_continue_navi );
+ mExitNavi.setText(R.string.module_ext_str_continue_navi);
}
}
- private void traceData( String from ) {
- Map< String, Object > properties = new HashMap<>();
- properties.put( "from", from );
- mAnalytics.track( "v2x_share_click", properties );
+ private void traceData(String from) {
+ Map properties = new HashMap<>();
+ properties.put("from", from);
+ mAnalytics.track("v2x_share_click", properties);
}
@Override
- public void onStatusChanged( StatusDescriptor descriptor, boolean isTrue ) {
- if ( mUploadRoadCondition == null ) {
+ public void onStatusChanged(StatusDescriptor descriptor, boolean isTrue) {
+ if (mUploadRoadCondition == null) {
return;
}
- if ( descriptor == StatusDescriptor.UPLOADING ) {
- if ( isTrue ) {
- mUploading.setVisibility( View.VISIBLE );
- mUpload.setVisibility( View.GONE );
+ if (descriptor == StatusDescriptor.UPLOADING) {
+ if (isTrue) {
+ mUploading.setVisibility(View.VISIBLE);
+ mUpload.setVisibility(View.GONE);
mUploadButtonAnimatorController.doFrameAnimOnUploadButton();
} else {
mUploadButtonAnimatorController.stopAnimation();
- mUploading.setVisibility( View.GONE );
- mUpload.setVisibility( View.VISIBLE );
+ mUploading.setVisibility(View.GONE);
+ mUpload.setVisibility(View.VISIBLE);
}
- } else if ( descriptor == StatusDescriptor.DISPLAY_OVERVIEW ) {
- if ( !mMogoNavi.isNaviing() ) {
+ } else if (descriptor == StatusDescriptor.DISPLAY_OVERVIEW) {
+ if (!mMogoNavi.isNaviing()) {
return;
}
- if ( isTrue ) {
- mDisplayOverviewText.setText( "退出全览" );
- mDisplayOverviewText.setTextSize( TypedValue.COMPLEX_UNIT_PX,
- getResources().getDimensionPixelSize( R.dimen.module_ext_display_overview_textSize ) );
- mCameraMode.setVisibility( View.GONE );
+ if (isTrue) {
+ mDisplayOverviewText.setText("退出全览");
+ mDisplayOverviewText.setTextSize(TypedValue.COMPLEX_UNIT_PX,
+ getResources().getDimensionPixelSize(R.dimen.module_ext_display_overview_textSize));
+ mCameraMode.setVisibility(View.GONE);
} else {
- mDisplayOverviewText.setText( "全览" );
- mDisplayOverviewText.setTextSize( TypedValue.COMPLEX_UNIT_PX,
- getResources().getDimensionPixelSize( R.dimen.module_ext_display_overview_textSize_large ) );
- if ( CustomNaviInterrupter.getInstance().interrupt() ) {
- mCameraMode.setVisibility( View.GONE );
+ mDisplayOverviewText.setText("全览");
+ mDisplayOverviewText.setTextSize(TypedValue.COMPLEX_UNIT_PX,
+ getResources().getDimensionPixelSize(R.dimen.module_ext_display_overview_textSize_large));
+ if (CustomNaviInterrupter.getInstance().interrupt()) {
+ mCameraMode.setVisibility(View.GONE);
} else {
- mCameraMode.setVisibility( View.VISIBLE );
+ mCameraMode.setVisibility(View.VISIBLE);
}
}
- } else if ( descriptor == StatusDescriptor.ACC_STATUS ) {
- Log.d( TAG, " onStatusChanged isTrue = " + isTrue );
- if ( isTrue ) {
- DelayService.Companion.launchService( getContext() );
+ } else if (descriptor == StatusDescriptor.ACC_STATUS) {
+ Log.d(TAG, " onStatusChanged isTrue = " + isTrue);
+ if (isTrue) {
+ DelayService.Companion.launchService(getContext());
}
}
}
@Override
- public void renderWeatherInfo( String temp, String desc, int iconId ) {
+ public void renderWeatherInfo(String temp, String desc, int iconId) {
boolean hidden = false;
- if ( iconId != 0 ) {
- mWeatherIcon.setImageResource( iconId );
- mWeatherIcon.setVisibility( View.VISIBLE );
+ if (iconId != 0) {
+ mWeatherIcon.setImageResource(iconId);
+ mWeatherIcon.setVisibility(View.VISIBLE);
} else {
- mWeatherIcon.setVisibility( View.GONE );
+ mWeatherIcon.setVisibility(View.GONE);
hidden |= true;
}
- hidden |= TextUtils.isEmpty( temp );
- hidden |= TextUtils.isEmpty( desc );
- mWeatherTemp.setText( temp );
- mWeatherContainer.setVisibility( hidden ? View.INVISIBLE : View.VISIBLE );
+ hidden |= TextUtils.isEmpty(temp);
+ hidden |= TextUtils.isEmpty(desc);
+ mWeatherTemp.setText(temp);
+ mWeatherContainer.setVisibility(hidden ? View.INVISIBLE : View.VISIBLE);
}
@Override
- public void renderMsgInfo( boolean hasMsg, int amount ) {
- mMsgContainer.setVisibility( hasMsg ? View.VISIBLE : View.GONE );
- mMsgCounter.setText( amount > MAX_DISPLAY_MSG_AMOUNT ? getString( R.string.module_ext_str_dots ) : String.valueOf( amount ) );
+ public void renderMsgInfo(boolean hasMsg, int amount) {
+ mMsgContainer.setVisibility(hasMsg ? View.VISIBLE : View.GONE);
+ mMsgCounter.setText(amount > MAX_DISPLAY_MSG_AMOUNT ?
+ getString(R.string.module_ext_str_dots) : String.valueOf(amount));
}
@Override
- public void renderUserInfo( UserInfo userInfo ) {
- if ( userInfo != null ) {
- Logger.d( TAG, "renderUserInfo: " + userInfo );
- GlideApp.with( getContext() ).load( userInfo.getHeadImgurl() ).placeholder( R.drawable.model_ext_default_user_head ).circleCrop().into( mUserHeadImg );
+ public void renderUserInfo(UserInfo userInfo) {
+ if (userInfo != null) {
+ Logger.d(TAG, "renderUserInfo: " + userInfo);
+ GlideApp.with(getContext()).load(userInfo.getHeadImgurl()).placeholder(R.drawable.model_ext_default_user_head).circleCrop().into(mUserHeadImg);
}
}
+
+ private int[] heights = new int[]{100,200,300};
+ private int currentHeight;
+ private void debugTopView() {
+ findViewById(R.id.btnDebugCtrlNaviView).setOnClickListener(view -> {
+ if (!toggle) {
+ TopViewAnimHelper.getInstance().showNaviView();
+ } else {
+ TopViewAnimHelper.getInstance().hideNaviView();
+ }
+ toggle = !toggle;
+ });
+
+ findViewById(R.id.btnDebugCtrlSubView).setOnClickListener(view -> {
+ View v = LayoutInflater.from(getContext()).inflate(R.layout.demo_top, null);
+ TextView tv = v.findViewById(R.id.tvIndex);
+ tv.setText("sub view height: " + currentHeight + ": " + v);
+ mApis.getTopViewManager().addSubView(v, new IMogoTopViewStatusListener() {
+ @Override
+ public void onViewAdded(View view) {
+ Logger.d(TAG, "onSubViewAdded: " + view);
+ }
+
+ @Override
+ public void onViewRemoved(View view) {
+ Logger.d(TAG, "onSubViewRemoved: " + view);
+ }
+
+ @Override
+ public void beforeViewAddAnim(View view) {
+ Logger.d(TAG, "beforeSubViewAddAnim: " + view);
+ }
+
+ @Override
+ public void beforeViewRemoveAnim(View view) {
+ Logger.d(TAG, "beforeSubViewRemoveAnim: " + view);
+ }
+ });
+ });
+
+ findViewById(R.id.btnDebugCtrlTopView).setOnClickListener(view -> {
+ View v = LayoutInflater.from(getContext()).inflate(R.layout.demo_top, null);
+ TextView tv = v.findViewById(R.id.tvIndex);
+ Random random = new Random();
+ currentHeight = heights[random.nextInt(3)];
+ tv.setText(" height: " + currentHeight + ": " + v);
+ ViewGroup.LayoutParams params =
+ new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, currentHeight);
+ mApis.getTopViewManager().addView(v, params, new IMogoTopViewStatusListener() {
+ @Override
+ public void onViewAdded(View view) {
+ Logger.d(TAG, "onViewAdded: " + view);
+ }
+
+ @Override
+ 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);
+ }
+ });
+ });
+ }
}
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 827e00b570..0d4a626e29 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
@@ -9,8 +9,6 @@ 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;
import android.widget.TextView;
@@ -21,7 +19,6 @@ import androidx.constraintlayout.widget.Group;
import com.mogo.map.uicontroller.IMogoMapUIController;
import com.mogo.module.common.map.MapCenterPointStrategy;
import com.mogo.module.common.map.Scene;
-import com.mogo.module.common.utils.CarSeries;
import com.mogo.module.extensions.R;
import com.mogo.module.extensions.navi.TopView;
import com.mogo.service.windowview.IMogoTopViewStatusListener;
@@ -662,7 +659,7 @@ public class TopViewAnimHelper {
}
private int computeNaviMarginTop(int height) {
- int result = (int) (height - (getDimen(R.dimen.dp_350) - getDimen(R.dimen.dp_316)));
+ int result = (int) (height - (getDimen(R.dimen.module_ext_top_over_navi_height)));
Logger.d(TAG, "computeNaviMarginTop: " + height + " result: " + result);
return result;
}
diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi-1920x1000/module_ext_ic_navi_info1.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi-1920x1000/module_ext_ic_navi_info1.png
new file mode 100644
index 0000000000..f9cfe3d8ba
Binary files /dev/null and b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi-1920x1000/module_ext_ic_navi_info1.png differ
diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi-1920x1000/module_ext_ic_navi_info2.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi-1920x1000/module_ext_ic_navi_info2.png
new file mode 100644
index 0000000000..71cb049800
Binary files /dev/null and b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi-1920x1000/module_ext_ic_navi_info2.png differ
diff --git a/modules/mogo-module-extensions/src/main/res/drawable-xhdpi-1920x1000/module_ext_ic_navi_info3.png b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi-1920x1000/module_ext_ic_navi_info3.png
new file mode 100644
index 0000000000..2f3f0e54d9
Binary files /dev/null and b/modules/mogo-module-extensions/src/main/res/drawable-xhdpi-1920x1000/module_ext_ic_navi_info3.png differ
diff --git a/modules/mogo-module-extensions/src/main/res/layout-xhdpi-1920x1000/include_navi_info_panle.xml b/modules/mogo-module-extensions/src/main/res/layout-xhdpi-1920x1000/include_navi_info_panle.xml
new file mode 100644
index 0000000000..a861e90537
--- /dev/null
+++ b/modules/mogo-module-extensions/src/main/res/layout-xhdpi-1920x1000/include_navi_info_panle.xml
@@ -0,0 +1,229 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_entrance.xml b/modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_entrance.xml
index 023e4ea746..bae7449c91 100644
--- a/modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_entrance.xml
+++ b/modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_entrance.xml
@@ -30,7 +30,7 @@
android:textSize="@dimen/module_ext_north_textSize"
android:textStyle="bold"
android:visibility="gone"
- tools:visibility="gone"
+ tools:visibility="visible"
app:layout_constraintRight_toRightOf="@+id/module_entrance_id_upload_road_condition"
app:layout_constraintTop_toBottomOf="@+id/module_map_id_navi_bg"
app:layout_goneMarginTop="@dimen/module_ext_north_goneMarginTop" />
@@ -173,4 +173,37 @@
android:textStyle="bold"
android:visibility="gone" />
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/mogo-module-extensions/src/main/res/values-xhdpi-1920x1000/dimens.xml b/modules/mogo-module-extensions/src/main/res/values-xhdpi-1920x1000/dimens.xml
new file mode 100644
index 0000000000..169a5f6e4e
--- /dev/null
+++ b/modules/mogo-module-extensions/src/main/res/values-xhdpi-1920x1000/dimens.xml
@@ -0,0 +1,143 @@
+
+
+
+ 90px
+ 32px
+ 2px
+ 16px
+ 26px
+ 26px
+ 32px
+
+ 90px
+ 32px
+ 2px
+ 100px
+ 90px
+ 2px
+ 54px
+ 100px
+ 90px
+
+ 180px
+ 180px
+ 2px
+ 60px
+ 60px
+ 28px
+
+ 32px
+ 2px
+
+ 120px
+ 32px
+ 60px
+ 92px
+ 24px
+ 48px
+ 2px
+ 120px
+ 120px
+ 120px
+ 40px
+ 30px
+ 32px
+ 32px
+
+ 120px
+ 120px
+ 32px
+ 60px
+ 32px
+ 60px
+ 32px
+ 20px
+
+
+ 100px
+ 60px
+ 60px
+ 32px
+ 48px
+ 80px
+ 28px
+ 26px
+ 44px
+ 44px
+ 18px
+ 34px
+ 26px
+ 28px
+ 30px
+ 30px
+ 30px
+ 20px
+
+ 103px
+ 103px
+
+
+ 1058px
+ 210px
+ 144px
+ 159px
+ 159px
+ 70px
+ 70px
+ 24px
+ 83px
+ 24px
+ 40px
+ 60px
+ 12px
+ 10px
+ 40px
+ 34px
+ 24px
+ 28px
+ 23px
+ 17px
+ 17px
+ 36px
+ 36px
+ -2px
+
+ 30px
+ 40px
+ 40px
+ 15px
+ 15px
+ 5px
+ 50px
+ 56px
+ 30px
+ 56px
+ 30px
+ 56px
+ 30px
+ 15px
+ 15px
+
+
+ 1000px
+ 390px
+ 200px
+ 200px
+ 240px
+ 30px
+ 120px
+ 120px
+ 30px
+ 22px
+ 28px
+ 28px
+ 30px
+ 90px
+ 90px
+ 6dp
+ 15px
+ 10px
+ 20px
+
+ 40px
+
\ No newline at end of file
diff --git a/modules/mogo-module-extensions/src/main/res/values-xhdpi/dimens.xml b/modules/mogo-module-extensions/src/main/res/values-xhdpi/dimens.xml
index 3f7fae420a..059f8fb764 100644
--- a/modules/mogo-module-extensions/src/main/res/values-xhdpi/dimens.xml
+++ b/modules/mogo-module-extensions/src/main/res/values-xhdpi/dimens.xml
@@ -139,4 +139,5 @@
10px
20px
+ 34px
\ No newline at end of file
diff --git a/modules/mogo-module-extensions/src/main/res/values/dimens.xml b/modules/mogo-module-extensions/src/main/res/values/dimens.xml
index 4d06184316..a55c7a34a9 100644
--- a/modules/mogo-module-extensions/src/main/res/values/dimens.xml
+++ b/modules/mogo-module-extensions/src/main/res/values/dimens.xml
@@ -142,4 +142,6 @@
10px
6px
10px
+
+ 19px
\ No newline at end of file
diff --git a/modules/mogo-module-left-panel/src/main/res/drawable-xhdpi-1920x1000/module_left_panel_normal_speed_bg.png b/modules/mogo-module-left-panel/src/main/res/drawable-xhdpi-1920x1000/module_left_panel_normal_speed_bg.png
new file mode 100644
index 0000000000..8fd2088ff7
Binary files /dev/null and b/modules/mogo-module-left-panel/src/main/res/drawable-xhdpi-1920x1000/module_left_panel_normal_speed_bg.png differ
diff --git a/modules/mogo-module-left-panel/src/main/res/drawable-xhdpi-1920x1000/module_left_panel_speed_container_bg.png b/modules/mogo-module-left-panel/src/main/res/drawable-xhdpi-1920x1000/module_left_panel_speed_container_bg.png
new file mode 100644
index 0000000000..4e0c972890
Binary files /dev/null and b/modules/mogo-module-left-panel/src/main/res/drawable-xhdpi-1920x1000/module_left_panel_speed_container_bg.png differ
diff --git a/modules/mogo-module-left-panel/src/main/res/drawable-xhdpi-1920x1000/module_left_panel_warn_speed_bg.png b/modules/mogo-module-left-panel/src/main/res/drawable-xhdpi-1920x1000/module_left_panel_warn_speed_bg.png
new file mode 100644
index 0000000000..11a4081a26
Binary files /dev/null and b/modules/mogo-module-left-panel/src/main/res/drawable-xhdpi-1920x1000/module_left_panel_warn_speed_bg.png differ
diff --git a/modules/mogo-module-left-panel/src/main/res/values-xhdpi-1920x1000/dimens.xml b/modules/mogo-module-left-panel/src/main/res/values-xhdpi-1920x1000/dimens.xml
new file mode 100644
index 0000000000..301d92c1e7
--- /dev/null
+++ b/modules/mogo-module-left-panel/src/main/res/values-xhdpi-1920x1000/dimens.xml
@@ -0,0 +1,8 @@
+
+
+ 122px
+ 110px
+ 30px
+ 47px
+
+
\ No newline at end of file
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 bcb2744c24..c3a6b4463d 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
@@ -43,10 +43,12 @@
+ android:layout_gravity="right"
+ android:paddingRight="@dimen/module_main_entrance_fragment_container_padding"
+ android:paddingBottom="@dimen/module_main_entrance_fragment_container_padding"
+ android:paddingTop="@dimen/module_main_entrance_fragment_container_padding" />
+
+
+ 350px
+ 10px
+ 660px
+ 690px
+ 60px
+ 211px
+ 30px
+ 30px
+ 15px
+ 270px
+ 660px
+ 600px
+ 599px
+
+ 200px
+ 30px
+ 30px
+ 830px
+ 590px
+ 30px
+ 70px
+
+ 635px
+ 1263px
+
+
\ No newline at end of file
diff --git a/modules/mogo-module-main/src/main/res/values-xhdpi/dimens.xml b/modules/mogo-module-main/src/main/res/values-xhdpi/dimens.xml
index f05ec80366..9f6dd8ba91 100644
--- a/modules/mogo-module-main/src/main/res/values-xhdpi/dimens.xml
+++ b/modules/mogo-module-main/src/main/res/values-xhdpi/dimens.xml
@@ -21,7 +21,8 @@
830px
800px
30px
+ 30px
340px
-
+ 1313px
\ No newline at end of file
diff --git a/modules/mogo-module-main/src/main/res/values/dimens.xml b/modules/mogo-module-main/src/main/res/values/dimens.xml
index 5cec246a84..a1a96a40ba 100644
--- a/modules/mogo-module-main/src/main/res/values/dimens.xml
+++ b/modules/mogo-module-main/src/main/res/values/dimens.xml
@@ -23,5 +23,8 @@
444px
350px
16px
+ 16px
+
+ 658px
\ No newline at end of file
diff --git a/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/module_share_title_icon_left.png b/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/module_share_title_icon_left.png
new file mode 100644
index 0000000000..aba37467b6
Binary files /dev/null and b/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/module_share_title_icon_left.png differ
diff --git a/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/module_share_title_icon_right.png b/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/module_share_title_icon_right.png
new file mode 100644
index 0000000000..719c121eea
Binary files /dev/null and b/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/module_share_title_icon_right.png differ
diff --git a/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_accident.png b/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_accident.png
new file mode 100644
index 0000000000..2af41503f9
Binary files /dev/null and b/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_accident.png differ
diff --git a/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_block_up.png b/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_block_up.png
new file mode 100644
index 0000000000..c9eb6b0a18
Binary files /dev/null and b/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_block_up.png differ
diff --git a/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_dense_fog.png b/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_dense_fog.png
new file mode 100644
index 0000000000..1336432e1d
Binary files /dev/null and b/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_dense_fog.png differ
diff --git a/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_real_time_traffic.png b/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_real_time_traffic.png
new file mode 100644
index 0000000000..709879f3e4
Binary files /dev/null and b/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_real_time_traffic.png differ
diff --git a/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_road_closure.png b/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_road_closure.png
new file mode 100644
index 0000000000..bcd17dfa93
Binary files /dev/null and b/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_road_closure.png differ
diff --git a/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_road_construction.png b/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_road_construction.png
new file mode 100644
index 0000000000..0122719438
Binary files /dev/null and b/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_road_construction.png differ
diff --git a/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_road_icy.png b/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_road_icy.png
new file mode 100644
index 0000000000..6d249db767
Binary files /dev/null and b/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_road_icy.png differ
diff --git a/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_seek_help.png b/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_seek_help.png
new file mode 100644
index 0000000000..e1d78a093d
Binary files /dev/null and b/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_seek_help.png differ
diff --git a/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_stagnant_water.png b/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_stagnant_water.png
new file mode 100644
index 0000000000..27acbbe17b
Binary files /dev/null and b/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_stagnant_water.png differ
diff --git a/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_traffic_check.png b/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_traffic_check.png
new file mode 100644
index 0000000000..4daa5cb903
Binary files /dev/null and b/modules/mogo-module-share/src/main/res/drawable-xhdpi-1920x1000/share_traffic_check.png differ
diff --git a/modules/mogo-module-share/src/main/res/layout/launcher_dialog_share_2.xml b/modules/mogo-module-share/src/main/res/layout/launcher_dialog_share_2.xml
index f5012a4dce..448fef5d09 100644
--- a/modules/mogo-module-share/src/main/res/layout/launcher_dialog_share_2.xml
+++ b/modules/mogo-module-share/src/main/res/layout/launcher_dialog_share_2.xml
@@ -39,132 +39,132 @@
android:layout_height="wrap_content"
android:drawableTop="@drawable/share_block_up"
android:text="拥堵"
- android:textSize="@dimen/dp_32"
+ android:textSize="@dimen/share_module_btn_text_size"
android:textColor="#fff"
app:layout_constraintHorizontal_chainStyle="spread_inside"
android:gravity="center"
app:layout_constraintTop_toBottomOf="@+id/btn_share_title"
app:layout_constraintRight_toLeftOf="@+id/tvTrafficCheck"
app:layout_constraintLeft_toLeftOf="@+id/vBg"
- android:layout_marginStart="@dimen/dp_116"
- android:layout_marginTop="@dimen/dp_78"
- android:drawablePadding="@dimen/dp_30" />
+ android:layout_marginStart="@dimen/share_module_btn_margin_left_right"
+ android:layout_marginTop="@dimen/share_module_first_btn_margin_top"
+ android:drawablePadding="@dimen/share_module_drawable_padding" />
+ android:drawablePadding="@dimen/share_module_drawable_padding" />
+ android:drawablePadding="@dimen/share_module_drawable_padding" />
+ android:drawablePadding="@dimen/share_module_drawable_padding" />
+ android:drawablePadding="@dimen/share_module_drawable_padding" />
+ android:layout_marginTop="@dimen/share_module_sec_btn_margin_top"
+ android:drawablePadding="@dimen/share_module_drawable_padding" />
+ android:layout_marginTop="@dimen/share_module_sec_btn_margin_top"
+ android:drawablePadding="@dimen/share_module_drawable_padding" />
+ android:layout_marginTop="@dimen/share_module_sec_btn_margin_top"
+ android:drawablePadding="@dimen/share_module_drawable_padding" />
+ android:drawablePadding="@dimen/share_module_drawable_padding" />
+ android:drawablePadding="@dimen/share_module_drawable_padding" />
\ No newline at end of file
diff --git a/modules/mogo-module-share/src/main/res/values-xhdpi-1920x1000/dimens.xml b/modules/mogo-module-share/src/main/res/values-xhdpi-1920x1000/dimens.xml
new file mode 100644
index 0000000000..4041b60f30
--- /dev/null
+++ b/modules/mogo-module-share/src/main/res/values-xhdpi-1920x1000/dimens.xml
@@ -0,0 +1,26 @@
+
+
+ 1318px
+ 727px
+ 64px
+ 51px
+ 200px
+ 210px
+ 30px
+ 160px
+ 198px
+ 55px
+ 70px
+ 56px
+ 27px
+ 105px
+
+
+ 36px
+ 32px
+ 28px
+ 28px
+
+
+
+
diff --git a/modules/mogo-module-share/src/main/res/values-xhdpi/dimens.xml b/modules/mogo-module-share/src/main/res/values-xhdpi/dimens.xml
index 0e3e0cf68a..566d8d9d02 100644
--- a/modules/mogo-module-share/src/main/res/values-xhdpi/dimens.xml
+++ b/modules/mogo-module-share/src/main/res/values-xhdpi/dimens.xml
@@ -10,11 +10,16 @@
160px
198px
55px
+ 78px
+ 62px
+ 30px
+ 116px
40px
32px
28px
+ 32px
diff --git a/modules/mogo-module-share/src/main/res/values/dimens.xml b/modules/mogo-module-share/src/main/res/values/dimens.xml
index ff81f21386..0e92e92f36 100644
--- a/modules/mogo-module-share/src/main/res/values/dimens.xml
+++ b/modules/mogo-module-share/src/main/res/values/dimens.xml
@@ -11,10 +11,15 @@
85px
110px
28px
+ 42.6px
+ 34px
+ 16.4px
+ 63.4px
22px
18px
15px
+ 17.5px
\ No newline at end of file
diff --git a/modules/mogo-module-splash/src/main/java/com/zhidao/mogo/module/splash/BydConst.kt b/modules/mogo-module-splash/src/main/java/com/zhidao/mogo/module/splash/SplashConst.kt
similarity index 85%
rename from modules/mogo-module-splash/src/main/java/com/zhidao/mogo/module/splash/BydConst.kt
rename to modules/mogo-module-splash/src/main/java/com/zhidao/mogo/module/splash/SplashConst.kt
index 127a37c7d8..a2ffcbd208 100644
--- a/modules/mogo-module-splash/src/main/java/com/zhidao/mogo/module/splash/BydConst.kt
+++ b/modules/mogo-module-splash/src/main/java/com/zhidao/mogo/module/splash/SplashConst.kt
@@ -1,6 +1,6 @@
package com.zhidao.mogo.module.splash
-object BydConst {
+object SplashConst {
const val MODULE_NAME = "MODULE_SPLASH"
const val PATH_NAME = "/splash/api"
}
\ No newline at end of file
diff --git a/modules/mogo-module-splash/src/main/java/com/zhidao/mogo/module/splash/BydProvider.kt b/modules/mogo-module-splash/src/main/java/com/zhidao/mogo/module/splash/SplashProvider.kt
similarity index 91%
rename from modules/mogo-module-splash/src/main/java/com/zhidao/mogo/module/splash/BydProvider.kt
rename to modules/mogo-module-splash/src/main/java/com/zhidao/mogo/module/splash/SplashProvider.kt
index e3456e3130..207206469e 100644
--- a/modules/mogo-module-splash/src/main/java/com/zhidao/mogo/module/splash/BydProvider.kt
+++ b/modules/mogo-module-splash/src/main/java/com/zhidao/mogo/module/splash/SplashProvider.kt
@@ -13,8 +13,8 @@ import com.mogo.map.navi.IMogoNaviListener
import com.mogo.service.module.IMogoModuleLifecycle
import com.mogo.service.module.IMogoModuleProvider
import com.mogo.utils.logger.Logger
-import com.zhidao.mogo.module.splash.BydConst.MODULE_NAME
-import com.zhidao.mogo.module.splash.BydConst.PATH_NAME
+import com.zhidao.mogo.module.splash.SplashConst.MODULE_NAME
+import com.zhidao.mogo.module.splash.SplashConst.PATH_NAME
import com.zhidao.mogo.module.splash.fragment.BydSplashFragment
/**
@@ -23,7 +23,7 @@ import com.zhidao.mogo.module.splash.fragment.BydSplashFragment
* @author tongchenfei
*/
@Route(path = PATH_NAME)
-class BydProvider : IMogoModuleProvider {
+class SplashProvider : IMogoModuleProvider {
override fun getNaviListener(): IMogoNaviListener? {
return null
}
diff --git a/modules/mogo-module-splash/src/main/java/com/zhidao/mogo/module/splash/fragment/BydSplashFragment.kt b/modules/mogo-module-splash/src/main/java/com/zhidao/mogo/module/splash/fragment/BydSplashFragment.kt
index f1d48a718d..bcd4301496 100644
--- a/modules/mogo-module-splash/src/main/java/com/zhidao/mogo/module/splash/fragment/BydSplashFragment.kt
+++ b/modules/mogo-module-splash/src/main/java/com/zhidao/mogo/module/splash/fragment/BydSplashFragment.kt
@@ -1,19 +1,53 @@
package com.zhidao.mogo.module.splash.fragment
+import android.os.Handler
+import android.os.Message
import com.mogo.commons.mvp.MvpFragment
import com.zhidao.mogo.module.splash.R
import com.zhidao.mogo.module.splash.presenter.BydSplashPresenter
import kotlinx.android.synthetic.main.fragment_byd_splash.*
-class BydSplashFragment :MvpFragment(){
+const val DEFAULT_COUNT_DOWN_TIME = 5
+const val MSG_COUNT_DOWN = 1001
+const val DEFAULT_COUNT_DOWN_DELAY = 1000L
+class BydSplashFragment :MvpFragment(),Handler.Callback{
+ private val handler = Handler(this)
+ private var countDownTime = DEFAULT_COUNT_DOWN_TIME
+
override fun getLayoutId(): Int = R.layout.fragment_byd_splash
override fun initViews() {
+ startCountDown()
tvByd.setOnClickListener {
- activity!!.supportFragmentManager.beginTransaction().remove(this).commit()
+ hideSplash()
}
}
override fun createPresenter(): BydSplashPresenter = BydSplashPresenter(this)
+ private fun startCountDown(){
+ handler.removeMessages(MSG_COUNT_DOWN)
+ countDownTime = DEFAULT_COUNT_DOWN_TIME
+ tvCountDown.text = countDownTime.toString()
+ handler.sendEmptyMessageDelayed(MSG_COUNT_DOWN, DEFAULT_COUNT_DOWN_DELAY)
+ }
+
+ override fun handleMessage(msg: Message): Boolean {
+ if (msg.what == MSG_COUNT_DOWN) {
+ countDownTime--
+ if(countDownTime>0) {
+ tvCountDown.text = countDownTime.toString()
+ handler.sendEmptyMessageDelayed(MSG_COUNT_DOWN, DEFAULT_COUNT_DOWN_DELAY)
+ }else{
+ hideSplash()
+ }
+ return true
+ }
+ return false
+ }
+
+ private fun hideSplash(){
+ handler.removeMessages(MSG_COUNT_DOWN)
+ activity!!.supportFragmentManager.beginTransaction().remove(this).commit()
+ }
}
\ No newline at end of file
diff --git a/modules/mogo-module-splash/src/main/res/layout/fragment_byd_splash.xml b/modules/mogo-module-splash/src/main/res/layout/fragment_byd_splash.xml
index 48d96894c5..45207fa003 100644
--- a/modules/mogo-module-splash/src/main/res/layout/fragment_byd_splash.xml
+++ b/modules/mogo-module-splash/src/main/res/layout/fragment_byd_splash.xml
@@ -20,4 +20,16 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
+
+
+
\ No newline at end of file