[6.5.0]
[fea] [司机屏 全局概览 修改]
@@ -17,17 +17,6 @@ class OverMapBottomView @JvmOverloads constructor(
|
||||
|
||||
private fun initView() {
|
||||
LayoutInflater.from(context).inflate(R.layout.common_overmap_bottom, this, true)
|
||||
// 定义渐变的方向
|
||||
// 定义渐变的方向
|
||||
val orientation = GradientDrawable.Orientation.LEFT_RIGHT
|
||||
val temp01 = GradientDrawable(orientation, intArrayOf(
|
||||
Color.parseColor("#33D7E5FF"),
|
||||
Color.parseColor("#E6EFFF"),
|
||||
Color.parseColor("#E6EFFF"),
|
||||
Color.parseColor("#E6EFFF"),
|
||||
Color.parseColor("#33D7E5FF"),
|
||||
))
|
||||
background = temp01
|
||||
}
|
||||
|
||||
init {
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.mogo.och.common.module.wigets.map.overmapview
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.lifecycle.LifecycleObserver
|
||||
import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.widget.media.video.TextureVideoViewOutlineProvider
|
||||
import com.mogo.och.common.module.R
|
||||
import kotlinx.android.synthetic.main.common_overmap_dialog.aciv_close_map
|
||||
import kotlinx.android.synthetic.main.common_overmap_dialog.repvErrorPointReason
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
|
||||
class OverMapDialog(context: Context) : BaseFloatDialog(context), LifecycleObserver {
|
||||
|
||||
init {
|
||||
setContentView(R.layout.common_overmap_dialog)
|
||||
setCanceledOnTouchOutside(true)
|
||||
aciv_close_map.onClick {
|
||||
hideDialog()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
repvErrorPointReason?.let {
|
||||
it.onCreateView(savedInstanceState)
|
||||
val radius = AutoSizeUtils.dp2px(context, 16f)
|
||||
it.outlineProvider = TextureVideoViewOutlineProvider(radius.toFloat())
|
||||
it.clipToOutline = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
repvErrorPointReason.onResume()
|
||||
}
|
||||
|
||||
override fun onStop() {
|
||||
super.onStop()
|
||||
repvErrorPointReason.onResume()
|
||||
}
|
||||
|
||||
|
||||
|
||||
fun showDialog() {
|
||||
if (isShowing) {
|
||||
return
|
||||
}
|
||||
show()
|
||||
}
|
||||
|
||||
fun hideDialog() {
|
||||
if (isShowing) {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
fun destory(){
|
||||
repvErrorPointReason.onDestroy()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.mogo.och.common.module.wigets.map.overmapview
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.RelativeLayout
|
||||
import com.mogo.och.common.module.R
|
||||
import kotlinx.android.synthetic.main.common_overmap_view.view.travelRealityView
|
||||
|
||||
class OverMapView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : RelativeLayout(context, attrs, defStyleAttr){
|
||||
|
||||
|
||||
private fun initView() {
|
||||
LayoutInflater.from(context).inflate(R.layout.common_overmap_view, this, true)
|
||||
}
|
||||
|
||||
fun onCreateView(savedInstanceState: Bundle?) {
|
||||
travelRealityView.onCreateView(savedInstanceState)
|
||||
}
|
||||
|
||||
fun onResume() {
|
||||
travelRealityView.onResume()
|
||||
}
|
||||
|
||||
fun onPause() {
|
||||
travelRealityView.onPause()
|
||||
}
|
||||
|
||||
fun onDestroy() {
|
||||
travelRealityView.onDestroy()
|
||||
}
|
||||
|
||||
init {
|
||||
try {
|
||||
initView()
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
BIN
OCH/common/common/src/main/res/drawable-nodpi/common_close_100x100.png
Executable file
|
After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 768 B After Width: | Height: | Size: 768 B |
|
Before Width: | Height: | Size: 1009 B After Width: | Height: | Size: 1009 B |
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.och.common.module.wigets.map.overmapview.OverMapView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/repvErrorPointReason"
|
||||
android:layout_width="2286dp"
|
||||
android:layout_height="@dimen/dp_1200">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_close_map"
|
||||
android:src="@drawable/common_close_100x100"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_100"/>
|
||||
|
||||
|
||||
</com.mogo.och.common.module.wigets.map.overmapview.OverMapView>
|
||||
143
OCH/common/common/src/main/res/layout/common_overmap_view.xml
Normal file
@@ -0,0 +1,143 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:parentTag="RelativeLayout">
|
||||
|
||||
<com.mogo.eagle.core.function.view.TravelRealityView
|
||||
android:id="@+id/travelRealityView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:arrivedDrawable="@drawable/taxt_u_p_overmap_arrived"
|
||||
app:bottomPadding="160"
|
||||
app:carDrawable="@drawable/taxt_u_p_map_car"
|
||||
app:compassDrawable="@drawable/taxt_u_p_map_car_light"
|
||||
app:endPointDrawable="@drawable/taxt_u_p_map_view_dir_end"
|
||||
app:leftPadding="800"
|
||||
app:mapStyleExtraPath="over_view_style_extra.data"
|
||||
app:mapStylePath="over_view_style.data"
|
||||
app:resetDrawable="@null"
|
||||
app:rightPadding="160"
|
||||
app:startPointDrawable="@drawable/taxt_u_p_map_view_dir_start"
|
||||
app:topPadding="160"
|
||||
app:unArrivedDrawable="@drawable/taxt_u_p_overmap_arriving" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_150"
|
||||
android:background="@color/common_232A3F"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
>
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_quanxiluk"
|
||||
android:layout_width="@dimen/dp_47"
|
||||
android:layout_height="@dimen/dp_47"
|
||||
android:src="@drawable/mogo_quanxi_lukou"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/aciv_quanxiluk_value"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/aciv_quanxiluk_value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_19"
|
||||
android:layout_marginEnd="@dimen/dp_40"
|
||||
android:text="全息路口"
|
||||
android:textSize="@dimen/dp_21"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintTop_toTopOf="@+id/aciv_quanxiluk"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/aciv_quanxiluk"
|
||||
app:layout_constraintEnd_toStartOf="@+id/aciv_jingzhi"
|
||||
app:layout_constraintStart_toEndOf="@+id/aciv_quanxiluk"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_jingzhi"
|
||||
android:layout_width="@dimen/dp_47"
|
||||
android:layout_height="@dimen/dp_47"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
|
||||
android:src="@drawable/mogo_jingzhi_nor"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/aciv_quanxiluk_value"
|
||||
app:layout_constraintEnd_toStartOf="@+id/aciv_jingzhi_value"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/aciv_jingzhi_value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_19"
|
||||
android:textSize="@dimen/dp_21"
|
||||
android:text="全息路口"
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginEnd="@dimen/dp_40"
|
||||
app:layout_constraintTop_toTopOf="@+id/aciv_quanxiluk"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/aciv_quanxiluk"
|
||||
app:layout_constraintStart_toEndOf="@+id/aciv_jingzhi"
|
||||
app:layout_constraintEnd_toStartOf="@+id/aciv_shigong"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_shigong"
|
||||
android:layout_width="@dimen/dp_47"
|
||||
android:layout_height="@dimen/dp_47"
|
||||
android:src="@drawable/mogo_shigong_image"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/aciv_jingzhi_value"
|
||||
app:layout_constraintEnd_toStartOf="@+id/aciv_shigong_value"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/aciv_shigong_value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_19"
|
||||
android:textSize="@dimen/dp_21"
|
||||
android:text="全息路口"
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginEnd="@dimen/dp_40"
|
||||
app:layout_constraintTop_toTopOf="@+id/aciv_shigong"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/aciv_shigong"
|
||||
app:layout_constraintStart_toEndOf="@+id/aciv_shigong"
|
||||
app:layout_constraintEnd_toStartOf="@+id/aciv_shigu"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_shigu"
|
||||
android:layout_width="@dimen/dp_47"
|
||||
android:layout_height="@dimen/dp_47"
|
||||
android:src="@drawable/mogo_shigu_nor"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/aciv_shigong_value"
|
||||
app:layout_constraintEnd_toStartOf="@+id/aciv_shigu_value"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/aciv_shigu_value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_19"
|
||||
android:textSize="@dimen/dp_21"
|
||||
android:text="全息路口"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/aciv_shigu"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/aciv_shigu"
|
||||
app:layout_constraintStart_toEndOf="@+id/aciv_shigu"
|
||||
/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</merge>
|
||||
@@ -27,4 +27,5 @@
|
||||
<color name="common_A0B3DA">#A0B3DA</color>
|
||||
|
||||
<color name="common_3B4577">#3B4577</color>
|
||||
<color name="common_232A3F">#232A3F</color>
|
||||
</resources>
|
||||
@@ -38,6 +38,7 @@ import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.och.common.module.utils.ResourcesUtils;
|
||||
import com.mogo.och.common.module.wigets.map.orderstatus.OrderStatusView;
|
||||
import com.mogo.och.common.module.wigets.map.overmapview.OverMapDialog;
|
||||
import com.mogo.och.taxi.R;
|
||||
|
||||
|
||||
@@ -73,6 +74,8 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
|
||||
protected SmallMapView smallMapView;
|
||||
|
||||
private OverMapDialog overMapDialog;
|
||||
|
||||
private final Handler mHandler = new Handler(Looper.getMainLooper());
|
||||
|
||||
@Override
|
||||
@@ -180,7 +183,15 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
});
|
||||
|
||||
smallMapView = findViewById(R.id.smallMapView);
|
||||
|
||||
smallMapView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if(overMapDialog==null){
|
||||
overMapDialog = new OverMapDialog(getContext());
|
||||
}
|
||||
overMapDialog.showDialog();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -230,6 +241,29 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
if(smallMapView != null){
|
||||
smallMapView.onDestroy();
|
||||
}
|
||||
if(overMapDialog!=null) {
|
||||
overMapDialog.hideDialog();
|
||||
overMapDialog.destory();
|
||||
overMapDialog = null;
|
||||
}
|
||||
ctvAutopilotStatusRL = null;
|
||||
tvOperationStatus = null;
|
||||
mDriverRole = null;
|
||||
flStationPanelContainer = null;
|
||||
flNaviPanelContainer = null;
|
||||
mapBizView = null;
|
||||
mapRoamView = null;
|
||||
groupTestPanel = null;
|
||||
mSpeedView = null;
|
||||
mAutopilotImage = null;
|
||||
mAutopilotTv = null;
|
||||
mCloseNaviIcon = null;
|
||||
driverMsgBoxButtonView = null;
|
||||
viewDriverMsgBoxList = null;
|
||||
viewDriverMsgBoxBubble = null;
|
||||
ochAmapNaviFragment = null;
|
||||
taxiRottingNaviFragment = null;
|
||||
smallMapView = null;
|
||||
super.onDestroyView();
|
||||
CallerAutopilotRecordListenerManager.INSTANCE.removeListener(TAG);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package com.mogo.och.taxi.passenger.ui.overmapview
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.GradientDrawable
|
||||
import android.os.Bundle
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.RelativeLayout
|
||||
import com.mogo.och.taxi.passenger.common.R
|
||||
import kotlinx.android.synthetic.main.taxi_p_overmap.view.ovbv_bottom_icons
|
||||
import kotlinx.android.synthetic.main.taxi_p_overmap.view.travelRealityView
|
||||
|
||||
class OverMapView @JvmOverloads constructor(
|
||||
@@ -17,6 +20,17 @@ class OverMapView @JvmOverloads constructor(
|
||||
|
||||
private fun initView() {
|
||||
LayoutInflater.from(context).inflate(R.layout.taxi_p_overmap, this, true)
|
||||
// 定义渐变的方向
|
||||
// 定义渐变的方向
|
||||
val orientation = GradientDrawable.Orientation.LEFT_RIGHT
|
||||
val temp01 = GradientDrawable(orientation, intArrayOf(
|
||||
Color.parseColor("#33D7E5FF"),
|
||||
Color.parseColor("#E6EFFF"),
|
||||
Color.parseColor("#E6EFFF"),
|
||||
Color.parseColor("#E6EFFF"),
|
||||
Color.parseColor("#33D7E5FF"),
|
||||
))
|
||||
ovbv_bottom_icons.background = temp01
|
||||
}
|
||||
|
||||
fun onCreateView(savedInstanceState: Bundle?) {
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
app:unArrivedDrawable="@drawable/taxt_u_p_overmap_arriving" />
|
||||
|
||||
<com.mogo.och.common.module.wigets.map.overmapview.OverMapBottomView
|
||||
android:id="@+id/ovbv_bottom_icons"
|
||||
android:layout_width="@dimen/dp_1860"
|
||||
android:layout_height="@dimen/dp_136"
|
||||
android:layout_alignParentBottom="true"
|
||||
|
||||