From f7ca619dce8aa123859aedae3f0fb73843d82989 Mon Sep 17 00:00:00 2001 From: teach Date: Wed, 3 Jun 2020 14:52:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../consecutivescroller/ConsecutiveScrollerLayout.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/consecutivescroller/src/main/java/com/donkingliang/consecutivescroller/ConsecutiveScrollerLayout.java b/consecutivescroller/src/main/java/com/donkingliang/consecutivescroller/ConsecutiveScrollerLayout.java index a699dd7..cfcbbb5 100644 --- a/consecutivescroller/src/main/java/com/donkingliang/consecutivescroller/ConsecutiveScrollerLayout.java +++ b/consecutivescroller/src/main/java/com/donkingliang/consecutivescroller/ConsecutiveScrollerLayout.java @@ -1239,8 +1239,9 @@ private void stopScroll() { } private View getBottomView() { - if (getChildCount() > 0) { - return getChildAt(getChildCount() - 1); + List views = getEffectiveChildren(); + if (!views.isEmpty()) { + return views.get(views.size() - 1); } return null; }