-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Floating Label Color doesn't change #187
Comments
yep, same here using this config:
The floating text still grey |
Same Problem here :\ |
I have the same problem, I think the problem comes from giving the FloatingLabel an alpha value, By modifying this line, int alpha = ((int) ((floatingLabelAlwaysShown ? 1 : floatingLabelFraction) * 0xff * (0.74f * focusFraction + 0.26f) * (floatingLabelTextColor != -1 ? 1 : Color.alpha(floatingLabelTextColor) / 256f))); you can start to get better alpha, But I still have some problems to get it to work as I need. |
for me to get it to work nice with Dark Background, I used setFloatingLabel(FLOATING_LABEL_NORMAL); and changed the code as follow : // calculate the alpha
int alpha = ((int) ((floatingLabelAlwaysShown ? 1 : floatingLabelFraction) * 0xff * (0.74f * focusFraction + 0.26f) * (floatingLabelTextColor != -1 ? 1 : Color.alpha(floatingLabelTextColor) / 256f)));
if(!highlightFloatingLabel)
alpha = ((int) ((floatingLabelAlwaysShown ? 1 : floatingLabelFraction) * 0xff * (0.74f * focusFraction + 1f) * (floatingLabelTextColor != -1 ? 1 : Color.alpha(floatingLabelTextColor) / 256f)));
textPaint.setAlpha(alpha); I know this is a dirty workaround, But that what I reached so far |
I also found that I have to give BaseColor, |
Also I found something strange,
gives Different results from
|
You can use with .setFocusFraction(1f); It work for me. |
While using with
Theme.AppCompat
, it does not adapt with the theme.Even with
app:met_floatingLabelTextColor="#FFFFFFFF"
, it still remains dark and unreadable.The text was updated successfully, but these errors were encountered: