-
Notifications
You must be signed in to change notification settings - Fork 350
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
在fragment中使用问题 #150
Comments
了解 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
场景,mainactivity中有四个fragment banner在首页展示,当我切换到第四个fragment中,并点击跳转到其他activity中,在返回来到第四个fragment时banner会自动执行startAutoPlay(),此时首页并没有展示,这样会浪费资源。
断点是这段代码导致的
@OverRide
protected void onVisibilityChanged(@nonnull View changedView, int visibility) {
super.onVisibilityChanged(changedView, visibility);
if (VISIBLE == visibility) {
startAutoPlay();
} else if (GONE == visibility || INVISIBLE == visibility) {
onInvisibleToUser();
}
}
The text was updated successfully, but these errors were encountered: