diff --git a/config.gradle b/config.gradle index 692a12e959..09aca032e8 100644 --- a/config.gradle +++ b/config.gradle @@ -142,7 +142,7 @@ ext { gpssimulatordebug : "com.mogo.module:module-gps-simulator-debug:${MOGO_MODULE_GPS_SIMULATOR_DEBUG_VERSION}", gpssimulatornoop : "com.mogo.module:module-gps-simulator-noop:${MOGO_MODULE_GPS_SIMULATOR_NOOP_VERSION}", - adasapi : "com.zhidao.autopilot.support:adas:1.0.0-SNAPSHOT", + adasapi : "com.zhidao.autopilot.support:adas:1.0.0", // 个人中心的SDK personalsdk : "com.zhidaoauto.person.info:data:1.0.1", diff --git a/foudations/mogo-commons/src/main/java/com/mogo/commons/AbsMogoApplication.java b/foudations/mogo-commons/src/main/java/com/mogo/commons/AbsMogoApplication.java index 81eaf23016..77457a07ae 100644 --- a/foudations/mogo-commons/src/main/java/com/mogo/commons/AbsMogoApplication.java +++ b/foudations/mogo-commons/src/main/java/com/mogo/commons/AbsMogoApplication.java @@ -70,33 +70,15 @@ public class AbsMogoApplication extends Application { ARouter.openLog(); } ARouter.init( sApp ); - TipToast.init( this, new TipToast.ToastViewGenerator() { - @Override - public View make( Context context, String message ) { - if ( TextUtils.isEmpty( message ) ) { - return null; - } - View contentView = LayoutInflater.from( context ).inflate( R.layout.module_commons_layout_toast, null ); - TextView txt = contentView.findViewById( R.id.module_commons_toast_msg ); - txt.setText( message ); - return contentView; + TipToast.init( this, ( ( context, message ) -> { + if ( TextUtils.isEmpty( message ) ) { + return null; } - - @Override - public int gravity() { - return Gravity.TOP | Gravity.CENTER_HORIZONTAL; - } - - @Override - public int yOffset() { - return sApp.getResources().getDimensionPixelSize( R.dimen.module_commons_toast_y_offset ); - } - - @Override - public int xOffset() { - return 0; - } - } ); + View contentView = LayoutInflater.from( context ).inflate( R.layout.module_commons_layout_toast, null ); + TextView txt = contentView.findViewById( R.id.module_commons_toast_msg ); + txt.setText( message ); + return contentView; + } ) ); } /** diff --git a/foudations/mogo-utils/build.gradle b/foudations/mogo-utils/build.gradle index 2c08bfb9a3..bbd4970b27 100644 --- a/foudations/mogo-utils/build.gradle +++ b/foudations/mogo-utils/build.gradle @@ -20,6 +20,11 @@ android { } } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + } dependencies { diff --git a/foudations/mogo-utils/src/main/java/com/mogo/utils/TipToast.java b/foudations/mogo-utils/src/main/java/com/mogo/utils/TipToast.java index 540fa45017..ec457c6b04 100644 --- a/foudations/mogo-utils/src/main/java/com/mogo/utils/TipToast.java +++ b/foudations/mogo-utils/src/main/java/com/mogo/utils/TipToast.java @@ -170,11 +170,17 @@ public final class TipToast { public interface ToastViewGenerator { View make( Context context, String message ); - int gravity(); + default int gravity() { + return Gravity.CENTER; + } - int yOffset(); + default int yOffset() { + return 0; + } - int xOffset(); + default int xOffset() { + return 0; + } } } diff --git a/gradle.properties b/gradle.properties index e29d91b2a1..7ced486484 100644 --- a/gradle.properties +++ b/gradle.properties @@ -68,7 +68,7 @@ MOGO_MODULE_ONLINECAR_VERSION=1.0.3.2 # v2x MOGO_MODULE_V2X_VERSION=1.0.7 # 媒体卡片 -MOGO_MODULE_MEDIA_VERSION=1.0.4.4 +MOGO_MODULE_MEDIA_VERSION=1.0.4.9 # 推送 MOGO_MODULE_PUSH_VERSION=1.0.1 # 广告资源位 diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/navi/BaseNaviInfoView.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/navi/BaseNaviInfoView.java index 13101f2587..85faab6b7a 100644 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/navi/BaseNaviInfoView.java +++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/navi/BaseNaviInfoView.java @@ -68,7 +68,7 @@ public abstract class BaseNaviInfoView { protected String getFormatSurplusTime( int seconds ) { if ( seconds > 60 * 60 ) { mFormatSurplusDistanceUnit = "h"; - return String.format( "%.1f", ( ( float ) seconds ) / 60 * 60 ); + return String.format( "%.1f", ( ( float ) seconds ) / ( 60 * 60 ) ); } if ( seconds > 60 ) { diff --git a/modules/mogo-module-main/src/main/res/drawable/module_main_dw_left_frame_bkg.xml b/modules/mogo-module-main/src/main/res/drawable/module_main_dw_left_frame_bkg.xml index bf95c3f61e..719837b740 100644 --- a/modules/mogo-module-main/src/main/res/drawable/module_main_dw_left_frame_bkg.xml +++ b/modules/mogo-module-main/src/main/res/drawable/module_main_dw_left_frame_bkg.xml @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/modules/mogo-module-search/src/main/res/layout/fragment_search_category.xml b/modules/mogo-module-search/src/main/res/layout/fragment_search_category.xml index 600aae8c77..e90b43bf36 100644 --- a/modules/mogo-module-search/src/main/res/layout/fragment_search_category.xml +++ b/modules/mogo-module-search/src/main/res/layout/fragment_search_category.xml @@ -3,140 +3,116 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" - android:paddingBottom="@dimen/dp_60" - android:paddingLeft="@dimen/dp_60" - android:paddingRight="@dimen/dp_60" - android:paddingTop="@dimen/dp_40" - > + android:paddingLeft="@dimen/module_search_search_padding" + android:paddingTop="@dimen/module_search_search_paddingTop" + android:paddingRight="@dimen/module_search_search_padding" + android:paddingBottom="@dimen/module_search_search_padding"> - - - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - + android:textSize="@dimen/dp_44" + app:layout_constraintLeft_toLeftOf="@+id/cv_search_result" + app:layout_constraintRight_toRightOf="@+id/cv_search_result" + app:layout_constraintTop_toBottomOf="@+id/iv_path_fail" /> + + + + + + + + - - + \ No newline at end of file diff --git a/modules/mogo-module-search/src/main/res/layout/item_calculate_path_map.xml b/modules/mogo-module-search/src/main/res/layout/item_calculate_path_map.xml index e33bc904af..e91d68af0e 100644 --- a/modules/mogo-module-search/src/main/res/layout/item_calculate_path_map.xml +++ b/modules/mogo-module-search/src/main/res/layout/item_calculate_path_map.xml @@ -3,46 +3,51 @@ xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" + android:layout_height="@dimen/module_search_choose_path_item_height" android:background="@drawable/selector_item_category_background" - android:layout_height="@dimen/dp_226"> + tools:background="#000000"> @@ -69,22 +75,22 @@ + android:layout_marginLeft="@dimen/module_search_calculate_item_strategy_name_marginLeft" + android:background="#1a000000" + app:layout_constraintBottom_toBottomOf="parent" /> \ No newline at end of file diff --git a/modules/mogo-module-search/src/main/res/layout/item_search_category.xml b/modules/mogo-module-search/src/main/res/layout/item_search_category.xml index b804455410..b92f2ef0d3 100644 --- a/modules/mogo-module-search/src/main/res/layout/item_search_category.xml +++ b/modules/mogo-module-search/src/main/res/layout/item_search_category.xml @@ -3,64 +3,63 @@ xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" - android:background="@drawable/selector_item_category_background" android:layout_height="@dimen/dp_180" - > + android:background="@drawable/selector_item_category_background" + tools:background="#000000"> - + - + - + - + \ No newline at end of file diff --git a/modules/mogo-module-search/src/main/res/values-ldpi/dimens.xml b/modules/mogo-module-search/src/main/res/values-ldpi/dimens.xml index 4a805f7462..fc05233fe3 100644 --- a/modules/mogo-module-search/src/main/res/values-ldpi/dimens.xml +++ b/modules/mogo-module-search/src/main/res/values-ldpi/dimens.xml @@ -42,9 +42,25 @@ 64px 24px 446px - 96px + 83px 56px 100px 18px + 111px + 16px + 20px + 12px + 12px + 2px + 2px + 22px + 3px + 16px + 16px + 2px + 32px + 34px + 16px + 20px \ No newline at end of file diff --git a/modules/mogo-module-search/src/main/res/values-xhdpi/dimens.xml b/modules/mogo-module-search/src/main/res/values-xhdpi/dimens.xml index e55d924738..6de848b620 100644 --- a/modules/mogo-module-search/src/main/res/values-xhdpi/dimens.xml +++ b/modules/mogo-module-search/src/main/res/values-xhdpi/dimens.xml @@ -39,9 +39,25 @@ 120px 45px 838px - 184px + 142px 104px 154px 32px + 212px + 26px + 40px + 20px + 20px + 3px + 3px + 48px + 14px + 36px + 30px + 3px + 60px + 40px + 32px + 40px \ No newline at end of file diff --git a/modules/mogo-module-search/src/main/res/values/dimens.xml b/modules/mogo-module-search/src/main/res/values/dimens.xml index ada5a8de74..94a230bbcc 100644 --- a/modules/mogo-module-search/src/main/res/values/dimens.xml +++ b/modules/mogo-module-search/src/main/res/values/dimens.xml @@ -42,10 +42,26 @@ 120px 45px 838px - 184px + 142px 104px 154px 32px + 212px + 26px + 40px + 20px + 20px + 3px + 3px + 48px + 14px + 36px + 30px + 3px + 60px + 40px + 32px + 40px \ No newline at end of file diff --git a/services/mogo-service/src/main/java/com/mogo/service/impl/adas/MogoADASController.java b/services/mogo-service/src/main/java/com/mogo/service/impl/adas/MogoADASController.java index ec82685aea..aa344adc0b 100644 --- a/services/mogo-service/src/main/java/com/mogo/service/impl/adas/MogoADASController.java +++ b/services/mogo-service/src/main/java/com/mogo/service/impl/adas/MogoADASController.java @@ -77,7 +77,7 @@ public class MogoADASController implements IMogoADASController { return; } - int delay = CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X ? 0 : 500; + int delay = CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X ? 0 : 100; UiThreadHandler.postDelayed( () -> { try {