Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 103f59ba authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Fix bug 3052686 - ScrollView padding treated incorrectly" into gingerbread

parents 458fc5f5 62a744e1
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -503,9 +503,7 @@ public class HorizontalScrollView extends FrameLayout {
        switch (action & MotionEvent.ACTION_MASK) {
            case MotionEvent.ACTION_DOWN: {
                final float x = ev.getX();
                if (!(mIsBeingDragged = inChild((int) x, (int) ev.getY()))) {
                    return false;
                }
                mIsBeingDragged = true;

                /*
                 * If being flinged and user touches, stop the fling. isFinished
@@ -642,7 +640,7 @@ public class HorizontalScrollView extends FrameLayout {
        if (getChildCount() > 0) {
            View child = getChildAt(0);
            scrollRange = Math.max(0,
                    child.getWidth() - getWidth() - mPaddingLeft - mPaddingRight);
                    child.getWidth() - (getWidth() - mPaddingLeft - mPaddingRight));
        }
        return scrollRange;
    }
+2 −4
Original line number Diff line number Diff line
@@ -498,9 +498,7 @@ public class ScrollView extends FrameLayout {
        switch (action & MotionEvent.ACTION_MASK) {
            case MotionEvent.ACTION_DOWN: {
                final float y = ev.getY();
                if (!(mIsBeingDragged = inChild((int) ev.getX(), (int) y))) {
                    return false;
                }
                mIsBeingDragged = true;
                
                /*
                 * If being flinged and user touches, stop the fling. isFinished
@@ -637,7 +635,7 @@ public class ScrollView extends FrameLayout {
        if (getChildCount() > 0) {
            View child = getChildAt(0);
            scrollRange = Math.max(0,
                    child.getHeight() - getHeight() - mPaddingBottom - mPaddingTop);
                    child.getHeight() - (getHeight() - mPaddingBottom - mPaddingTop));
        }
        return scrollRange;
    }