From 3d6896c31c68ff88f7e338dd4c198d1a40c30977 Mon Sep 17 00:00:00 2001 From: zhpanvip Date: Sun, 12 Jul 2020 16:17:07 +0800 Subject: [PATCH] resume startLoop and stopLoop in onDetachedFromWindow and AttachedToWindow. --- .../src/main/java/com/zhpan/bannerview/BannerViewPager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bannerview/src/main/java/com/zhpan/bannerview/BannerViewPager.java b/bannerview/src/main/java/com/zhpan/bannerview/BannerViewPager.java index 1866637d..675aef63 100644 --- a/bannerview/src/main/java/com/zhpan/bannerview/BannerViewPager.java +++ b/bannerview/src/main/java/com/zhpan/bannerview/BannerViewPager.java @@ -162,14 +162,14 @@ private void initView() { @Override protected void onDetachedFromWindow() { -// stopLoop(); + stopLoop(); super.onDetachedFromWindow(); } @Override protected void onAttachedToWindow() { super.onAttachedToWindow(); -// startLoop(); + startLoop(); } @Override