MaterialDrawer
MaterialDrawer copied to clipboard
Accessiblity of text and switcher icon in the account header
About this issue
When loading an image in to the accountHeaderBackground
it's possible for the profile text (currentProfileName
and currentProfileEmail
) and switcher (accountSwitcherArrow
) to become difficult to see because e.g., the text colour is dark and so is the loaded image.
It's possible to override some of these (e.g., using the Palette library after loading the image to generate some relevant colours and calling header.currentProfileName.setTextColor()
), but this is fragile as it will be overwritten as soon as AccountHeaderView.reconstructHeader()
is called.
reconstructHeader()
uses colours from styleables, so those can't be changed at runtime.
I'd like to be able to set the colours / colour state lists used for the text and the switcher arrow (e.g., as nullable properties in AccountHeaderView.kt
), with those colours taking priority over the styles.
Details
- [x] Used library version
9.0.2
Checklist
- [x] Searched for similar issues
- [x] Checked out the sample application
- [x] Read the README
- [x] Checked out the CHANGELOG
- [x] Read the FAQ
- [x] Checked out the MIGRATION GUIDE