diff options
author | Paul Gardiner <paulg.artifex@glidos.net> | 2013-02-03 15:21:02 +0000 |
---|---|---|
committer | Paul Gardiner <paulg.artifex@glidos.net> | 2013-02-03 15:21:02 +0000 |
commit | 340bb21f4982d7b6dab8236f8996c86cf2d5a4e2 (patch) | |
tree | d6bc0fb35d89b99de871f3b416ea8c6ab7703b77 /android/src/com/artifex/mupdfdemo/MuPDFActivity.java | |
parent | ef66c129e2451d4d929c21339fa6c36f9ece1a37 (diff) | |
download | mupdf-340bb21f4982d7b6dab8236f8996c86cf2d5a4e2.tar.xz |
Android: first attempt at reflow mode
Diffstat (limited to 'android/src/com/artifex/mupdfdemo/MuPDFActivity.java')
-rw-r--r-- | android/src/com/artifex/mupdfdemo/MuPDFActivity.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/android/src/com/artifex/mupdfdemo/MuPDFActivity.java b/android/src/com/artifex/mupdfdemo/MuPDFActivity.java index f432c734..61b24170 100644 --- a/android/src/com/artifex/mupdfdemo/MuPDFActivity.java +++ b/android/src/com/artifex/mupdfdemo/MuPDFActivity.java @@ -122,6 +122,7 @@ public class MuPDFActivity extends Activity private boolean mSelecting = false; private final Handler mHandler = new Handler(); private boolean mAlertsActive= false; + private boolean mReflow = false; private AsyncTask<Void,Void,MuPDFAlert> mAlertTask; private AlertDialog mAlertDialog; @@ -589,7 +590,8 @@ public class MuPDFActivity extends Activity // Activate the search-preparing button mSearchButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { - searchModeOn(); + //searchModeOn(); + toggleReflow(); } }); @@ -794,6 +796,16 @@ public class MuPDFActivity extends Activity return mycore; } + private void toggleReflow() { + mReflow = !mReflow; + if (mReflow) { + mDocView.setAdapter(new MuPDFReflowAdapter(this, core)); + } else { + mDocView.setAdapter(new MuPDFPageAdapter(this, core)); + } + mDocView.refresh(mReflow); + } + @Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); |