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

修复SwipeRefreshLayout空指针异常问题 #667

Closed
wants to merge 2 commits into from

Conversation

TestPlanB
Copy link

fix #537
SwipeRefreshLayout在onDetachedFromWindow中会调用reset方法,在这个时候改变drawable的透明度,这个时候ActivityLeakFixer不应该回收SwipeRefreshLayout的drawable。

@Yves0
Copy link
Collaborator

Yves0 commented Nov 15, 2021

  1. 我们没有复现问题,remove background 的时机在 onDetachedFromWindow 之后,理论上是安全的,如果有复现该问题,请问是否方便提供一下 crash 堆栈信息呢?以及是否有特殊情况情况导致 View 的 onDetachedFromWindow 在 Activitiy destroy 之后重复回调呢?
  2. 该修复无效,issue 的内容是 mCircleView.getBackground() 的结果为空,修复代码中 return 之后子 View 还会递归进来 remove background drawable

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

Successfully merging this pull request may close these issues.

接入库之后,onDestory中SwipeRefreshLayout会报错空指针
3 participants