From e3864138492d1d3280710a1ba7162d9dd7542404 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期五, 28 八月 2020 18:22:16 +0800
Subject: [PATCH] 1. 新增问题和删除修改功能(调试中) 2. 轨迹记录功能开放为所有类型的场景都记录
---
app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuProblemListActivity.kt | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuProblemListActivity.kt b/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuProblemListActivity.kt
index 61d83ee..66decbc 100644
--- a/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuProblemListActivity.kt
+++ b/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuProblemListActivity.kt
@@ -1,8 +1,12 @@
package cn.flightfeather.thirdapp.module.inspection
+import android.app.Dialog
import android.arch.lifecycle.Observer
+import android.content.Intent
import android.os.Bundle
+import android.view.View
import cn.flightfeather.thirdapp.adapter.ProblemListAdapter
+import cn.flightfeather.thirdapp.util.DialogUtil2
import kotlinx.android.synthetic.main.dialog_problem_list.*
class MenuProblemListActivity : BaseProblemListActivity() {
@@ -31,4 +35,30 @@
viewModel.getProblems(inspection?.guid)
}
+
+ override fun onItemViewLongClick(view: View?, position: Int) {
+ super.onItemViewLongClick(view, position)
+ DialogUtil2.showBottomDialog(this, rootView, listOf("淇敼", "鍒犻櫎"), listOf ({ p->
+ val intent = Intent(this, MenuProblemUpdateActivity::class.java).apply {
+ putExtra("problemlistVo", viewModel.problemList.value?.get(position))
+ putExtra("subTask", subTaskSelected)
+ putExtra("inspection", inspection)
+ putExtra("scene", scene)
+ putExtra("lat", lat)
+ putExtra("lng", lng)
+ }
+ startActivity(intent)
+ p.dismiss()
+ }, {p->
+ p.dismiss()
+ DialogUtil2.showAlertDialog(this, "纭鏄惁鍒犻櫎闂?", { dialog: Dialog ->
+ viewModel.deleteProblem(position) {
+ viewModel.getProblems(inspection?.guid)
+ }
+ dialog.dismiss()
+ }) { dialog: Dialog ->
+ dialog.dismiss()
+ }
+ }))
+ }
}
--
Gitblit v1.9.3