[BadCase]修正部分UI
This commit is contained in:
@@ -297,13 +297,14 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
|
||||
if (autoPilotToolsFloat == null) {
|
||||
if (autoPilotBadCaseView == null) {
|
||||
autoPilotBadCaseView = AutoPilotBadCaseView(it).also { itx ->
|
||||
val record =
|
||||
autoPilotBadCaseEntrance?.getTag(R.id.autopilot_badcase_record) as? AutoPilotRecordResult
|
||||
itx.tag = record
|
||||
itx.onDismiss {
|
||||
dismissBadCaseFloatView()
|
||||
}
|
||||
itx.onSelect {
|
||||
lifecycleScope.launch {
|
||||
val record =
|
||||
autoPilotBadCaseEntrance?.getTag(R.id.autopilot_badcase_record) as? AutoPilotRecordResult
|
||||
try {
|
||||
val params = mutableMapOf<String, String>()
|
||||
autoPilotBadCaseEntrance?.apply {
|
||||
|
||||
@@ -40,6 +40,8 @@ import retrofit2.http.FieldMap
|
||||
import retrofit2.http.FormUrlEncoded
|
||||
import retrofit2.http.GET
|
||||
import retrofit2.http.POST
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
import kotlin.Result.Companion.failure
|
||||
import kotlin.Result.Companion.success
|
||||
|
||||
@@ -247,7 +249,6 @@ class AutoPilotBadCaseView: ConstraintLayout {
|
||||
background = ColorDrawable(Color.parseColor("#F0151D41"))
|
||||
isClickable = true
|
||||
layoutParams = ViewGroup.LayoutParams(960.toPixels().toInt(), 1528.toPixels().toInt())
|
||||
|
||||
close?.onClick {
|
||||
dismiss?.invoke()
|
||||
}
|
||||
@@ -279,6 +280,15 @@ class AutoPilotBadCaseView: ConstraintLayout {
|
||||
if (adapter != null && adapter.itemCount > 0) {
|
||||
return
|
||||
}
|
||||
time_of_take_over?.text = "接管时间: ${(tag as? AutoPilotRecordResult)?.timestamp?.let {
|
||||
try {
|
||||
SimpleDateFormat("yyyyMMddHHmmss", Locale.getDefault()).parse(it)?.let { itx ->
|
||||
SimpleDateFormat("yyyy.MM.dd HH:mm", Locale.getDefault()).format(itx)
|
||||
}
|
||||
} catch (e: Throwable) {
|
||||
null
|
||||
} ?: SimpleDateFormat("yyyy.MM.dd HH:mm", Locale.getDefault()).format(Date())}}"
|
||||
|
||||
scope.launch {
|
||||
showLoading()
|
||||
try {
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:enabled="false"
|
||||
android:layout_marginBottom="100px"/>
|
||||
android:layout_marginBottom="150px"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cancel"
|
||||
@@ -97,7 +97,7 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/ok"
|
||||
android:layout_marginBottom="100px"/>
|
||||
android:layout_marginBottom="150px"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pb"
|
||||
|
||||
Reference in New Issue
Block a user