mikepenz / MaterialDrawer

The flexible, easy to use, all in one drawer library for your Android project. Now brand new with material 2 design.
https://mikepenz.dev
Apache License 2.0
11.67k stars 2.05k forks source link

Accessiblity of text and switcher icon in the account header #2801

Open nikclayton opened 8 months ago

nikclayton commented 8 months ago

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

9.0.2

Checklist