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

弹幕设置透明度 setDanmakuTransparency 方法 调用后,在view 上的弹幕部分不变色,或者变的更深 #406

Closed
allenZ7 opened this issue Jan 3, 2019 · 1 comment

Comments

@allenZ7
Copy link

allenZ7 commented Jan 3, 2019

setDanmakuTransparency 这方法后,在屏幕上的弹幕部分颜色会变深

@allenZ7
Copy link
Author

allenZ7 commented Jan 4, 2019

问题解决了,感觉是个bug ,弹幕在AndroidDisplayer 这个类里的draw() 里有这么个调用了resetPaintAlpha(mDisplayConfig.PAINT); 里面的语句为
if (paint.getAlpha() != AlphaValue.MAX) {
paint.setAlpha(AlphaValue.MAX);
}
导致了mDisplayConfig.PAINT的透明度被重置为最大的了,我是这样改的, 用mDisplayConfig.PAINT.setAlpha(mDisplayConfig.transparency());替换掉resetPaintAlpha

@allenZ7 allenZ7 closed this as completed Jan 4, 2019
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