Skip to content
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

floatLable默认的不透明度太低 #371

Open
hub-zjy1024 opened this issue Jul 12, 2018 · 0 comments
Open

floatLable默认的不透明度太低 #371

hub-zjy1024 opened this issue Jul 12, 2018 · 0 comments

Comments

@hub-zjy1024
Copy link

当控件没有获取焦点的时候,控件的floatlabeltext的不透明度太低,就算设置的颜色是不透明的,也会很难看清。建议添加属性,可以对最小不透明度进行修改
默认的不透明度最低是0.26,我自己改成0.7了,建议添加一个属性进行自定义,关键性代码如下:
再onDraw方法中
int alpha = ((int) ((floatingLabelAlwaysShown ? 1 : floatingLabelFraction) * 0xff * (0.3f * focusFraction + 0.7)
* (floatingLabelTextColor != -1 ? 1 : Color.alpha(floatingLabelTextColor) / 256f)));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant