fix: 修复已打卡乱码+巡检场景样式优化
1. 已打卡文字去掉损坏的emoji,改为纯文字"已打卡" 2. 巡检场景:● 绿色实心圆=已打卡,○ 灰色空心圆=未打卡 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -287,7 +287,7 @@ class TaskListFragment : BaseFragment<FragmentTaskListBinding>() {
|
|||||||
}
|
}
|
||||||
showNote(detail)
|
showNote(detail)
|
||||||
if (!detail.confirmTime.isNullOrEmpty()) {
|
if (!detail.confirmTime.isNullOrEmpty()) {
|
||||||
binding.tvCheckinTime.text = "<EFBFBD><EFBFBD><EFBFBD> ${detail.confirmTime} 已打卡"
|
binding.tvCheckinTime.text = "${detail.confirmTime} \u5DF2\u6253\u5361"
|
||||||
binding.tvCheckinTime.visibility = View.VISIBLE
|
binding.tvCheckinTime.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
binding.blockInProgress.visibility = View.VISIBLE
|
binding.blockInProgress.visibility = View.VISIBLE
|
||||||
@@ -335,20 +335,19 @@ class TaskListFragment : BaseFragment<FragmentTaskListBinding>() {
|
|||||||
binding.tvInspectTitle.text = "打卡进度 $checkedCount/$totalCount"
|
binding.tvInspectTitle.text = "打卡进度 $checkedCount/$totalCount"
|
||||||
binding.blockInspect.visibility = View.VISIBLE
|
binding.blockInspect.visibility = View.VISIBLE
|
||||||
|
|
||||||
// 动态添加场景行
|
// 动态添加场景行(绿色圆点=已打卡,灰色圆圈=未打卡)
|
||||||
binding.sceneList.removeAllViews()
|
binding.sceneList.removeAllViews()
|
||||||
for (scene in scenes) {
|
for (scene in scenes) {
|
||||||
val tv = android.widget.TextView(requireContext()).apply {
|
val tv = android.widget.TextView(requireContext()).apply {
|
||||||
text = if (scene.checked) {
|
if (scene.checked) {
|
||||||
" \u2705 ${scene.name}"
|
text = " \u25CF ${scene.name}" // ● 实心圆
|
||||||
|
setTextColor(requireContext().getColor(R.color.success))
|
||||||
} else {
|
} else {
|
||||||
" \u274C ${scene.name}"
|
text = " \u25CB ${scene.name}" // ○ 空心圆
|
||||||
|
setTextColor(requireContext().getColor(R.color.text_secondary))
|
||||||
}
|
}
|
||||||
textSize = 22f
|
textSize = 22f
|
||||||
setTextColor(requireContext().getColor(
|
setPadding(0, 11, 0, 11)
|
||||||
if (scene.checked) R.color.success else R.color.text_secondary
|
|
||||||
))
|
|
||||||
setPadding(0, 8, 0, 8)
|
|
||||||
}
|
}
|
||||||
binding.sceneList.addView(tv)
|
binding.sceneList.addView(tv)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user