summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gardiner <paulg.artifex@glidos.net>2013-02-05 10:41:55 +0000
committerRobin Watts <robin.watts@artifex.com>2013-02-05 15:55:12 +0000
commit8f4bf3719354596677e8c03c70c9b4ba641b9eb2 (patch)
tree29e20f09be62a36d92210548fbca50107c62d19b
parent9b922accbdee37f7b255765124c123cb9ec5f160 (diff)
downloadmupdf-8f4bf3719354596677e8c03c70c9b4ba641b9eb2.tar.xz
Android: avoid view churn in reflow mode
-rw-r--r--android/src/com/artifex/mupdfdemo/MuPDFReflowAdapter.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/android/src/com/artifex/mupdfdemo/MuPDFReflowAdapter.java b/android/src/com/artifex/mupdfdemo/MuPDFReflowAdapter.java
index 5e90be92..48625a7e 100644
--- a/android/src/com/artifex/mupdfdemo/MuPDFReflowAdapter.java
+++ b/android/src/com/artifex/mupdfdemo/MuPDFReflowAdapter.java
@@ -30,10 +30,7 @@ public class MuPDFReflowAdapter extends BaseAdapter {
public View getView(int position, View convertView, ViewGroup parent) {
final MuPDFReflowView reflowView;
- // Should reuse old views if possible, but WebViews seem to refuse to
- // decrease height even when new content is loaded, so create a new view
- // each time as a workaround
- if (true || convertView == null) {
+ if (convertView == null) {
reflowView = new MuPDFReflowView(mContext, mCore, new Point(parent.getWidth(), parent.getHeight()));
} else {
reflowView = (MuPDFReflowView) convertView;