diff options
author | Paul Gardiner <paul@glidos.net> | 2012-02-21 11:30:04 +0000 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2012-02-21 17:38:23 +0100 |
commit | 37382b7a9f8471a9547787e51984e560545ad872 (patch) | |
tree | 8f77f264784a8b17c8147f94bc03d63466428c68 /android | |
parent | 3b20948bb65fd52c15935a660e19cfeff75af2fc (diff) | |
download | mupdf-37382b7a9f8471a9547787e51984e560545ad872.tar.xz |
Android app: implement Tor's request to clamp vertical position when height within screen
Diffstat (limited to 'android')
-rw-r--r-- | android/src/com/artifex/mupdf/ReaderView.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/android/src/com/artifex/mupdf/ReaderView.java b/android/src/com/artifex/mupdf/ReaderView.java index 2715b55d..25945f20 100644 --- a/android/src/com/artifex/mupdf/ReaderView.java +++ b/android/src/com/artifex/mupdf/ReaderView.java @@ -380,6 +380,12 @@ public class ReaderView extends AdapterView<Adapter> cvLeft += corr.x; cvTop += corr.y; cvBottom += corr.y; + } else if (cv.getMeasuredHeight() <= getHeight()) { + // When the current view is as small as the screen in height, clamp + // it vertically + Point corr = getCorrection(getScrollBounds(cvLeft, cvTop, cvRight, cvBottom)); + cvTop += corr.y; + cvBottom += corr.y; } cv.layout(cvLeft, cvTop, cvRight, cvBottom); |