feat(glass): 添加继续拍摄功能并优化喷洒结果页面界面
- 在离线命令服务中添加"继续拍摄"语音指令支持 - 更新喷洒结果页面的语音指令响应逻辑,支持重拍和继续拍摄操作 - 在页面销毁时增加图片路径传递和显示功能 - 重构页面布局结构,添加二维码识别结果显示区域 - 更新提示文本内容,明确说明各种语音操作指令 - 调整页面元素的位置和尺寸以适应新的界面布局需求
这个提交包含在:
父节点
dbc4f6f295
当前提交
afe5eeb017
@ -146,6 +146,7 @@ object OfflineCmdServiceHelper {
|
|||||||
add(OfflineCmdBean("重拍", "chong pai"))
|
add(OfflineCmdBean("重拍", "chong pai"))
|
||||||
add(OfflineCmdBean("重新拍", "chong xin pai"))
|
add(OfflineCmdBean("重新拍", "chong xin pai"))
|
||||||
add(OfflineCmdBean("再拍一次", "zai pai yi ci"))
|
add(OfflineCmdBean("再拍一次", "zai pai yi ci"))
|
||||||
|
add(OfflineCmdBean("继续拍摄", "ji xu pai she"))
|
||||||
}
|
}
|
||||||
fun init(){
|
fun init(){
|
||||||
val service = GlassSdk.getGlassOfflineCmdService()
|
val service = GlassSdk.getGlassOfflineCmdService()
|
||||||
|
|||||||
@ -39,7 +39,7 @@ class SprayingResultActivity :
|
|||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
|
|
||||||
"开始", "拍照", "开始拍照", "开始任务" -> {
|
"重拍", "重新拍", "继续拍照", "再拍一次", "继续拍摄" -> {
|
||||||
runOnUiThread {
|
runOnUiThread {
|
||||||
binding.hint.text = "拍照中,请稍后..."
|
binding.hint.text = "拍照中,请稍后..."
|
||||||
}
|
}
|
||||||
@ -109,6 +109,9 @@ class SprayingResultActivity :
|
|||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
OfflineCmdServiceHelper.removeOnLineListener(listener)
|
OfflineCmdServiceHelper.removeOnLineListener(listener)
|
||||||
GlassSdk.getGlassMediaService()?.removePhotoCallback(mPhotoFileCallback)
|
GlassSdk.getGlassMediaService()?.removePhotoCallback(mPhotoFileCallback)
|
||||||
|
intent.getStringExtra("path")?.apply {
|
||||||
|
binding.iv.setImageBitmap(BitmapFactory.decodeFile(this))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private var isPhoto = false
|
private var isPhoto = false
|
||||||
|
|||||||
@ -14,8 +14,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="67dp"
|
android:layout_marginTop="67dp"
|
||||||
android:background="@drawable/bg_item"
|
android:background="@drawable/bg_item"
|
||||||
android:text="OCR识别结果:合格"
|
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:text="OCR识别结果:合格"
|
||||||
android:textColor="#ff40FF5E"
|
android:textColor="#ff40FF5E"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
@ -23,8 +23,8 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:id="@+id/content"
|
android:id="@+id/content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
@ -33,33 +33,65 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@+id/tvTaskHeader">
|
app:layout_constraintTop_toBottomOf="@+id/tvTaskHeader">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
android:layout_marginTop="30dp"
|
|
||||||
android:gravity="center|left"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
android:layout_width="400dp"
|
android:layout_width="400dp"
|
||||||
android:orientation="horizontal"
|
android:layout_height="183dp"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
android:background="@drawable/bg_task_title_selected"
|
android:background="@drawable/bg_task_title_selected"
|
||||||
android:layout_height="183dp">
|
android:gravity="center|left"
|
||||||
<ImageView
|
android:orientation="horizontal"
|
||||||
android:background="@drawable/bg_task_title_selected"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:layout_width="120dp"
|
|
||||||
android:id="@+id/iv"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:layout_height="150dp"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/hint"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
<ImageView
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv"
|
||||||
|
android:layout_width="120dp"
|
||||||
|
android:layout_height="150dp"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:background="@drawable/bg_task_title_selected"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/hint" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="识码一:XXXXX"
|
||||||
|
android:textColor="#ff40FF5E"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:text="识码二:XXXXX"
|
||||||
|
android:textColor="#ff40FF5E"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:text="两码一致,符合要求!"
|
||||||
|
android:textColor="#ff40FF5E"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
android:layout_width="90dp"
|
android:layout_width="90dp"
|
||||||
|
android:layout_height="90dp"
|
||||||
android:src="@mipmap/ocr_true"
|
android:src="@mipmap/ocr_true"
|
||||||
android:layout_height="90dp"/>
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
@ -67,24 +99,28 @@
|
|||||||
android:id="@+id/baseRecyclerView"
|
android:id="@+id/baseRecyclerView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="88dp"
|
android:layout_height="88dp"
|
||||||
android:clipToPadding="false"
|
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
|
android:clipToPadding="false"
|
||||||
android:overScrollMode="never"
|
android:overScrollMode="never"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/content" />
|
app:layout_constraintTop_toBottomOf="@id/content" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_marginStart="15dp"
|
|
||||||
android:id="@+id/hint"
|
android:id="@+id/hint"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/baseRecyclerView"
|
|
||||||
android:layout_marginVertical="4dp"
|
android:layout_marginVertical="4dp"
|
||||||
|
android:layout_marginStart="15dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="单击或语音输入“开始”,进入下一步"
|
android:text="单击或语音输入“继续拍摄”,可以继续拍摄下一张证\n
|
||||||
|
单击或语音输入“结束任务”,结束全部拍摄并提交任务\n
|
||||||
|
单击或语音输入“人工更正结果”,可更改当前检验结果\n
|
||||||
|
语音输入“重拍”,可重新拍摄当前照片"
|
||||||
android:textColor="#ff40FF5E"
|
android:textColor="#ff40FF5E"
|
||||||
android:textSize="14sp"/>
|
android:textSize="14sp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/baseRecyclerView" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</layout>
|
</layout>
|
||||||
|
|||||||
正在加载...
在新工单中引用
屏蔽一个用户