精简选任务弹层提示与项目行缩进;环图加粗留边距;通知图标常驻;统计标题样式统一
This commit is contained in:
@@ -416,6 +416,7 @@ class FocusFragment : Fragment(R.layout.fragment_focus) {
|
||||
val tvTitle = root.findViewById<TextView>(R.id.pickTitle)
|
||||
val tvStep = root.findViewById<TextView>(R.id.pickStep)
|
||||
val tvHint = root.findViewById<TextView>(R.id.pickHint)
|
||||
tvHint.visibility = View.GONE // 两步都只留标题与列表,不再占一行说明文字
|
||||
val btnBack = root.findViewById<ImageView>(R.id.pickBack)
|
||||
val btnClose = root.findViewById<ImageView>(R.id.pickClose)
|
||||
val btnClear = root.findViewById<TextView>(R.id.pickClear)
|
||||
@@ -427,12 +428,15 @@ class FocusFragment : Fragment(R.layout.fragment_focus) {
|
||||
meta: String,
|
||||
color: Int?,
|
||||
selected: Boolean,
|
||||
alignLeft: Boolean = false,
|
||||
onClick: () -> Unit,
|
||||
) {
|
||||
val row = layoutInflater.inflate(R.layout.item_pick_row, list, false)
|
||||
row.findViewById<View>(R.id.rowDot).apply {
|
||||
visible(color != null)
|
||||
if (color != null) background = ctx.circleBg(color)
|
||||
val dot = row.findViewById<View>(R.id.rowDot)
|
||||
dot.visible(!alignLeft && color != null)
|
||||
if (color != null) dot.background = ctx.circleBg(color)
|
||||
(row.findViewById<View>(R.id.rowInfo).layoutParams as LinearLayout.LayoutParams).apply {
|
||||
marginStart = if (alignLeft || color == null) 0 else dpi(12f)
|
||||
}
|
||||
row.findViewById<TextView>(R.id.rowTitle).text = title
|
||||
row.findViewById<TextView>(R.id.rowMeta).text = meta
|
||||
@@ -452,7 +456,6 @@ class FocusFragment : Fragment(R.layout.fragment_focus) {
|
||||
val project = Store.project(projectId)
|
||||
tvTitle.text = project?.name ?: getString(R.string.inbox)
|
||||
tvStep.text = getString(R.string.pick_step, 2)
|
||||
tvHint.text = getString(R.string.pick_task_hint)
|
||||
btnBack.visibility = View.VISIBLE
|
||||
btnClear.visibility = View.VISIBLE
|
||||
list.removeAllViews()
|
||||
@@ -490,7 +493,6 @@ class FocusFragment : Fragment(R.layout.fragment_focus) {
|
||||
fun showProjects() {
|
||||
tvTitle.text = getString(R.string.pick_project)
|
||||
tvStep.text = getString(R.string.pick_step, 1)
|
||||
tvHint.text = getString(R.string.pick_project_hint)
|
||||
btnBack.visibility = View.INVISIBLE
|
||||
btnClear.visibility = View.GONE
|
||||
list.removeAllViews()
|
||||
@@ -501,6 +503,7 @@ class FocusFragment : Fragment(R.layout.fragment_focus) {
|
||||
meta = getString(R.string.pick_project_meta, p.openTasks),
|
||||
color = p.color,
|
||||
selected = p.id == currentPid,
|
||||
alignLeft = true, // 项目列表不要左侧色点缩进,名称贴左对齐
|
||||
) { showTasks(p.id) }
|
||||
}
|
||||
scroll.scrollTo(0, 0)
|
||||
|
||||
Reference in New Issue
Block a user