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

GPreviewActivity crash #197

Open
a365344743s opened this issue Sep 17, 2021 · 0 comments
Open

GPreviewActivity crash #197

a365344743s opened this issue Sep 17, 2021 · 0 comments

Comments

@a365344743s
Copy link

crash未知在GPreviewActivity第218行,getViewPager().setEnabled(true),而getViewPager()未空。

具体原因是

  1. GPreviewActivity.onDestroy()中viewPager被设置为null
  2. SmoothImageView.onDetachedFromWindow 会调用animator.cancel,如果此时动画还未完成,会走到SmoothImageView 419行onAnimationEnd中,然后调用GPreviewActivity 第218行。
  3. 而GPreviewActivity.onDestroy 将会先于 SmoothImageView.onDetachedFromWindow 被调用,此时就crash了
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