From 510bfb3e8b7bb938756ef22c2f9172eee14ccd1f Mon Sep 17 00:00:00 2001 From: yangyakun Date: Thu, 15 May 2025 15:11:25 +0800 Subject: [PATCH] =?UTF-8?q?[8.0.0]=20[fea]=20[=E9=BB=98=E8=AE=A4=E9=A2=84?= =?UTF-8?q?=E6=B5=8B=E4=B8=8D=E5=B1=95=E7=A4=BA=E9=AB=98=E7=B2=BE]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../passenger/ui/homepage/HomeView.kt | 25 +++++++++++++++++-- .../src/main/res/layout/taxi_p_home.xml | 17 +++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/homepage/HomeView.kt b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/homepage/HomeView.kt index 28dca0c4c9..6a7e480c80 100644 --- a/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/homepage/HomeView.kt +++ b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/homepage/HomeView.kt @@ -12,15 +12,19 @@ import androidx.constraintlayout.widget.Guideline import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.findViewTreeViewModelStoreOwner import com.mogo.eagle.core.data.map.MogoLatLng +import com.mogo.eagle.core.utilcode.kotlin.onClick import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.och.bridge.autopilot.location.OchLocationManager import com.mogo.och.unmanned.passenger.ui.bar.LeftBarView import com.mogo.och.unmanned.taxi.passenger.R +import kotlinx.android.synthetic.main.taxi_p_home.view.acbtn_show_all +import kotlinx.android.synthetic.main.taxi_p_home.view.acbtn_show_hdmap import kotlinx.android.synthetic.main.taxi_p_home.view.decContainer import kotlinx.android.synthetic.main.taxi_p_home.view.hdMapView import kotlinx.android.synthetic.main.taxi_p_home.view.preContainer import kotlinx.android.synthetic.main.taxi_p_home.view.lbv_go2_center import kotlinx.android.synthetic.main.taxi_p_home.view.leftEndGuideline +import kotlinx.android.synthetic.main.taxi_p_home.view.midContainer import kotlinx.android.synthetic.main.taxi_p_home.view.midStartGuideline class HomeView @JvmOverloads constructor( @@ -60,12 +64,25 @@ class HomeView @JvmOverloads constructor( }) + acbtn_show_hdmap.onClick { + showHdMap() + } + acbtn_show_all.onClick { + showAmapAndHdMap() + } + } + /** + * 展示两屏幕 + */ fun showHdMap(){ updateViewState(true,false,false) } + /** + * 展示3屏 + */ fun showAmapAndHdMap(){ updateViewState(true,true,false) } @@ -120,7 +137,7 @@ class HomeView @JvmOverloads constructor( showAMapView: Boolean, animate: Boolean = true ) { - // 展示高德地图和高精地图 + // 展示预测地图和高精地图 if (showHDMapView && showAMapView) { CallerLogger.d(TAG,"展示高德地图和高精地图${showHDMapView}_$showAMapView") midStartGuideline.setGuidelinePercent(0.333f) @@ -131,13 +148,15 @@ class HomeView @JvmOverloads constructor( 1000 ) { lbv_go2_center.visibility = GONE + midContainer.visibility = VISIBLE } } else { leftEndGuideline.setGuidelinePercent(0.333f) lbv_go2_center.visibility = GONE + midContainer.visibility = VISIBLE } } - // 不展示高德 展示高精 + // 不展示预测 展示高精 if (showHDMapView && !showAMapView) { CallerLogger.d(TAG,"展示高德 不展示高精${showHDMapView}_$showAMapView") if (animate) { @@ -147,11 +166,13 @@ class HomeView @JvmOverloads constructor( 1000, end = { lbv_go2_center.visibility = VISIBLE + midContainer.visibility = GONE } ) } else { leftEndGuideline.setGuidelinePercent(0.666f) lbv_go2_center.visibility = VISIBLE + midContainer.visibility = GONE } } // 不展示高精 展示高德 diff --git a/OCH/taxi/unmanned-passenger/src/main/res/layout/taxi_p_home.xml b/OCH/taxi/unmanned-passenger/src/main/res/layout/taxi_p_home.xml index 23b9071c82..10dd33baef 100644 --- a/OCH/taxi/unmanned-passenger/src/main/res/layout/taxi_p_home.xml +++ b/OCH/taxi/unmanned-passenger/src/main/res/layout/taxi_p_home.xml @@ -27,6 +27,7 @@ android:layout_width="0dp" android:layout_height="match_parent" android:layout_marginBottom="@dimen/dp_10" + android:visibility="gone" app:layout_constraintTop_toTopOf="parent" android:layout_marginStart="-6.5dp" android:layout_marginEnd="-6.5dp" @@ -145,5 +146,21 @@ + + + \ No newline at end of file