From 4400a2a9084319862dd7b89861a0c629c4af01b2 Mon Sep 17 00:00:00 2001 From: Chris Banes Date: Wed, 30 Nov 2016 01:25:40 +0000 Subject: [PATCH] am 556477d9: am b4656ada: am 2a0fc5c1: am 5930ab4a: am ab809dd7: Fix AppBarLayout scrolling when scrolling view is small * commit '556477d9b5e0fe97a5e7e1827ce87cc4f7ab33d5': Fix AppBarLayout scrolling when scrolling view is small GitOrigin-RevId=defee6f0a4b07431766233d9d43ec50a7936164c PiperOrigin-RevId: 140549436 --- src/android/support/design/widget/AppBarLayout.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/android/support/design/widget/AppBarLayout.java b/src/android/support/design/widget/AppBarLayout.java index 495458838..53e96ba98 100644 --- a/src/android/support/design/widget/AppBarLayout.java +++ b/src/android/support/design/widget/AppBarLayout.java @@ -656,13 +656,13 @@ public class AppBarLayout extends LinearLayout { } @Override - public boolean onStartNestedScroll(CoordinatorLayout coordinatorLayout, AppBarLayout child, + public boolean onStartNestedScroll(CoordinatorLayout parent, AppBarLayout child, View directTargetChild, View target, int nestedScrollAxes) { // Return true if we're nested scrolling vertically, and we have scrollable children // and the scrolling view is big enough to scroll final boolean started = (nestedScrollAxes & ViewCompat.SCROLL_AXIS_VERTICAL) != 0 && child.hasScrollableChildren() - && coordinatorLayout.getHeight() - target.getHeight() <= child.getHeight(); + && parent.getHeight() - directTargetChild.getHeight() <= child.getHeight(); if (started && mAnimator != null) { // Cancel any offset animation