Merge pull request #1961 from Hafizzle/Fiz/todo-text-color-updates

Update todo text colors
This commit is contained in:
Phillip Thelen 2023-05-04 15:26:16 +02:00 committed by GitHub
commit 42a8bbc6ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View file

@ -62,5 +62,6 @@
<color name="text_green10_green500">@color/green_500</color>
<color name="gray200_gray400">@color/gray_400</color>
<color name="gray700_gray10">@color/gray_10</color>
<color name="maroon100_red100">@color/red_100</color>
</resources>

View file

@ -129,4 +129,5 @@
<color name="text_green10_green500">@color/green_10</color>
<color name="gray200_gray400">@color/gray_200</color>
<color name="gray700_gray10">@color/gray_700</color>
<color name="maroon100_red100">@color/maroon_100</color>
</resources>

View file

@ -40,9 +40,10 @@ class TodoViewHolder(
specialTaskTextView?.text = context.getString(R.string.today)
} else if (task.isDayOrMorePastDue() == true) {
task.dueDate?.let { specialTaskTextView?.text = dateFormatter.format(it) }
specialTaskTextView?.setTextColor(ContextCompat.getColor(context, R.color.maroon_100))
specialTaskTextView?.setTextColor(ContextCompat.getColor(context, R.color.maroon100_red100))
} else {
task.dueDate?.let { specialTaskTextView?.text = dateFormatter.format(it) }
specialTaskTextView?.setTextColor(ContextCompat.getColor(context, R.color.gray_300))
}
this.specialTaskTextView?.visibility = View.VISIBLE
calendarIconView?.visibility = View.VISIBLE