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

多次切换页面时alpha会出错 #16

Closed
czhah opened this issue Aug 5, 2020 · 1 comment
Closed

多次切换页面时alpha会出错 #16

czhah opened this issue Aug 5, 2020 · 1 comment

Comments

@czhah
Copy link

czhah commented Aug 5, 2020

问题:两个activity都注册了侧滑返回,都是自定义标题栏,且给标题栏设置蓝色背景,A页面跳转B页面时再退回A页面,重复几十次会出现B页面标题栏变成透明的(实际测试重复几次就出现了),手动触发一下侧滑功能,立即恢复蓝色背景;
原因:SlideBackIconView的初始拉动距离为0,绘制时alpha = slideLength / maxSlideLength - 0.2f,透明度为负值;
解决:透明度设置不为负数就不会出现了;

@ParfoisMeng
Copy link
Owner

ParfoisMeng commented Aug 7, 2020

未能复现,但相关代码已修改。请更新v1.1.2。

alpha = max(currentSlideLength / viewMaxLength - 0.2f, 0f)

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

2 participants