- // Set the background color according to the theme. The deprecated `getColor()` must be used until the minimum API >= 23.
- if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
- @Suppress("DEPRECATION")
- requestDisposition.setBackgroundColor(resources.getColor(R.color.yellow_100))
- } else {
- @Suppress("DEPRECATION")
- requestDisposition.setBackgroundColor(resources.getColor(R.color.yellow_700_50))
- }
+ // Set the background color to be yellow.
+ requestDisposition.setBackgroundColor(getColor(requireContext(), R.color.yellow_background))