-
-
Notifications
You must be signed in to change notification settings - Fork 781
Description
Describe the bug
On Android, toga.DetailedList item text is rendered in hard-coded black.
This makes it unreadable when the app is in dark mode (Theme.Material3.DayNight.NoActionBar).
iOS adapts correctly to system dark/light mode.
Android theme background switches correctly, but list text does not follow.
Steps to reproduce
- Set up a Toga app on Android with:
base_theme = "Theme.Material3.DayNight.NoActionBar"
-
Add a DetailedList with a few items.
-
Switch the device/emulator to dark mode.
Expected behavior
DetailedList item text should use the theme’s primary/secondary text colors (white-ish in dark mode, black-ish in light mode).
Screenshots


Environment
- Operating System: macOS 15.6.1
- Python: 3.13.4
- Briefcase: 0.3.24
- Toga: 0.5.2
Logs
Additional context
https://github.com/beeware/toga/tree/main/android/src/toga_android/widgets/detailedlist.py lines 183-185 state:
top_text.setTextColor(
self._native_activity.getResources().getColor(R.color.black)
)
and lines 187-189 state:
bottom_text.setTextColor(
self._native_activity.getResources().getColor(R.color.black)
)
Potential fix: Maybe black should be replaced with ?android:attr/textColorPrimary and ?android:attr/textColorSecondary (resolved at runtime).