视频播放页面展示订单情况
This commit is contained in:
@@ -11,6 +11,7 @@ import android.view.WindowManager
|
||||
import androidx.appcompat.widget.AppCompatTextView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.och.common.module.wigets.OCHGradientTextView
|
||||
import com.mogo.och.taxi.passenger.R
|
||||
|
||||
/**
|
||||
@@ -31,11 +32,16 @@ object FloatingDistanceInfoUtils {
|
||||
|
||||
private var overlayView: View?=null
|
||||
|
||||
private var actvDistancew: AppCompatTextView?=null
|
||||
// 距离
|
||||
private var actvDistancew: OCHGradientTextView?=null
|
||||
// 距离单位
|
||||
private var actvDistancewUnit: AppCompatTextView?=null
|
||||
private var actvSurplusTime: AppCompatTextView?=null
|
||||
private var actvArrivedTime: AppCompatTextView?=null
|
||||
private var actvSpeed: AppCompatTextView?=null
|
||||
// 剩余时间
|
||||
private var actvSurplusTime: OCHGradientTextView?=null
|
||||
// 到达时间
|
||||
private var actvArrivedTime: OCHGradientTextView?=null
|
||||
|
||||
private var actvSpeed: OCHGradientTextView?=null
|
||||
|
||||
|
||||
/**
|
||||
@@ -66,6 +72,25 @@ object FloatingDistanceInfoUtils {
|
||||
actvSurplusTime = view.findViewById(R.id.actv_surplus_time)
|
||||
actvArrivedTime = view.findViewById(R.id.actv_arrived_time)
|
||||
|
||||
val intArrayOf = intArrayOf(
|
||||
context.resources.getColor(R.color.taxi_p_video_gradient_start),
|
||||
context.resources.getColor(R.color.taxi_p_video_gradient_end)
|
||||
)
|
||||
|
||||
actvSpeed?.setVertrial(true)
|
||||
actvSpeed?.setmColorList(intArrayOf)
|
||||
|
||||
actvDistancew?.setVertrial(true)
|
||||
actvDistancew?.setmColorList(intArrayOf)
|
||||
|
||||
actvSurplusTime?.setVertrial(true)
|
||||
actvSurplusTime?.setmColorList(intArrayOf)
|
||||
|
||||
actvArrivedTime?.setVertrial(true)
|
||||
actvArrivedTime?.setmColorList(intArrayOf)
|
||||
|
||||
|
||||
|
||||
// 如果正在展示中,并且lastOverlayView不为null,先做移除操作,保证覆盖在最上面的View只有一个,防止叠加导致无法移除
|
||||
dismissOverlayView()
|
||||
|
||||
@@ -90,13 +115,14 @@ object FloatingDistanceInfoUtils {
|
||||
it.alpha = 1.0f
|
||||
it.gravity = Gravity.END or Gravity.TOP
|
||||
it.x = 0
|
||||
it.y = 0
|
||||
it.y = 199
|
||||
it.format = PixelFormat.RGBA_8888
|
||||
// 设置窗口类型为应用子窗口,和PopupWindow同类型
|
||||
it.type = WindowManager.LayoutParams.TYPE_APPLICATION_SUB_PANEL
|
||||
// 没有边界限制,允许窗口扩展到屏幕外
|
||||
it.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE or
|
||||
WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS or
|
||||
WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE or
|
||||
WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
|
||||
if (ani != -1) {
|
||||
it.windowAnimations = ani
|
||||
@@ -115,7 +141,7 @@ object FloatingDistanceInfoUtils {
|
||||
fun setDistance(remainDis: String?, disUnit: String, time: Int, arriveTime: String) {
|
||||
UiThreadHandler.getsUiHandler().post {
|
||||
actvDistancew?.text = "$remainDis"
|
||||
actvDistancewUnit?.text = disUnit
|
||||
actvDistancewUnit?.text = "距离($disUnit)"
|
||||
actvSurplusTime?.text = "$time"
|
||||
actvArrivedTime?.text = arriveTime
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 92 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 92 KiB |
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<gradient android:startColor="#99000000" android:endColor="#00000000" android:angle="90"/>
|
||||
<solid android:color="#59141A2D"/>
|
||||
<corners android:radius="8px"/>
|
||||
</shape>
|
||||
@@ -67,9 +67,14 @@
|
||||
<!--局部播放器-->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0px"
|
||||
android:background="@drawable/bg_taxi_p_video_bg"
|
||||
android:layout_height="158px"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginStart="148px"
|
||||
android:layout_marginEnd="148px"
|
||||
android:layout_marginBottom="51px"
|
||||
android:layout_height="99px"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<ImageView
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:bgColor="@color/taxi_p_map_bg"
|
||||
app:blurRadius="@dimen/dp_60"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:shadowColor="#80000000"
|
||||
app:shadowRadius="60px"
|
||||
app:shadow_position="outer"
|
||||
app:xOffset="0px"
|
||||
app:yOffset="0px"
|
||||
tools:visibility="visible">
|
||||
app:yOffset="0px">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_comment_contain"
|
||||
@@ -30,7 +30,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<com.mogo.och.common.module.wigets.OCHGradientTextView
|
||||
android:id="@+id/actv_speed"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -66,116 +66,114 @@
|
||||
app:blurRadius="@dimen/dp_60"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/och_speed_layout"
|
||||
app:shadowColor="#80000000"
|
||||
app:shadowColor="#BA000000"
|
||||
app:shadowRadius="60px"
|
||||
app:shadow_position="outer"
|
||||
app:xOffset="0px"
|
||||
app:yOffset="0px"
|
||||
tools:visibility="visible">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/cl_distance_contain"
|
||||
android:layout_width="@dimen/dp_230"
|
||||
android:layout_height="@dimen/dp_690"
|
||||
android:layout_width="@dimen/dp_180"
|
||||
android:layout_height="@dimen/dp_554"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="3"
|
||||
android:background="@drawable/bg_taxi_p_arrived_info"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_distancew"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="--"
|
||||
android:textColor="@color/taxi_order_status_textColor"
|
||||
android:textSize="88px"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
app:layout_constraintBottom_toTopOf="@+id/actv_distancew_unit"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_distancew_unit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="距离(KM)"
|
||||
android:textColor="@color/taxi_order_status_textColor"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/v_second_floor"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_distancew" />
|
||||
|
||||
<View
|
||||
android:id="@+id/v_second_floor"
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/taxi_order_status_textColor"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintVertical_bias="0.333"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:layout_height="0dp">
|
||||
<com.mogo.och.common.module.wigets.OCHGradientTextView
|
||||
android:id="@+id/actv_distancew"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="__"
|
||||
android:textColor="@color/taxi_order_status_textColor"
|
||||
android:textSize="56px"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
app:layout_constraintBottom_toTopOf="@+id/actv_distancew_unit"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_distancew_unit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="距离(KM)"
|
||||
android:textSize="28px"
|
||||
android:textColor="@color/taxi_p_video_unit"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_distancew" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:layout_height="0dp">
|
||||
<com.mogo.och.common.module.wigets.OCHGradientTextView
|
||||
android:id="@+id/actv_surplus_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="--"
|
||||
android:text="__"
|
||||
android:textColor="@color/taxi_order_status_textColor"
|
||||
android:textSize="88px"
|
||||
android:textSize="56px"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
app:layout_constraintBottom_toTopOf="@+id/actv_surplus_time_unit"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/v_second_floor" />
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_surplus_time_unit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="剩余(分)"
|
||||
android:textColor="@color/taxi_order_status_textColor"
|
||||
android:textSize="28px"
|
||||
android:textColor="@color/taxi_p_video_unit"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/v_third_floor"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_surplus_time" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<View
|
||||
android:id="@+id/v_third_floor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/taxi_order_status_textColor"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintVertical_bias="0.666"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:layout_height="0dp">
|
||||
<com.mogo.och.common.module.wigets.OCHGradientTextView
|
||||
android:id="@+id/actv_arrived_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="--"
|
||||
android:text="__"
|
||||
android:textColor="@color/taxi_order_status_textColor"
|
||||
android:textSize="88px"
|
||||
android:textSize="56px"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
app:layout_constraintBottom_toTopOf="@+id/actv_arrived_time_unit"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/v_third_floor" />
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_arrived_time_unit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="到达"
|
||||
android:textColor="@color/taxi_order_status_textColor"
|
||||
android:textSize="28px"
|
||||
android:textColor="@color/taxi_p_video_unit"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_arrived_time" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</com.mogo.och.common.module.wigets.OCHBorderShadowLayout>
|
||||
|
||||
|
||||
@@ -53,5 +53,7 @@
|
||||
<color name="taxi_p_start_autopilot_txt_un_color">#4DFFFFFF</color>
|
||||
<color name="taxi_p_start_autopilot_txt_color">#FFFFFF</color>
|
||||
|
||||
|
||||
<color name="taxi_p_video_unit">#8FB3EF</color>
|
||||
<color name="taxi_p_video_gradient_start">#E1F3FE</color>
|
||||
<color name="taxi_p_video_gradient_end">#FFFFFF</color>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user