am 103f59ba: Merge "Fix bug 3052686 - ScrollView padding treated incorrectly" into gingerbread
Merge commit '103f59baa7f7d03cfe22a4b07690cc809185dfe9' into gingerbread-plus-aosp * commit '103f59baa7f7d03cfe22a4b07690cc809185dfe9': Fix bug 3052686 - ScrollView padding treated incorrectly
This commit is contained in:
@@ -503,9 +503,7 @@ public class HorizontalScrollView extends FrameLayout {
|
|||||||
switch (action & MotionEvent.ACTION_MASK) {
|
switch (action & MotionEvent.ACTION_MASK) {
|
||||||
case MotionEvent.ACTION_DOWN: {
|
case MotionEvent.ACTION_DOWN: {
|
||||||
final float x = ev.getX();
|
final float x = ev.getX();
|
||||||
if (!(mIsBeingDragged = inChild((int) x, (int) ev.getY()))) {
|
mIsBeingDragged = true;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If being flinged and user touches, stop the fling. isFinished
|
* If being flinged and user touches, stop the fling. isFinished
|
||||||
@@ -642,7 +640,7 @@ public class HorizontalScrollView extends FrameLayout {
|
|||||||
if (getChildCount() > 0) {
|
if (getChildCount() > 0) {
|
||||||
View child = getChildAt(0);
|
View child = getChildAt(0);
|
||||||
scrollRange = Math.max(0,
|
scrollRange = Math.max(0,
|
||||||
child.getWidth() - getWidth() - mPaddingLeft - mPaddingRight);
|
child.getWidth() - (getWidth() - mPaddingLeft - mPaddingRight));
|
||||||
}
|
}
|
||||||
return scrollRange;
|
return scrollRange;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -498,9 +498,7 @@ public class ScrollView extends FrameLayout {
|
|||||||
switch (action & MotionEvent.ACTION_MASK) {
|
switch (action & MotionEvent.ACTION_MASK) {
|
||||||
case MotionEvent.ACTION_DOWN: {
|
case MotionEvent.ACTION_DOWN: {
|
||||||
final float y = ev.getY();
|
final float y = ev.getY();
|
||||||
if (!(mIsBeingDragged = inChild((int) ev.getX(), (int) y))) {
|
mIsBeingDragged = true;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If being flinged and user touches, stop the fling. isFinished
|
* If being flinged and user touches, stop the fling. isFinished
|
||||||
@@ -637,7 +635,7 @@ public class ScrollView extends FrameLayout {
|
|||||||
if (getChildCount() > 0) {
|
if (getChildCount() > 0) {
|
||||||
View child = getChildAt(0);
|
View child = getChildAt(0);
|
||||||
scrollRange = Math.max(0,
|
scrollRange = Math.max(0,
|
||||||
child.getHeight() - getHeight() - mPaddingBottom - mPaddingTop);
|
child.getHeight() - (getHeight() - mPaddingBottom - mPaddingTop));
|
||||||
}
|
}
|
||||||
return scrollRange;
|
return scrollRange;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user