From 9f7cd7eb6ba121d941aec1163483c7dbb7970dc5 Mon Sep 17 00:00:00 2001 From: tongchenfei Date: Thu, 10 Dec 2020 17:59:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E7=BA=A2=E7=BB=BF?= =?UTF-8?q?=E7=81=AF=E9=9D=A2=E6=9D=BF=E7=95=8C=E9=9D=A2=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- config.gradle | 4 +- gradle.properties | 132 +++++++++--------- libraries/map-custom/build.gradle | 2 +- libraries/tanlulib/build.gradle | 6 +- modules.txt | 12 +- .../extensions/entrance/EntranceFragment.java | 12 +- .../extensions/utils/AdasNoticeHelper.java | 3 + .../utils/TrafficLightPanelManager.java | 83 +++++++++++ .../view/VerticalTrafficLightView.java | 3 +- .../res/drawable/module_ext_navi_in_vr_bg.xml | 3 +- .../main/res/layout/include_navi_in_vr.xml | 119 ++++++++++++---- .../merge_vertical_traffic_light_in_vr.xml | 2 + .../res/layout/module_ext_layout_entrance.xml | 5 + .../src/main/res/values/dimens.xml | 5 + 15 files changed, 277 insertions(+), 116 deletions(-) create mode 100644 modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/utils/TrafficLightPanelManager.java diff --git a/build.gradle b/build.gradle index 8859cdee59..704b9467e2 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:3.5.2' - classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.71' + classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.0' classpath "com.alibaba:arouter-register:1.0.2" classpath 'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.4' // classpath ("com.tencent.matrix:matrix-gradle-plugin:0.6.6") { changing = true } diff --git a/config.gradle b/config.gradle index 690687840b..71394758d7 100644 --- a/config.gradle +++ b/config.gradle @@ -144,8 +144,8 @@ ext { eventbus : "org.greenrobot:eventbus:3.1.1", videoprocessor : "com.zhidao.video:video-processor:1.0.2.1", - coroutinescore : "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.1", - coroutinesandroid : "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.1.1", + coroutinescore : "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.3", + coroutinesandroid : "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.3", aspectj : "org.aspectj:aspectjrt:1.8.9", diff --git a/gradle.properties b/gradle.properties index 24262a25ef..56be60b7dc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -52,88 +52,88 @@ PASSWORD=xintai2018 RELEASE=false # 模块版本 ## 工程内模块 -MOGO_COMMONS_VERSION=2.0.7 -MOGO_UTILS_VERSION=2.0.7 -MAP_AMAP_VERSION=2.0.7 -MAP_AUTONAVI_VERSION=2.0.7 -MOGO_MAP_VERSION=2.0.7 -MOGO_MAP_API_VERSION=2.0.7 -MOGO_SERVICE_VERSION=2.0.7 -MOGO_SERVICE_API_VERSION=2.0.8 -MOGO_CONNECTION_VERSION=2.0.7 -MOGO_MODULE_APPS_VERSION=2.0.7 -MOGO_MODULE_NAVI_VERSION=2.0.7 -MOGO_MODULE_SHARE_VERSION=2.0.7 -MOGO_MODULE_COMMON_VERSION=2.0.7 -MOGO_MODULE_MAIN_VERSION=2.0.7 -MOGO_MODULE_MAP_VERSION=2.0.7 -MOGO_MODULE_SERVICE_VERSION=2.0.7 -MOGO_MODULE_EXTENSIONS_VERSION=2.0.7 -MOGO_MODULE_SEARCH_VERSION=2.0.7 -MOGO_MODULE_BACK_VERSION=2.0.7 -MOGO_MODULE_GPS_SIMULATOR_VERSION=2.0.7 -MOGO_MODULE_GPS_SIMULATOR_DEBUG_VERSION=2.0.7 -MOGO_MODULE_GPS_SIMULATOR_NOOP_VERSION=2.0.7 -MOGO_MODULE_AUTHORIZE_VERSION=2.0.7 -MOGO_MODULE_GUIDE_VERSION=2.0.7 -MOGO_MODULE_MEDIA_VERSION=2.0.7 -MOGO_MODULE_MAIN_LAUNCHER_VERSION=2.0.7 -MOGO_MODULE_MAIN_INDEPENDENT_VERSION=2.0.7 -MOGO_MODULE_V2X_VERSION=2.0.7 +MOGO_COMMONS_VERSION=2.0.12 +MOGO_UTILS_VERSION=2.0.12 +MAP_AMAP_VERSION=2.0.12 +MAP_AUTONAVI_VERSION=2.0.12 +MOGO_MAP_VERSION=2.0.12 +MOGO_MAP_API_VERSION=2.0.12 +MOGO_SERVICE_VERSION=2.0.12 +MOGO_SERVICE_API_VERSION=2.0.12 +MOGO_CONNECTION_VERSION=2.0.12 +MOGO_MODULE_APPS_VERSION=2.0.12 +MOGO_MODULE_NAVI_VERSION=2.0.12 +MOGO_MODULE_SHARE_VERSION=2.0.12 +MOGO_MODULE_COMMON_VERSION=2.0.12 +MOGO_MODULE_MAIN_VERSION=2.0.12 +MOGO_MODULE_MAP_VERSION=2.0.12 +MOGO_MODULE_SERVICE_VERSION=2.0.12 +MOGO_MODULE_EXTENSIONS_VERSION=2.0.12 +MOGO_MODULE_SEARCH_VERSION=2.0.12 +MOGO_MODULE_BACK_VERSION=2.0.12 +MOGO_MODULE_GPS_SIMULATOR_VERSION=2.0.12 +MOGO_MODULE_GPS_SIMULATOR_DEBUG_VERSION=2.0.12 +MOGO_MODULE_GPS_SIMULATOR_NOOP_VERSION=2.0.12 +MOGO_MODULE_AUTHORIZE_VERSION=2.0.12 +MOGO_MODULE_GUIDE_VERSION=2.0.12 +MOGO_MODULE_MEDIA_VERSION=2.0.12 +MOGO_MODULE_MAIN_LAUNCHER_VERSION=2.0.12 +MOGO_MODULE_MAIN_INDEPENDENT_VERSION=2.0.12 +MOGO_MODULE_V2X_VERSION=2.0.12 # 基础服务实现:passport、socket、location -MOGO_BASE_WEBSOCKET_SDK_VERSION = 1.0.0 -MOGO_BASE_SERVICES_APK_VERSION=2.0.7 -MOGO_BASE_SERVICES_SDK_VERSION=2.0.7 +MOGO_BASE_WEBSOCKET_SDK_VERSION = 2.0.12 +MOGO_BASE_SERVICES_APK_VERSION=2.0.12 +MOGO_BASE_SERVICES_SDK_VERSION=2.0.12 ## 工程外部模块 # 探路 -MOGO_MODULE_TANLU_VERSION=2.0.7 +MOGO_MODULE_TANLU_VERSION=2.0.12 # 视频引导 -MOGO_MODULE_GUIDESHOW_VERSION=2.0.7 +MOGO_MODULE_GUIDESHOW_VERSION=2.0.12 # 推送 -MOGO_MODULE_PUSH_VERSION=2.0.7 -MOGO_MODULE_PUSH_BASE_VERSION=2.0.7 -MOGO_MODULE_PUSH_NOOP_VERSION=2.0.7 +MOGO_MODULE_PUSH_VERSION=2.0.12 +MOGO_MODULE_PUSH_BASE_VERSION=2.0.12 +MOGO_MODULE_PUSH_NOOP_VERSION=2.0.12 # 探路上报和分享模块 -TANLULIB_VERSION=2.0.7 -MOGO_TANLU_API_VERSION=2.0.7 +TANLULIB_VERSION=2.0.12 +MOGO_TANLU_API_VERSION=2.0.12 #左侧面板模块 -MOGO_MODULE_LEFT_PANEL_VERSION=2.0.7 -MOGO_MODULE_LEFT_PANEL_NOOP_VERSION=2.0.7 +MOGO_MODULE_LEFT_PANEL_VERSION=2.0.12 +MOGO_MODULE_LEFT_PANEL_NOOP_VERSION=2.0.12 # 小控件 -MOGO_MODULE_WIDGETS_VERSION=2.0.7 +MOGO_MODULE_WIDGETS_VERSION=2.0.12 # obu -MOGO_MODULE_OBU_VERSION=2.0.7 +MOGO_MODULE_OBU_VERSION=2.0.12 # 皮肤 -MOGO_SKIN_SUPPORT_VERSION=2.0.7 -MOGO_SKIN_LIGHT_VERSION=2.0.7 -MOGO_SKIN_SUPPORT_IMPL_VERSION=2.0.7 -MOGO_SKIN_SUPPORT_NOOP_VERSION=2.0.7 -SKIN_SUPPORT_VERSION=2.0.7 -SKIN_SUPPORT_APPCOMPAT_VERSION=2.0.7 -SKIN_SUPPORT_CARDVIEW_VERSION=2.0.7 -SKIN_SUPPORT_CONSTRAINT_LAYOUT_VERSION=2.0.7 -SKIN_SUPPORT_DESIGN_VERSION=2.0.7 +MOGO_SKIN_SUPPORT_VERSION=2.0.12 +MOGO_SKIN_LIGHT_VERSION=2.0.12 +MOGO_SKIN_SUPPORT_IMPL_VERSION=2.0.12 +MOGO_SKIN_SUPPORT_NOOP_VERSION=2.0.12 +SKIN_SUPPORT_VERSION=2.0.12 +SKIN_SUPPORT_APPCOMPAT_VERSION=2.0.12 +SKIN_SUPPORT_CARDVIEW_VERSION=2.0.12 +SKIN_SUPPORT_CONSTRAINT_LAYOUT_VERSION=2.0.12 +SKIN_SUPPORT_DESIGN_VERSION=2.0.12 # 闪屏页 -MOGO_MODULE_SPLASH_VERSION=2.0.7 -MOGO_MODULE_SPLASH_NOOP_VERSION=2.0.7 +MOGO_MODULE_SPLASH_VERSION=2.0.12 +MOGO_MODULE_SPLASH_NOOP_VERSION=2.0.12 # monitor -MOGO_MODULE_MONITOR_VERSION=2.0.7 +MOGO_MODULE_MONITOR_VERSION=2.0.12 # bugly -CRASHREPORT_VERSION=2.0.7 -CRASHREPORT_BUGLY_VERSION=2.0.7 -CRASHREPORT_NOOP_VERSION=2.0.7 +CRASHREPORT_VERSION=2.0.12 +CRASHREPORT_BUGLY_VERSION=2.0.12 +CRASHREPORT_NOOP_VERSION=2.0.12 ## tts -TTS_BASE_VERSION=2.0.7 -TTS_DI_VERSION=2.0.7 -TTS_ZHI_VERSION=2.0.7 -TTS_NOOP_VERSION=2.0.7 +TTS_BASE_VERSION=2.0.12 +TTS_DI_VERSION=2.0.12 +TTS_ZHI_VERSION=2.0.12 +TTS_NOOP_VERSION=2.0.12 # 自研地图 -MAP_CUSTOM_VERSION=1.2.1.9 -MOGO_MODULES_MVISION_VERSION=1.0.0 +MAP_CUSTOM_VERSION=2.0.12 +MOGO_MODULES_MVISION_VERSION=2.0.12 # httpdns -HTTPDNS_TENCENT_VERSION = 1.0.0 -HTTPDNS_BASE_VERSION = 1.0.0 -HTTPDNS_NOOP_VERSION = 1.0.0 +HTTPDNS_TENCENT_VERSION = 2.0.12 +HTTPDNS_BASE_VERSION = 2.0.12 +HTTPDNS_NOOP_VERSION = 2.0.12 ######## 外部依赖引用 # 车聊聊 diff --git a/libraries/map-custom/build.gradle b/libraries/map-custom/build.gradle index ee7e68bcb6..3b997c48a7 100644 --- a/libraries/map-custom/build.gradle +++ b/libraries/map-custom/build.gradle @@ -39,7 +39,7 @@ dependencies { implementation rootProject.ext.dependencies.androidxappcompat - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation rootProject.ext.dependencies.kotlinstdlibjdk7 // api rootProject.ext.dependencies.amapnavi3dmap // api rootProject.ext.dependencies.amapsearch diff --git a/libraries/tanlulib/build.gradle b/libraries/tanlulib/build.gradle index dba6a1d3df..a23d2e6cb8 100644 --- a/libraries/tanlulib/build.gradle +++ b/libraries/tanlulib/build.gradle @@ -72,9 +72,9 @@ dependencies { kapt rootProject.ext.dependencies.aroutercompiler if (Boolean.valueOf(RELEASE)) { - compileOnly rootProject.ext.dependencies.mogocommons - compileOnly rootProject.ext.dependencies.mogomap - compileOnly rootProject.ext.dependencies.mogoserviceapi + implementation rootProject.ext.dependencies.mogocommons + implementation rootProject.ext.dependencies.mogomap + implementation rootProject.ext.dependencies.mogoserviceapi } else { implementation project(':modules:mogo-module-common') implementation project(':libraries:mogo-map') diff --git a/modules.txt b/modules.txt index 59dbcdef06..c15cf56b13 100644 --- a/modules.txt +++ b/modules.txt @@ -2,12 +2,11 @@ :skin:mogo-skin-support :tts:tts-base :tts:tts-zhi -:tts:tts-di -:tts:tts-noop -:foudations:mogo-commons :foudations:httpdns-base :foudations:httpdns-noop -:foudations:httpdns-tencent +:foudations:mogo-commons +:tts:tts-di +:tts:tts-noop :libraries:mogo-map-api :skin:skin-support :skin:skin-support-appcompat @@ -17,8 +16,10 @@ :services:mogo-service-api :libraries:map-amap :libraries:map-autonavi +:libraries:map-custom :libraries:mogo-map :modules:mogo-module-common +:foudations:httpdns-tencent :skin:mogo-skin-support-impl :skin:mogo-skin-support-noop :test:crashreport @@ -29,9 +30,6 @@ :modules:mogo-module-obu :modules:mogo-module-map :modules:mogo-module-apps -:modules:mogo-module-gps-simulator -:modules:mogo-module-gps-simulator-debug -:modules:mogo-module-gps-simulator-noop :modules:mogo-module-service :modules:mogo-module-authorize :modules:mogo-module-share 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 f988ed34db..87371b2ce8 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 @@ -57,6 +57,7 @@ import com.mogo.module.extensions.utils.EntranceViewHolder; import com.mogo.module.extensions.utils.NoMapTopViewShaderHelper; import com.mogo.module.extensions.utils.TopViewAnimHelper; import com.mogo.module.extensions.utils.TopViewNoLinkageAnimHelper; +import com.mogo.module.extensions.utils.TrafficLightPanelManager; import com.mogo.module.share.manager.ServiceApisManager; import com.mogo.service.IMogoServiceApis; import com.mogo.service.analytics.IMogoAnalytics; @@ -483,6 +484,8 @@ public class EntranceFragment extends MvpFragment + * 导航信息内容通过{@link com.mogo.module.extensions.navi.VrModeNavInfoView} 在{@link com.mogo.module.extensions.entrance.EntranceFragment}进行控制 + * 此处仅控制导航信息的显示与隐藏 + * + * @author tongchenfei + */ +public class TrafficLightPanelManager { + private static final String TAG = "TrafficLightPanelManager"; + + private TrafficLightPanelManager() { + } + + private final static TrafficLightPanelManager INSTANCE = new TrafficLightPanelManager(); + + public static TrafficLightPanelManager getInstance() { + return INSTANCE; + } + + private Group speedGroup, navGroup, extraGroup; + private TextView tvLimitSpeed; + private VerticalTrafficLightView turnAroundLight, turnLeftLight, straightLight, turnRightLight; + + private boolean isInit = false; + + public void initPanel(View root) { + speedGroup = root.findViewById(R.id.module_ext_id_group_navi_in_vr_speed); + navGroup = root.findViewById(R.id.module_ext_id_group_navi_in_vr_nav_info); + extraGroup = root.findViewById(R.id.module_ext_id_group_traffic_light_panel_extra); + tvLimitSpeed = root.findViewById(R.id.module_ext_id_tv_limit_speed); + turnAroundLight = root.findViewById(R.id.module_ext_id_traffic_light_turn_around); + turnLeftLight = root.findViewById(R.id.module_ext_id_traffic_light_turn_left); + straightLight = root.findViewById(R.id.module_ext_id_traffic_light_straight); + turnRightLight = root.findViewById(R.id.module_ext_id_traffic_light_turn_right); + isInit = true; + } + + public void showNavPanel() { + if (!isInit) { + Logger.e(TAG, "nav panel 未初始化"); + return; + } + extraGroup.setVisibility(View.VISIBLE); + speedGroup.setVisibility(View.VISIBLE); +// navGroup.setVisibility(View.VISIBLE); + tvLimitSpeed.setVisibility(View.VISIBLE); + } + + public void hideNavPanel() { + if (!isInit) { + Logger.e(TAG, "nav panel 未初始化"); + return; + } + extraGroup.setVisibility(View.GONE); + speedGroup.setVisibility(View.GONE); +// navGroup.setVisibility(View.GONE); + tvLimitSpeed.setVisibility(View.GONE); + } + + public void release() { + isInit = false; + speedGroup = null; + navGroup = null; + extraGroup = null; + tvLimitSpeed = null; + turnAroundLight = null; + turnLeftLight = null; + straightLight = null; + turnRightLight = null; + } +} diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/view/VerticalTrafficLightView.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/view/VerticalTrafficLightView.java index 417309fc64..c05b931aa2 100644 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/view/VerticalTrafficLightView.java +++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/view/VerticalTrafficLightView.java @@ -54,7 +54,6 @@ public class VerticalTrafficLightView extends ConstraintLayout { public VerticalTrafficLightView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); LayoutInflater.from(context).inflate(R.layout.merge_vertical_traffic_light_in_vr, this); - initView(); TypedArray typedArray = context.getTheme().obtainStyledAttributes(attrs, R.styleable.VerticalTrafficLightView, 0, 0); int lightType = typedArray.getInt(R.styleable.VerticalTrafficLightView_iconRes, 0); typedArray.recycle(); @@ -76,6 +75,7 @@ public class VerticalTrafficLightView extends ConstraintLayout { iconRes = TURN_AROUND_ICON_RES; break; } + initView(); } private void initView() { @@ -84,6 +84,7 @@ public class VerticalTrafficLightView extends ConstraintLayout { tvLeftTime = findViewById(R.id.module_ext_id_traffic_light_left_time); tvLeftTimeUnit = findViewById(R.id.module_ext_id_traffic_light_left_time_unit); groupLeftTime = findViewById(R.id.module_ext_id_group_left_time); + ivTrafficLight.setImageResource(iconRes[0]); } /** diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_navi_in_vr_bg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_navi_in_vr_bg.xml index 8ebb6406a4..d37d6205c8 100644 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_navi_in_vr_bg.xml +++ b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_navi_in_vr_bg.xml @@ -8,7 +8,8 @@ + android:endColor="#68203784" + android:angle="270"/> diff --git a/modules/mogo-module-extensions/src/main/res/layout/include_navi_in_vr.xml b/modules/mogo-module-extensions/src/main/res/layout/include_navi_in_vr.xml index 0bf3225ba9..debe55ed54 100644 --- a/modules/mogo-module-extensions/src/main/res/layout/include_navi_in_vr.xml +++ b/modules/mogo-module-extensions/src/main/res/layout/include_navi_in_vr.xml @@ -1,77 +1,112 @@ + android:background="@drawable/module_ext_navi_in_vr_bg" /> + app:layout_constraintLeft_toLeftOf="@id/module_ext_id_navi_in_vr_bg" + app:layout_constraintRight_toRightOf="@id/module_ext_id_navi_in_vr_bg" + app:layout_constraintTop_toTopOf="@id/module_ext_id_navi_in_vr_bg" /> - - + app:layout_constraintLeft_toLeftOf="@id/module_ext_id_navi_in_vr_bg" + app:layout_constraintRight_toRightOf="@id/module_ext_id_navi_in_vr_bg" /> + app:layout_constraintBottom_toTopOf="@id/module_ext_id_navi_in_vr_traffic_bg" + app:layout_constraintLeft_toLeftOf="@id/module_ext_id_navi_in_vr_bg" + app:layout_constraintTop_toTopOf="@id/module_ext_id_navi_in_vr_bg" /> + app:layout_constraintLeft_toRightOf="@id/module_ext_id_tv_speed" /> + + + + + + + + + + + app:layout_constraintRight_toRightOf="@id/module_ext_id_navi_in_vr_bg" + app:layout_constraintTop_toTopOf="@id/module_ext_id_navi_in_vr_bg" /> + app:layout_constraintRight_toLeftOf="@id/module_ext_id_traffic_light_turn_left" + app:layout_constraintTop_toTopOf="@id/module_ext_id_navi_in_vr_traffic_bg" /> + app:layout_constraintRight_toRightOf="@id/module_ext_id_navi_in_vr_traffic_bg" + app:layout_constraintTop_toTopOf="@id/module_ext_id_traffic_light_straight" /> + + + + + \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/layout/merge_vertical_traffic_light_in_vr.xml b/modules/mogo-module-extensions/src/main/res/layout/merge_vertical_traffic_light_in_vr.xml index 391cdb1d56..9c14f81fb8 100644 --- a/modules/mogo-module-extensions/src/main/res/layout/merge_vertical_traffic_light_in_vr.xml +++ b/modules/mogo-module-extensions/src/main/res/layout/merge_vertical_traffic_light_in_vr.xml @@ -7,6 +7,8 @@ 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 f877c89973..9f023a93dd 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 @@ -16,6 +16,11 @@ android:layout_width="match_parent" android:layout_height="wrap_content" /> + + 464px 304px + 100px + 60px + 48px + 26px 458px 298px 140px @@ -233,4 +237,5 @@ 21px 21px + \ No newline at end of file