v3.24 设置页导出配色/类型设置行去标题/统计页顶部文案
This commit is contained in:
@@ -148,9 +148,10 @@ class SettingsFragment : Fragment(R.layout.fragment_settings) {
|
||||
|
||||
section(R.string.section_types)
|
||||
card(
|
||||
// 类型只是给项目打的标签:值列表可改,改完项目弹层与统计页的类型分布立刻跟着变
|
||||
// 类型只是给项目打的标签:值列表可改,改完项目弹层与统计页的类型分布立刻跟着变。
|
||||
// 行标题「类型设置」按用户要求去掉,空间让给类型列表;点击弹窗等行为不变
|
||||
action(
|
||||
getString(R.string.type_settings),
|
||||
"",
|
||||
Prefs.projectTypes.joinToString("、"),
|
||||
) { inputProjectTypes() },
|
||||
)
|
||||
@@ -171,8 +172,13 @@ class SettingsFragment : Fragment(R.layout.fragment_settings) {
|
||||
|
||||
section(R.string.section_data)
|
||||
card(
|
||||
// 导出排在最前:删除即真删、系统备份也已关闭,误清空后只能靠这份文件
|
||||
action(getString(R.string.export_data), getString(R.string.export_value)) {
|
||||
// 导出排在最前:删除即真删、系统备份也已关闭,误清空后只能靠这份文件。
|
||||
// 标题与下面两条危险操作同色(红色),看起来是一组的
|
||||
action(
|
||||
getString(R.string.export_data),
|
||||
getString(R.string.export_value),
|
||||
titleColorRes = R.color.danger,
|
||||
) {
|
||||
exportDoc.launch("focusbox-" + Dates.dayKey(System.currentTimeMillis()) + ".json")
|
||||
},
|
||||
// 清理旧版本删除任务后残留的孤儿记录,排在「清空所有数据」前面:
|
||||
@@ -296,6 +302,7 @@ class SettingsFragment : Fragment(R.layout.fragment_settings) {
|
||||
value: String,
|
||||
danger: Boolean = false,
|
||||
showArrow: Boolean = true,
|
||||
titleColorRes: Int = 0,
|
||||
onClick: (() -> Unit)? = null,
|
||||
): View {
|
||||
val ctx = requireContext()
|
||||
@@ -311,7 +318,15 @@ class SettingsFragment : Fragment(R.layout.fragment_settings) {
|
||||
row.addView(TextView(ctx).apply {
|
||||
text = title
|
||||
textSize = 15f
|
||||
setTextColor(col(if (danger) R.color.danger else R.color.text))
|
||||
setTextColor(
|
||||
col(
|
||||
when {
|
||||
danger -> R.color.danger
|
||||
titleColorRes != 0 -> titleColorRes
|
||||
else -> R.color.text
|
||||
}
|
||||
)
|
||||
)
|
||||
isSingleLine = true
|
||||
layoutParams = LinearLayout.LayoutParams(
|
||||
LinearLayout.LayoutParams.WRAP_CONTENT,
|
||||
@@ -763,6 +778,6 @@ class SettingsFragment : Fragment(R.layout.fragment_settings) {
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val VERSION = "3.23"
|
||||
const val VERSION = "3.24"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user