You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Android/web: labels are unreadable in light mode when tintColor is set #966
On Android and web, setting tintColor makes the label of every segment white, including unselected ones. In light mode those labels sit on the control's light grey background (#EEEEF0), so they can't be read unless fontStyle.color is set.
With a visible selection, only the selected segment is readable, because the slider is drawn in tintColor. With momentary (supported on Android and web since #963) there is no slider, so all labels are unreadable.
Seen on an Android emulator (API 36, React Native 0.88, light mode) while testing #963. The colour logic predates #963.
Cause
getColor in js/SegmentedControlTab.js returns 'white' whenever tintColor is set, without checking whether the segment is selected. The result is also the fallback for the active label colour.
Proposal
Use white only for the selected segment, and the regular colour-scheme default (#000 / #FFF) for unselected ones. fontStyle.color and activeFontStyle.color should keep taking precedence.
One thing to decide: apps that combine tintColor with a dark backgroundColor and rely on white unselected labels in light mode would get black ones, so the change may need to take backgroundColor into account.
Acceptance criteria
Unselected labels are readable in light and dark mode with tintColor set.
A momentary control with tintColor has readable labels.
fontStyle.color and activeFontStyle.color still take precedence.
Activity