From 19bc34e6df070b99ba76bfffb6fc04d292f63a3f Mon Sep 17 00:00:00 2001 From: yangyakun Date: Mon, 8 Jul 2024 14:21:33 +0800 Subject: [PATCH] =?UTF-8?q?[6.5.0]=20[fea]=20[=E5=8F=B8=E6=9C=BA=E5=B1=8F?= =?UTF-8?q?=20=E5=85=A8=E5=B1=80=E6=A6=82=E8=A7=88=20=E4=BF=AE=E6=94=B9]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../map/overmapview/OverMapBottomView.kt | 11 -- .../wigets/map/overmapview/OverMapDialog.kt | 66 ++++++++ .../wigets/map/overmapview/OverMapView.kt | 46 ++++++ .../drawable-nodpi/common_close_100x100.png | Bin 0 -> 4085 bytes .../res/drawable-nodpi/taxt_u_p_map_car.png | Bin .../drawable-nodpi/taxt_u_p_map_car_light.png | Bin .../taxt_u_p_map_view_dir_end.png | Bin .../taxt_u_p_map_view_dir_start.png | Bin .../taxt_u_p_overmap_arrived.png | Bin .../taxt_u_p_overmap_arriving.png | Bin .../main/res/layout/common_overmap_dialog.xml | 18 +++ .../main/res/layout/common_overmap_view.xml | 143 ++++++++++++++++++ .../common/src/main/res/values/colors.xml | 1 + .../mogo/och/taxi/ui/BaseTaxiTabFragment.java | 36 ++++- .../passenger/ui/overmapview/OverMapView.kt | 14 ++ .../src/main/res/layout/taxi_p_overmap.xml | 1 + 16 files changed, 324 insertions(+), 12 deletions(-) create mode 100644 OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/map/overmapview/OverMapDialog.kt create mode 100644 OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/map/overmapview/OverMapView.kt create mode 100755 OCH/common/common/src/main/res/drawable-nodpi/common_close_100x100.png rename OCH/{taxi/pcommon => common/common}/src/main/res/drawable-nodpi/taxt_u_p_map_car.png (100%) rename OCH/{taxi/unmanned-passenger => common/common}/src/main/res/drawable-nodpi/taxt_u_p_map_car_light.png (100%) rename OCH/{taxi/unmanned-passenger => common/common}/src/main/res/drawable-nodpi/taxt_u_p_map_view_dir_end.png (100%) rename OCH/{taxi/unmanned-passenger => common/common}/src/main/res/drawable-nodpi/taxt_u_p_map_view_dir_start.png (100%) rename OCH/{taxi/pcommon => common/common}/src/main/res/drawable-nodpi/taxt_u_p_overmap_arrived.png (100%) rename OCH/{taxi/pcommon => common/common}/src/main/res/drawable-nodpi/taxt_u_p_overmap_arriving.png (100%) create mode 100644 OCH/common/common/src/main/res/layout/common_overmap_dialog.xml create mode 100644 OCH/common/common/src/main/res/layout/common_overmap_view.xml diff --git a/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/map/overmapview/OverMapBottomView.kt b/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/map/overmapview/OverMapBottomView.kt index 97e45b9ac1..e96b8fb287 100644 --- a/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/map/overmapview/OverMapBottomView.kt +++ b/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/map/overmapview/OverMapBottomView.kt @@ -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 { diff --git a/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/map/overmapview/OverMapDialog.kt b/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/map/overmapview/OverMapDialog.kt new file mode 100644 index 0000000000..280dc1e256 --- /dev/null +++ b/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/map/overmapview/OverMapDialog.kt @@ -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() + } + + +} \ No newline at end of file diff --git a/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/map/overmapview/OverMapView.kt b/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/map/overmapview/OverMapView.kt new file mode 100644 index 0000000000..5b7ab47175 --- /dev/null +++ b/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/map/overmapview/OverMapView.kt @@ -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() + } + } + +} \ No newline at end of file diff --git a/OCH/common/common/src/main/res/drawable-nodpi/common_close_100x100.png b/OCH/common/common/src/main/res/drawable-nodpi/common_close_100x100.png new file mode 100755 index 0000000000000000000000000000000000000000..24c435a8fbc1684f0c75b4d2d67d01425e6279d9 GIT binary patch literal 4085 zcmVPx^uSrBfRCodHU3pL&*BO8Btpq|~Fd(oor!mIdKCt5pdq`T_bdv&&%ygQzlT1BHI!z``r_C@;I%#|~P6A2o-~%u|u<;qmfB_qG*hUCR zyRY99UKvS9+Ld-!TCDv;Z}%PF_0zk*eT&g7x+tZ1<;n+B5V~O=wmVakj0R#9ChgQx zG+vd1CYqX>_}QW^){`O(n8i!)&ZoSim?B(^s8Eaq3Lz?_1f@d=poO}q10ga_k;ypd=wFM z#K@7hZ$G@{?2a8f1XXw`Kr}9aE3a-?>ZY!H5sx-dOmh{`Q#J|slUzrL9wZ#uU6hk@ zFy3lo+yGZr*I2+i9a|9=?t><;K(?h-Er3T5680L6hFxb*w05h?N+R)?16NkHcDX=> zC!qgYBT?p9XY0mxn>2A=rb_bsEo{D@m7lV5zeslLRafvEhWIfH_jjDCw_|&t&O2UW5AmBamh(PKY#2%ms-qKt8oh}*KKqPlP|+Rqev~`ljsu|Hsh>y#977SOs(k@=_AZsi6piq$yQpIx84@hX6}WEL1&X%*%m zr#1#Rqytbj#>6&~MCe!&!2sImNK+|TTJpUDorQr1NP+xDfIz|m# zMeW+!Ntb&kfR+`lFtfirHc*Tcws+zZ05AXbKXSL<I76bq?$D(xYCNd z?u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w4`Qroy(2x6%gGFf~8MSi`6}=UC<|gN;tB+zN)CTsi}#Nl`PZw#uad) zVC*BVqmE+@JWn^m9AXt1Pusa5yxa+fX(Nbyo}6d;gt={qvc*dnm%#ZOr>w5AfV%7} z!KHd7q}9M%vkM?pY+lG-WkQ5@!@JZ+kV$B}aP;7Lc3zgh9P#w53*h_>#x`+X-Tei; z;3|fGu>?N$Scs7@2hIU83zVjU`?eX(ZblRn3I|Wa$Zs6t>;O2szljmO3~zASID)L% nX$7{{)+X)V + + + + + + \ No newline at end of file diff --git a/OCH/common/common/src/main/res/layout/common_overmap_view.xml b/OCH/common/common/src/main/res/layout/common_overmap_view.xml new file mode 100644 index 0000000000..209a82def2 --- /dev/null +++ b/OCH/common/common/src/main/res/layout/common_overmap_view.xml @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OCH/common/common/src/main/res/values/colors.xml b/OCH/common/common/src/main/res/values/colors.xml index 35e75072f4..e0ccf73429 100644 --- a/OCH/common/common/src/main/res/values/colors.xml +++ b/OCH/common/common/src/main/res/values/colors.xml @@ -27,4 +27,5 @@ #A0B3DA #3B4577 + #232A3F \ No newline at end of file diff --git a/OCH/taxi/driver/src/main/java/com/mogo/och/taxi/ui/BaseTaxiTabFragment.java b/OCH/taxi/driver/src/main/java/com/mogo/och/taxi/ui/BaseTaxiTabFragment.java index bb72a7c676..acf91553a2 100644 --- a/OCH/taxi/driver/src/main/java/com/mogo/och/taxi/ui/BaseTaxiTabFragment.java +++ b/OCH/taxi/driver/src/main/java/com/mogo/och/taxi/ui/BaseTaxiTabFragment.java @@ -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