[6.0.0] 增加途径点逻辑
This commit is contained in:
@@ -5,6 +5,7 @@ import android.graphics.Color
|
||||
import android.graphics.drawable.GradientDrawable
|
||||
import android.os.Bundle
|
||||
import android.os.CountDownTimer
|
||||
import android.text.TextUtils
|
||||
import android.view.View
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
@@ -50,6 +51,7 @@ import kotlinx.android.synthetic.main.task_fragment_current.naviToEnd
|
||||
import kotlinx.android.synthetic.main.task_fragment_current.naviToStart
|
||||
import kotlinx.android.synthetic.main.task_fragment_current.noTaskData
|
||||
import kotlinx.android.synthetic.main.task_fragment_current.orderPhoneAndNum
|
||||
import kotlinx.android.synthetic.main.task_fragment_current.pathwayPoint
|
||||
import kotlinx.android.synthetic.main.task_fragment_current.startPoint
|
||||
import kotlinx.android.synthetic.main.task_fragment_current.startStationName
|
||||
import kotlinx.android.synthetic.main.task_fragment_current.taskClickBtn
|
||||
@@ -249,6 +251,7 @@ class TaxiCurrentTaskFragment : BaseFragment(),
|
||||
naviToStart.visibility = View.GONE
|
||||
naviToEnd.visibility = View.VISIBLE
|
||||
taskOtherInfo.visibility = View.VISIBLE
|
||||
pathwayPoint.visibility = View.GONE
|
||||
|
||||
// 更新任务状态,起点,终点
|
||||
taskStatus.text = resources.getString(R.string.task_start_to_virtual_site)
|
||||
@@ -372,6 +375,8 @@ class TaxiCurrentTaskFragment : BaseFragment(),
|
||||
taskOtherInfo.visibility =
|
||||
if (currentStatus == TaskStatusEnum.GetTask.code) View.GONE else View.VISIBLE
|
||||
|
||||
pathwayPoint.visibility = View.GONE
|
||||
|
||||
if (order != null && currentStatus == TaskStatusEnum.CompleteTask.code) {
|
||||
updateOrderUI(order)
|
||||
VoiceNotice.showNotice("已为您接到订单")
|
||||
@@ -391,6 +396,7 @@ class TaxiCurrentTaskFragment : BaseFragment(),
|
||||
|
||||
TaskTypeEnum.ToOrderEndTask.code, TaskTypeEnum.ToOrderStartTask.code -> {// 接驾任务 或 送驾任务
|
||||
order?.also {
|
||||
updatePathwayPoint(taskType,endSite?.siteName)
|
||||
handleOrderView(it)
|
||||
updateOrderUI(it)
|
||||
}
|
||||
@@ -401,6 +407,13 @@ class TaxiCurrentTaskFragment : BaseFragment(),
|
||||
updateRemainDistanceAndTime(false)
|
||||
}
|
||||
|
||||
private fun updatePathwayPoint(taskType: Int,endSiteName: String?) {
|
||||
if (TextUtils.isEmpty(endSiteName)) return
|
||||
pathwayPoint.visibility = if (taskType == TaskTypeEnum.ToOrderStartTask.code)
|
||||
View.VISIBLE else View.GONE
|
||||
pathwayPoint.text = "途径: $endSiteName"
|
||||
}
|
||||
|
||||
private fun updateMapMarkers(taskAndOrder: QueryCurrentTaskRespBean.Result?) {
|
||||
if (taskAndOrder != null && taskAndOrder!!.startSite != null
|
||||
&& taskAndOrder!!.endSite != null
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid
|
||||
android:color="#6E172B80"/>
|
||||
<corners
|
||||
android:radius="@dimen/dp_18"/>
|
||||
</shape>
|
||||
@@ -59,6 +59,23 @@
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/dp_28"
|
||||
android:text="183XXXX5400 | -人"/>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/pathwayPoint"
|
||||
android:layout_width="@dimen/dp_478"
|
||||
android:layout_height="@dimen/dp_68"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
app:layout_goneMarginTop="@dimen/dp_40"
|
||||
android:text="途径: "
|
||||
android:textSize="@dimen/dp_32"
|
||||
android:textColor="@color/station_tag_color"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="@dimen/dp_36"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/task_pathway_point_bg"
|
||||
app:layout_constraintTop_toBottomOf="@+id/orderPhoneAndNum"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/taskStatus"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/startStationTag"
|
||||
@@ -66,12 +83,12 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="上车:"
|
||||
android:textSize="@dimen/dp_32"
|
||||
app:layout_goneMarginTop="@dimen/dp_104"
|
||||
android:layout_marginTop="@dimen/dp_52"
|
||||
app:layout_goneMarginTop="@dimen/dp_68"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginStart="@dimen/dp_78"
|
||||
android:textColor="@color/station_tag_color"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/orderPhoneAndNum"/>
|
||||
app:layout_constraintTop_toBottomOf="@+id/pathwayPoint"/>
|
||||
|
||||
<com.mogo.och.common.module.wigets.MarqueeTextView
|
||||
android:id="@+id/startStationName"
|
||||
|
||||
Reference in New Issue
Block a user