like this: 
Normal advice adjust constants...
Thank you for your reply, what do you mean by constant? @1stmetro
.constants. see instructions to set constants they can be used to resolve your issue.
I've got the same problem.
@1stmetro more details would be so great...
I've got the same problem.
@1stmetro
What do you mean constants ?
Look in source
public class Constants {
public static boolean DEBUG_MODE = false;
/** Between 0 and 1, the thumbnails quality (default 0.3). Increasing this value may cause performance decrease */
public static float THUMBNAIL_RATIO = 0.3f;
/**
* The size of the rendered parts (default 256)
* Tinier : a little bit slower to have the whole page rendered but more reactive.
* Bigger : user will have to wait longer to have the first visual results
*/
public static float PART_SIZE = 256;
/** Part of document above and below screen that should be preloaded, in dp */
public static int PRELOAD_OFFSET = 20;
public static class Cache {
/** The size of the cache (number of bitmaps kept) */
public static int CACHE_SIZE = 120;
public static int THUMBNAILS_CACHE_SIZE = 8;
}
public static class Pinch {
public static float MAXIMUM_ZOOM = 10;
public static float MINIMUM_ZOOM = 1;
I adjusted the code but no difference.
If you have the source adjust THUMBNAILS_CACHE_SIZE
And cache size it will improve your issues.
First download the AndroidPdfViewer library from github. Add it as a library module to your project. Do not use it as a gradle dependency. Then open Constants.java and change it as follows:
public static float THUMBNAIL_RATIO = 1f;
Build your project, and the problem will be fixed. For me this did the trick.
@djnotes
The above is not a good solution. I tried it while debugging and had pretty severe problems. You are a basically making all of the other caching strategies irrelevant by doing this and you will most likely run out of memory.
If you enable the debug view in the cache manager you can get a hint of why this problem is occurring. When you zoom in you are creating much smaller parts in higher quantities. When you zoom back out these parts are retained. Unfortunately you have a limited number of parts that can be displayed as determined in your constants config.
Once you run out you will start only seeing the thumbnail image instead of the full render. You could fix this by upping the cache size but you might blow the memory out.
My hack solution works but does not seem like the ideal way to accomplish this. It re-inits the part cache and clears out all the excess mini parts. It runs smoothly on a very old very low spec android device with 100+ pages open.
private void makeAFreeSpace() {
synchronized (passiveActiveLock) {
while ((activeCache.size() + passiveCache.size()) >= CACHE_SIZE && !passiveCache.isEmpty()) {
PagePart part = passiveCache.poll();
part.getRenderedBitmap().recycle();
}
while ((activeCache.size() + passiveCache.size()) >= CACHE_SIZE && !activeCache.isEmpty()) {
//activeCache.poll().getRenderedBitmap().recycle();
this.makeANewSet();
}
}
}