-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain_patch.diff
More file actions
34 lines (33 loc) · 1.89 KB
/
main_patch.diff
File metadata and controls
34 lines (33 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--- app/src/main/java/com/leanbitlab/lwidget/MainActivity.kt
+++ app/src/main/java/com/leanbitlab/lwidget/MainActivity.kt
@@ -1187,6 +1187,7 @@
prefs.edit()
.putInt("text_color_primary_idx", 0)
.putInt("text_color_secondary_idx", 0)
+ .putInt("date_color_idx", 0)
.putInt("outline_color_idx", 0)
.putInt("bg_color_idx", 0)
.apply()
@@ -1226,6 +1227,15 @@
bindColorSliders(R.id.row_text_color_secondary_custom, "text_color_secondary")
secondarySliderRow.visibility = if (prefs.getInt("text_color_secondary_idx", 0) == 2) View.VISIBLE else View.GONE
+ // Date Color
+ val dateSliderRow = findViewById<View>(R.id.row_date_color_custom)
+ bindSelector(R.id.row_date_color, getString(R.string.section_date_color), "date_color_idx", colorOptions, 0) { idx ->
+ dateSliderRow.visibility = if (idx == 2) View.VISIBLE else View.GONE
+ if (idx != 2) updateWidget()
+ }
+ bindColorSliders(R.id.row_date_color_custom, "date_color")
+ dateSliderRow.visibility = if (prefs.getInt("date_color_idx", 0) == 2) View.VISIBLE else View.GONE
+
// Outline Color
val outlineSliderRow = findViewById<View>(R.id.row_outline_color_custom)
bindSelector(R.id.row_outline_color, getString(R.string.section_outline_color), "outline_color_idx", colorOptions, 0) { idx ->
@@ -1400,6 +1410,7 @@
R.id.row_bg_color, R.id.row_bg_color_custom,
R.id.row_text_color_primary, R.id.row_text_color_primary_custom,
R.id.row_text_color_secondary, R.id.row_text_color_secondary_custom,
+ R.id.row_date_color, R.id.row_date_color_custom,
R.id.row_outline_color, R.id.row_outline_color_custom
)
manualColorIds.forEach { id ->