public class BasePDFPagerAdapter
extends PagerAdapter
| Modifier and Type | Field and Description |
|---|---|
protected BitmapContainer |
bitmapContainer |
protected android.content.Context |
context |
protected static int |
DEFAULT_OFFSCREENSIZE |
protected static float |
DEFAULT_QUALITY |
protected PdfErrorHandler |
errorHandler |
protected static int |
FIRST_PAGE |
protected android.view.LayoutInflater |
inflater |
protected int |
offScreenSize |
protected java.lang.String |
pdfPath |
protected android.graphics.pdf.PdfRenderer |
renderer |
protected float |
renderQuality |
| Constructor and Description |
|---|
BasePDFPagerAdapter(android.content.Context context,
java.lang.String pdfPath) |
BasePDFPagerAdapter(android.content.Context context,
java.lang.String pdfPath,
int offScreenSize)
This constructor was added for those who want to customize ViewPager's offScreenSize attr
|
BasePDFPagerAdapter(android.content.Context context,
java.lang.String pdfPath,
PdfErrorHandler errorHandler) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
destroyItem(android.view.ViewGroup container,
int position,
java.lang.Object object) |
protected PdfRendererParams |
extractPdfParamsFromFirstPage(android.graphics.pdf.PdfRenderer renderer,
float renderQuality) |
int |
getCount() |
protected android.graphics.pdf.PdfRenderer.Page |
getPDFPage(android.graphics.pdf.PdfRenderer renderer,
int position) |
protected android.os.ParcelFileDescriptor |
getSeekableFileDescriptor(java.lang.String path) |
protected void |
init() |
java.lang.Object |
instantiateItem(android.view.ViewGroup container,
int position) |
protected boolean |
isAnAsset(java.lang.String path) |
boolean |
isViewFromObject(android.view.View view,
java.lang.Object object) |
protected void |
releaseAllBitmaps() |
protected static final int FIRST_PAGE
protected static final float DEFAULT_QUALITY
protected static final int DEFAULT_OFFSCREENSIZE
protected java.lang.String pdfPath
protected android.content.Context context
protected android.graphics.pdf.PdfRenderer renderer
protected BitmapContainer bitmapContainer
protected android.view.LayoutInflater inflater
protected float renderQuality
protected int offScreenSize
protected PdfErrorHandler errorHandler
public BasePDFPagerAdapter(android.content.Context context,
java.lang.String pdfPath)
public BasePDFPagerAdapter(android.content.Context context,
java.lang.String pdfPath,
PdfErrorHandler errorHandler)
public BasePDFPagerAdapter(android.content.Context context,
java.lang.String pdfPath,
int offScreenSize)
protected void init()
protected PdfRendererParams extractPdfParamsFromFirstPage(android.graphics.pdf.PdfRenderer renderer, float renderQuality)
protected android.os.ParcelFileDescriptor getSeekableFileDescriptor(java.lang.String path)
throws java.io.IOException
java.io.IOExceptionprotected boolean isAnAsset(java.lang.String path)
public java.lang.Object instantiateItem(android.view.ViewGroup container,
int position)
protected android.graphics.pdf.PdfRenderer.Page getPDFPage(android.graphics.pdf.PdfRenderer renderer,
int position)
public void destroyItem(android.view.ViewGroup container,
int position,
java.lang.Object object)
public void close()
protected void releaseAllBitmaps()
public int getCount()
public boolean isViewFromObject(android.view.View view,
java.lang.Object object)