[首页页面]
This commit is contained in:
yangyakun
2023-07-13 20:46:23 +08:00
parent 8fd2e71f60
commit 7321815e05
30 changed files with 151 additions and 70 deletions

View File

@@ -5,8 +5,10 @@ import android.view.View
import com.mogo.commons.mvp.MvpFragment
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getState
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.function.hmi.ui.widget.RomaPassengerView
import com.mogo.eagle.core.function.view.MapBizView
import com.mogo.eagle.core.utilcode.kotlin.onClick
import com.mogo.eagle.core.utilcode.util.DeviceUtils
import com.mogo.eagle.core.utilcode.util.OverlayViewUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
@@ -21,9 +23,14 @@ import com.mogo.och.taxi.passenger.presenter.BaseTaxiPassengerPresenter
import com.mogo.och.taxi.passenger.ui.bottom.BottomBar
import com.mogo.och.taxi.passenger.ui.comment.TaxiPassengerArrivedView
import kotlinx.android.synthetic.main.taxi_p_base_fragment.bottom
import kotlinx.android.synthetic.main.taxi_p_base_fragment.ck_setting
import kotlinx.android.synthetic.main.taxi_p_base_fragment.itinerary
import kotlinx.android.synthetic.main.taxi_p_base_fragment.mapBizView
import kotlinx.android.synthetic.main.taxi_p_base_fragment.overMapView
import kotlinx.android.synthetic.main.taxi_p_base_fragment.pcnActionView
import kotlinx.android.synthetic.main.taxi_p_base_fragment.romaPView
import kotlinx.android.synthetic.main.taxi_p_base_fragment.rv_location_center
import kotlinx.android.synthetic.main.taxi_p_base_fragment.traffic_light_view
import java.lang.ref.WeakReference
/**
@@ -38,8 +45,6 @@ class TaxiPassengerBaseFragment() :
MvpFragment<TaxiPassengerBaseFragment?, BaseTaxiPassengerPresenter?>(), IMogoMapListener,
TaxiPassengerTaxiView, ITPClickStartAutopilotCallback {
private var romaPView: RomaPassengerView? = null
/**
* 到达目的地
*/
@@ -64,12 +69,6 @@ class TaxiPassengerBaseFragment() :
}
override fun initViews() {
romaPView = findViewById(R.id.romaPView)
if (DeviceUtils.isLenovoModel() || DeviceUtils.isEB5Model()) {
romaPView!!.visibility = View.VISIBLE
} else {
romaPView!!.visibility = View.GONE
}
initListener()
onAutopilotStatusChanged(getState())
}
@@ -83,20 +82,69 @@ class TaxiPassengerBaseFragment() :
private fun initListener() {
bottom.setOverMapApplyClick(object : BottomBar.ApplyClickLintener{
override fun onApplyClick(selectItem: BottomBar.SelectView) {
if(selectItem == BottomBar.SelectView.OVERMAPVIEW){
overMapView.visibility = View.VISIBLE
}else{
overMapView.visibility = View.GONE
}
if(selectItem == BottomBar.SelectView.PRECISIONMAP){
mapBizView.visibility = View.VISIBLE
itinerary.visibility = View.VISIBLE
}else{
mapBizView.visibility = View.GONE
itinerary.visibility = View.GONE
when (selectItem) {
BottomBar.SelectView.PRECISIONMAP -> {
overMapView.visibility = View.GONE
mapBizView.visibility = View.VISIBLE
itinerary.visibility = View.VISIBLE
ck_setting.visibility = View.VISIBLE
if (DeviceUtils.isLenovoModel() || DeviceUtils.isEB5Model()) {
romaPView.visibility = View.VISIBLE
} else {
romaPView.visibility = View.GONE
}
rv_location_center.visibility = View.VISIBLE
pcnActionView.visibility = View.VISIBLE
traffic_light_view.visibility = View.VISIBLE
}
BottomBar.SelectView.OVERMAPVIEW -> {
overMapView.visibility = View.VISIBLE
mapBizView.visibility = View.GONE
itinerary.visibility = View.VISIBLE
ck_setting.visibility = View.VISIBLE
if (DeviceUtils.isLenovoModel() || DeviceUtils.isEB5Model()) {
romaPView.visibility = View.VISIBLE
} else {
romaPView.visibility = View.GONE
}
rv_location_center.visibility = View.VISIBLE
pcnActionView.visibility = View.VISIBLE
traffic_light_view.visibility = View.VISIBLE
}
BottomBar.SelectView.VIDEO -> {
overMapView.visibility = View.GONE
mapBizView.visibility = View.GONE
itinerary.visibility = View.GONE
ck_setting.visibility = View.GONE
romaPView.visibility = View.GONE
rv_location_center.visibility = View.GONE
pcnActionView.visibility = View.GONE
traffic_light_view.visibility = View.GONE
}
}
}
})
rv_location_center.onClick {
when (bottom.getCurrentPage()) {
BottomBar.SelectView.PRECISIONMAP -> {
val controller = CallerMapUIServiceManager.getMapUIController()
if (controller != null) {
//切换到地图中间
controller.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null)
// 切换缩放到中视角
controller.changeZoom2(0.8f)
}
}
BottomBar.SelectView.OVERMAPVIEW -> {
overMapView.displayCustomOverView()
}
else -> {}
}
}
}
private fun initArrivedView() {
mArrivedEndView = WeakReference(TaxiPassengerArrivedView(context))

View File

@@ -33,6 +33,10 @@ class BottomBar @JvmOverloads constructor(
}
}
fun getCurrentPage():SelectView{
return checkIndex
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
setCheckIndex(SelectView.PRECISIONMAP)

View File

@@ -68,11 +68,11 @@ open class BottomCheckView @JvmOverloads constructor(
if (isCheck) {
backageView?.visibility = View.VISIBLE
aciv_center_image.setImageResource(selectedDrawable)
actv_title.setTextColor(bottomTitleNormalColor)
actv_title.setTextColor(bottomTitleCheckedColor)
} else {
backageView?.visibility = View.GONE
aciv_center_image.setImageResource(normalDrawable)
actv_title.setTextColor(bottomTitleCheckedColor)
actv_title.setTextColor(bottomTitleNormalColor)
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 323 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android" tools:ignore="MissingDefaultResource">
<item android:drawable="@drawable/iv_roma_taxi_passenger_press_bg" android:state_focused="true" android:state_pressed="true" />
<item android:drawable="@drawable/iv_roma_taxi_passenger_press_bg" android:state_focused="false" android:state_pressed="true" />
<item android:drawable="@drawable/iv_roma_taxi_passenger_press_bg" android:state_selected="true" />
<item android:drawable="@drawable/iv_roma_taxi_passenger_press_bg" android:state_focused="true" />
<item android:drawable="@drawable/iv_roma_passenger_bg" />
<item android:drawable="@drawable/taxi_p_roma_checked" android:state_focused="true" android:state_pressed="true" />
<item android:drawable="@drawable/taxi_p_roma_checked" android:state_focused="false" android:state_pressed="true" />
<item android:drawable="@drawable/taxi_p_roma_checked" android:state_selected="true" />
<item android:drawable="@drawable/taxi_p_roma_checked" android:state_focused="true" />
<item android:drawable="@drawable/taxi_p_roma_normal" />
</selector>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android" tools:ignore="MissingDefaultResource">
<item android:drawable="@drawable/taxi_p_setting_checked" android:state_focused="true" android:state_pressed="true" />
<item android:drawable="@drawable/taxi_p_setting_checked" android:state_focused="false" android:state_pressed="true" />
<item android:drawable="@drawable/taxi_p_setting_checked" android:state_selected="true" />
<item android:drawable="@drawable/taxi_p_setting_checked" android:state_focused="true" />
<item android:drawable="@drawable/taxi_p_setting_normal" />
</selector>

View File

@@ -2,7 +2,7 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_107"
android:layout_height="@dimen/dp_160"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"
tools:ignore="MissingDefaultResource">
@@ -12,16 +12,17 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="@dimen/dp_90"
android:layout_height="@dimen/dp_90"/>
android:layout_marginTop="@dimen/dp_16"
android:layout_width="@dimen/dp_81"
android:layout_height="@dimen/dp_81"/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/actv_title"
app:layout_constraintStart_toStartOf="@+id/aciv_center_image"
app:layout_constraintEnd_toEndOf="@+id/aciv_center_image"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="@dimen/dp_4_5"
android:textSize="@dimen/dp_20"
android:layout_marginBottom="@dimen/dp_21"
android:textSize="@dimen/dp_27"
android:text="靠边停车"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>

View File

@@ -10,9 +10,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
app:startPointDrawable="@drawable/taxi_p_map_view_dir_start"
app:endPointDrawable="@drawable/taxi_p_map_view_dir_end"
app:mapStyleExtraPath="map_style_extra.data"
app:mapStylePath="map_style.data" />
app:endPointDrawable="@drawable/taxi_p_map_view_dir_end" />
<!-- 高精地图 -->
<com.mogo.eagle.core.function.view.MapBizView
@@ -22,6 +20,7 @@
<!--pnc行为决策-->
<com.mogo.eagle.core.function.hmi.ui.vehicle.PncActionsView
android:id="@+id/pcnActionView"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_100"
android:layout_marginBottom="@dimen/dp_110"
@@ -29,19 +28,39 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<CheckBox
android:id="@+id/ck_setting"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:background="@drawable/taxi_p_setting_selector"
android:button="@null"
android:layout_marginTop="@dimen/dp_100"
android:layout_marginStart="@dimen/dp_40"
android:layout_width="@dimen/dp_120"
android:layout_height="@dimen/dp_120"/>
<!-- 漫游按钮 -->
<com.mogo.eagle.core.function.hmi.ui.widget.RomaPassengerView
android:id="@+id/romaPView"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_marginStart="@dimen/dp_557"
android:layout_width="@dimen/dp_120"
android:layout_height="@dimen/dp_120"
android:layout_marginStart="@dimen/dp_220"
android:layout_marginTop="100dp"
android:background="@drawable/roma_taxi_p_bg_selector"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:roma_close="@drawable/roma_taxi_p_bg_selector"
app:roma_open="@drawable/iv_roma_taxi_passenger_press_bg"
/>
app:roma_open="@drawable/taxi_p_roma_checked" />
<TextView
android:id="@+id/rv_location_center"
android:background="@drawable/taxi_p_location_center"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginEnd="@dimen/dp_40"
android:layout_width="@dimen/dp_96"
android:layout_height="@dimen/dp_96"/>
<!-- 红绿灯 -->
<com.mogo.eagle.core.function.hmi.ui.widget.SingleTrafficLightView
@@ -59,9 +78,7 @@
android:id="@+id/itinerary"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@+id/bottom"
android:layout_marginStart="@dimen/dp_48"
android:layout_marginBottom="@dimen/dp_42"
android:layout_width="@dimen/dp_726"
android:layout_width="@dimen/dp_842"
android:layout_height="wrap_content"/>
<!-- 底部导航栏 -->

View File

@@ -4,6 +4,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/dp_160"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:background="@drawable/taxi_p_bottom_bar_bg"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"
tools:ignore="MissingDefaultResource">
@@ -28,16 +29,19 @@
android:src="@drawable/taxi_p_bottom_bar_select_bg"
app:layout_constraintStart_toStartOf="@+id/actv_precisionmap"
app:layout_constraintEnd_toEndOf="@+id/actv_precisionmap"
android:layout_width="@dimen/dp_359"
android:layout_height="@dimen/dp_107"/>
android:layout_width="@dimen/dp_420"
android:layout_height="@dimen/dp_160"/>
<com.mogo.och.bus.passenger.ui.view.bottom.BottomCheckView
android:id="@+id/actv_precisionmap"
app:backageViewId="@+id/actv_precisionmap_press"
app:layout_constraintHorizontal_chainStyle="packed"
app:selectedDrawable="@drawable/charter_p_bottom_softsettiing_press"
app:normalDrawable="@drawable/charter_p_bottom_softsettiing_normal"
app:selectedDrawable="@drawable/taxi_p_bottom_precisionmap_press"
app:normalDrawable="@drawable/taxi_p_bottom_precisionmap_normal"
android:layout_marginEnd="@dimen/dp_107"
app:bottomTitle="行车实况"
app:bottomTitleCheckedColor="@color/white"
app:bottomTitleNormalColor="@color/taxi_p_41444D"
app:layout_constraintEnd_toStartOf="@+id/actv_overmap"
app:layout_constraintStart_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
@@ -54,15 +58,19 @@
android:src="@drawable/taxi_p_bottom_bar_select_bg"
app:layout_constraintStart_toStartOf="@+id/actv_overmap"
app:layout_constraintEnd_toEndOf="@+id/actv_overmap"
android:layout_width="@dimen/dp_359"
android:layout_height="@dimen/dp_107"/>
android:layout_width="@dimen/dp_420"
android:layout_height="@dimen/dp_160"/>
<com.mogo.och.bus.passenger.ui.view.bottom.BottomCheckView
android:id="@+id/actv_overmap"
app:backageViewId="@+id/actv_overmap_press"
app:selectedDrawable="@drawable/charter_p_bottom_softsettiing_press"
app:normalDrawable="@drawable/charter_p_bottom_softsettiing_normal"
app:selectedDrawable="@drawable/taxi_p_bottom_overmap_press"
app:normalDrawable="@drawable/taxi_p_bottom_overmap_normal"
app:bottomTitle="全局概览"
app:bottomTitleCheckedColor="@color/white"
android:layout_marginEnd="@dimen/dp_107"
android:layout_marginStart="@dimen/dp_107"
app:bottomTitleNormalColor="@color/taxi_p_41444D"
app:layout_constraintStart_toEndOf="@+id/actv_precisionmap"
app:layout_constraintEnd_toStartOf="@+id/actv_video"
app:layout_constraintTop_toTopOf="parent"
@@ -79,15 +87,18 @@
android:src="@drawable/taxi_p_bottom_bar_select_bg"
app:layout_constraintStart_toStartOf="@+id/actv_video"
app:layout_constraintEnd_toEndOf="@+id/actv_video"
android:layout_width="@dimen/dp_359"
android:layout_height="@dimen/dp_107"/>
android:layout_width="@dimen/dp_420"
android:layout_height="@dimen/dp_160"/>
<com.mogo.och.bus.passenger.ui.view.bottom.BottomCheckView
android:id="@+id/actv_video"
app:backageViewId="@+id/actv_video_press"
app:selectedDrawable="@drawable/charter_p_bottom_softsettiing_press"
app:normalDrawable="@drawable/charter_p_bottom_softsettiing_normal"
app:selectedDrawable="@drawable/taxi_p_bottom_video_press"
app:normalDrawable="@drawable/taxi_p_bottom_video_normal"
app:bottomTitle="蘑菇咨询"
android:layout_marginStart="@dimen/dp_107"
app:bottomTitleCheckedColor="@color/white"
app:bottomTitleNormalColor="@color/taxi_p_41444D"
app:layout_constraintStart_toEndOf="@+id/actv_overmap"
app:layout_constraintEnd_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"

View File

@@ -2,7 +2,7 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="@dimen/dp_726"
android:layout_width="@dimen/dp_842"
android:layout_height="wrap_content"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
@@ -12,10 +12,9 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="@+id/progress"
android:background="@color/taxi_p_A7BDF3"
android:layout_marginTop="@dimen/dp_88"
android:layout_width="@dimen/dp_726"
android:layout_height="0dp"/>
android:background="@drawable/taxi_p_itinerary_bg"
android:layout_width="@dimen/dp_842"
android:layout_height="@dimen/dp_466"/>
<androidx.appcompat.widget.AppCompatTextView

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@drawable/iv_roma_passenger_bg"
tools:ignore="MissingDefaultResource">
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -69,6 +69,7 @@
<color name="taxi_p_6edbdc">#6edbdc</color>
<color name="taxi_p_56efa0">#56efa0</color>
<color name="taxi_p_A7BDF3">#A7BDF3</color>
<color name="taxi_p_41444D">#41444D</color>
</resources>

View File

@@ -325,7 +325,8 @@ def variantName() {
}else if (taskName.contains("Dali")) {
project.dependencies.add('implementation', project.project(':tts:tts-pad'))
}else {
// 不能再else 加任何逻辑 是android dlc的特效
println("-----------$taskName")
}
taskName = taskName.replace("Debug", "")