diff options
author | Paul Gardiner <paulg.artifex@glidos.net> | 2013-02-18 15:09:07 +0000 |
---|---|---|
committer | Paul Gardiner <paulg.artifex@glidos.net> | 2013-02-22 12:21:24 +0000 |
commit | 860f401dc6c349d9f838d6dc90bc921876dca58e (patch) | |
tree | 186a5411b8d96a38f6b25d0e3520dab53b1c88a3 /android/src/com/artifex/mupdfdemo/ReaderView.java | |
parent | f72c3f422ab2790fd55a056e5bbdbfdb388c0811 (diff) | |
download | mupdf-860f401dc6c349d9f838d6dc90bc921876dca58e.tar.xz |
Android: support selection of annotation
Diffstat (limited to 'android/src/com/artifex/mupdfdemo/ReaderView.java')
-rw-r--r-- | android/src/com/artifex/mupdfdemo/ReaderView.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/android/src/com/artifex/mupdfdemo/ReaderView.java b/android/src/com/artifex/mupdfdemo/ReaderView.java index d1e7c086..4df67ed0 100644 --- a/android/src/com/artifex/mupdfdemo/ReaderView.java +++ b/android/src/com/artifex/mupdfdemo/ReaderView.java @@ -88,6 +88,7 @@ public class ReaderView extends AdapterView<Adapter> public void setDisplayedViewIndex(int i) { if (0 <= i && i < mAdapter.getCount()) { + onMoveOffChild(mCurrent); mCurrent = i; onMoveToChild(i); mResetLayout = true; @@ -309,6 +310,8 @@ public class ReaderView extends AdapterView<Adapter> protected void onMoveToChild(int i) {} + protected void onMoveOffChild(int i) {} + protected void onSettle(View v) {}; protected void onUnsettle(View v) {}; @@ -317,6 +320,10 @@ public class ReaderView extends AdapterView<Adapter> protected void onScaleChild(View v, Float scale) {}; + public View getView(int i) { + return mChildViews.get(i); + } + public View getDisplayedView() { return mChildViews.get(mCurrent); } @@ -533,6 +540,7 @@ public class ReaderView extends AdapterView<Adapter> // where we must set hq area for the new current view post(this); + onMoveOffChild(mCurrent); mCurrent++; onMoveToChild(mCurrent); } @@ -543,6 +551,7 @@ public class ReaderView extends AdapterView<Adapter> // where we must set hq area for the new current view post(this); + onMoveOffChild(mCurrent); mCurrent--; onMoveToChild(mCurrent); } |