diff options
author | Michael Jurka <mikejurka@google.com> | 2012-10-02 14:42:53 +0200 |
---|---|---|
committer | Michael Jurka <mikejurka@google.com> | 2012-10-02 14:42:53 +0200 |
commit | 9a0890c109b6c861e6ed7f76e123e5999c4acf5a (patch) | |
tree | 428e30aaac51fecfec1bd600a4a549c627c49048 /packages/SystemUI/src | |
parent | c56e5600501a5c376dc13e6a99fcec7782fc8718 (diff) | |
download | frameworks_base-9a0890c109b6c861e6ed7f76e123e5999c4acf5a.zip frameworks_base-9a0890c109b6c861e6ed7f76e123e5999c4acf5a.tar.gz frameworks_base-9a0890c109b6c861e6ed7f76e123e5999c4acf5a.tar.bz2 |
Fix jump cut when dismissing items in Recents
Bug: 7070897
Diffstat (limited to 'packages/SystemUI/src')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java index a0f197d..5e0df49 100644 --- a/packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java +++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java @@ -165,19 +165,18 @@ public class RecentsVerticalScrollView extends ScrollView } setLayoutTransition(transitioner); - // Scroll to end after layout. - final ViewTreeObserver observer = getViewTreeObserver(); - + // Scroll to end after initial layout. final OnGlobalLayoutListener updateScroll = new OnGlobalLayoutListener() { public void onGlobalLayout() { mLastScrollPosition = scrollPositionOfMostRecent(); scrollTo(0, mLastScrollPosition); + final ViewTreeObserver observer = getViewTreeObserver(); if (observer.isAlive()) { observer.removeOnGlobalLayoutListener(this); } } }; - observer.addOnGlobalLayoutListener(updateScroll); + getViewTreeObserver().addOnGlobalLayoutListener(updateScroll); } @Override |