am 7e5e3745: Fix bug 2710825 - Prevent ExpandableListView from scrolling too far when expanding children.
Merge commit '7e5e3745cf0103219a13071fbd488c3c01da85d9' into froyo-plus-aosp * commit '7e5e3745cf0103219a13071fbd488c3c01da85d9': Fix bug 2710825 - Prevent ExpandableListView from scrolling too far when expanding children.
This commit is contained in:
@@ -2645,7 +2645,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
|
|||||||
mScrollDuration);
|
mScrollDuration);
|
||||||
|
|
||||||
mLastSeenPos = lastPos;
|
mLastSeenPos = lastPos;
|
||||||
if (lastPos != mTargetPos) {
|
if (lastPos < mTargetPos) {
|
||||||
post(this);
|
post(this);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -2671,7 +2671,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
|
|||||||
final int nextViewHeight = nextView.getHeight();
|
final int nextViewHeight = nextView.getHeight();
|
||||||
final int nextViewTop = nextView.getTop();
|
final int nextViewTop = nextView.getTop();
|
||||||
final int extraScroll = mExtraScroll;
|
final int extraScroll = mExtraScroll;
|
||||||
if (nextPos != mBoundPos) {
|
if (nextPos < mBoundPos) {
|
||||||
smoothScrollBy(Math.max(0, nextViewHeight + nextViewTop - extraScroll),
|
smoothScrollBy(Math.max(0, nextViewHeight + nextViewTop - extraScroll),
|
||||||
mScrollDuration);
|
mScrollDuration);
|
||||||
|
|
||||||
@@ -2704,7 +2704,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
|
|||||||
|
|
||||||
mLastSeenPos = firstPos;
|
mLastSeenPos = firstPos;
|
||||||
|
|
||||||
if (firstPos != mTargetPos) {
|
if (firstPos > mTargetPos) {
|
||||||
post(this);
|
post(this);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -2728,7 +2728,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
|
|||||||
final int lastViewTop = lastView.getTop();
|
final int lastViewTop = lastView.getTop();
|
||||||
final int lastViewPixelsShowing = listHeight - lastViewTop;
|
final int lastViewPixelsShowing = listHeight - lastViewTop;
|
||||||
mLastSeenPos = lastPos;
|
mLastSeenPos = lastPos;
|
||||||
if (lastPos != mBoundPos) {
|
if (lastPos > mBoundPos) {
|
||||||
smoothScrollBy(-(lastViewPixelsShowing - mExtraScroll), mScrollDuration);
|
smoothScrollBy(-(lastViewPixelsShowing - mExtraScroll), mScrollDuration);
|
||||||
post(this);
|
post(this);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user