[fea]
[默认预测不展示高精]
This commit is contained in:
yangyakun
2025-05-15 15:11:25 +08:00
parent 93a805bc83
commit 510bfb3e8b
2 changed files with 40 additions and 2 deletions

View File

@@ -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
}
}
// 不展示高精 展示高德

View File

@@ -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 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.appcompat.widget.AppCompatButton
android:elevation="6dp"
android:id="@+id/acbtn_show_hdmap"
android:text="展示高精"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<androidx.appcompat.widget.AppCompatButton
app:layout_constraintTop_toBottomOf="@+id/acbtn_show_hdmap"
android:id="@+id/acbtn_show_all"
android:elevation="6dp"
android:text="都展示"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</merge>