diff options
author | Adam Powell <adamp@google.com> | 2010-05-24 15:13:41 -0700 |
---|---|---|
committer | Adam Powell <adamp@google.com> | 2010-05-24 15:13:41 -0700 |
commit | 7e5e3745cf0103219a13071fbd488c3c01da85d9 (patch) | |
tree | 7c6df3fb3d25910fa5be56f323bfd70e95352863 /core/java | |
parent | c7c7afd7a1af36e787266815487f4600196406b8 (diff) | |
download | frameworks_base-7e5e3745cf0103219a13071fbd488c3c01da85d9.zip frameworks_base-7e5e3745cf0103219a13071fbd488c3c01da85d9.tar.gz frameworks_base-7e5e3745cf0103219a13071fbd488c3c01da85d9.tar.bz2 |
Fix bug 2710825 - Prevent ExpandableListView from scrolling too far when expanding children.
Change-Id: I21b37647c5ad16e4f57fdda433e3b3ee2c7c83ad
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/widget/AbsListView.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java index 48e7f79..fcfecb3 100644 --- a/core/java/android/widget/AbsListView.java +++ b/core/java/android/widget/AbsListView.java @@ -2645,7 +2645,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te mScrollDuration); mLastSeenPos = lastPos; - if (lastPos != mTargetPos) { + if (lastPos < mTargetPos) { post(this); } break; @@ -2671,7 +2671,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te final int nextViewHeight = nextView.getHeight(); final int nextViewTop = nextView.getTop(); final int extraScroll = mExtraScroll; - if (nextPos != mBoundPos) { + if (nextPos < mBoundPos) { smoothScrollBy(Math.max(0, nextViewHeight + nextViewTop - extraScroll), mScrollDuration); @@ -2704,7 +2704,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te mLastSeenPos = firstPos; - if (firstPos != mTargetPos) { + if (firstPos > mTargetPos) { post(this); } break; @@ -2728,7 +2728,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te final int lastViewTop = lastView.getTop(); final int lastViewPixelsShowing = listHeight - lastViewTop; mLastSeenPos = lastPos; - if (lastPos != mBoundPos) { + if (lastPos > mBoundPos) { smoothScrollBy(-(lastViewPixelsShowing - mExtraScroll), mScrollDuration); post(this); } else { |