hoang8f / android-flat-button

FButton - a flat button library for Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shadow color is removed when the button is disabled and re-enabled

Anixed opened this issue · comments

When the button is disabled and then re-enable the shadow color is removed, returning to its default with a 80% brightness.

The solution is remove the variable mShadowColor of allocation on line 174 in FButton.java

int disabledColor = mShadowColor = Color.HSVToColor(alpha, hsv);

like this:

int disabledColor = Color.HSVToColor(alpha, hsv);

According to me analysis i think that's the best solution, because as the shadow is not displayed when the button is disabled then i do not see it necessary remove the color designated by us.