MaterialDrawer icon indicating copy to clipboard operation
MaterialDrawer copied to clipboard

Accessiblity of text and switcher icon in the account header

Open nikclayton opened this issue 1 year ago • 0 comments

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

nikclayton avatar Dec 04 '23 18:12 nikclayton