XBanner icon indicating copy to clipboard operation
XBanner copied to clipboard

在fragment中使用问题

Open caobin821651400 opened this issue 5 years ago • 1 comments

场景,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(); } }

caobin821651400 avatar Dec 24 '19 06:12 caobin821651400

了解

xiaohaibin avatar Dec 26 '19 14:12 xiaohaibin