diff options
author | Paul Gardiner <paulg.artifex@glidos.net> | 2013-02-18 13:41:36 +0000 |
---|---|---|
committer | Paul Gardiner <paulg.artifex@glidos.net> | 2013-02-22 12:21:23 +0000 |
commit | e4b05d70f8d82b478c5803ad52fb77875e4c9b4f (patch) | |
tree | 39c7bb00ffd59e41342b0ecde77d45b11a73e368 /android | |
parent | d5dcc473b0e50e726dc80f2be4ecdcad43217d64 (diff) | |
download | mupdf-e4b05d70f8d82b478c5803ad52fb77875e4c9b4f.tar.xz |
Android: avoid unnecessary repeated set up of child views
This change showed up a bug where highlights may fail to show if passed
in while the page was set as blank. That bug is also fixed in this commit
Diffstat (limited to 'android')
-rw-r--r-- | android/src/com/artifex/mupdfdemo/PageView.java | 3 | ||||
-rw-r--r-- | android/src/com/artifex/mupdfdemo/ReaderView.java | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/android/src/com/artifex/mupdfdemo/PageView.java b/android/src/com/artifex/mupdfdemo/PageView.java index b6b533bd..17673493 100644 --- a/android/src/com/artifex/mupdfdemo/PageView.java +++ b/android/src/com/artifex/mupdfdemo/PageView.java @@ -224,6 +224,9 @@ public abstract class PageView extends ViewGroup { } mIsBlank = false; + // Highlights may be missing because mIsBlank was true on last draw + if (mSearchView != null) + mSearchView.invalidate(); mPageNumber = page; if (mEntire == null) { diff --git a/android/src/com/artifex/mupdfdemo/ReaderView.java b/android/src/com/artifex/mupdfdemo/ReaderView.java index 9e738cac..d1e7c086 100644 --- a/android/src/com/artifex/mupdfdemo/ReaderView.java +++ b/android/src/com/artifex/mupdfdemo/ReaderView.java @@ -677,9 +677,9 @@ public class ReaderView extends AdapterView<Adapter> if (v == null) { v = mAdapter.getView(i, getCached(), this); addAndMeasureChild(i, v); + onChildSetup(i, v); + onScaleChild(v, mScale); } - onChildSetup(i, v); - onScaleChild(v, mScale); return v; } |