public class

ReflowPagerAdapter

extends PagerAdapter
implements RequestHandler.RequestHandlerCallback ReflowWebView.ReflowWebViewCallback
java.lang.Object
   ↳ PagerAdapter
     ↳ com.pdftron.pdf.controls.ReflowPagerAdapter

Class Overview

pager adapter for reflow

Summary

Nested Classes
interface ReflowPagerAdapter.ReflowPagerAdapterCallback Callback interfaces for tap  
Fields
public static final int TH_MAX_SCAlE
public static final int TH_MIN_SCAlE
Public Constructors
ReflowPagerAdapter(ViewPager viewPager, Context context, PDFDoc doc)
Class constructor
Public Methods
void RequestHandlerProc(RequestHandler.JobRequestResult result, String outFilename, Object customData)
void cleanup()
Cleans up resources.
void destroyItem(ViewGroup container, int position, Object object)
void enableTurnPageOnTap(boolean enabled)
Enables turn page on tap.
int getCount()
int getCurrentPage()
int getTextSizeInPercent()
Object instantiateItem(ViewGroup container, int position)
boolean isInternalLinkClicked()
boolean isRightToLeftDirection()
boolean isViewFromObject(View view, Object object)
void onPageBottom(WebView webView)
Called when the bottom of this WebView is reached.
void onPageTop(WebView webView)
Called when the top of this WebView is reached.
void onPagesModified()
Should be called when pages of the document have been edited
boolean onReflowWebViewScale(WebView webView, ScaleGestureDetector detector)
Called when user scales.
boolean onReflowWebViewScaleBegin(WebView webView, ScaleGestureDetector detector)
Called when a scale gesture begins.
void onReflowWebViewScaleEnd(WebView webView, ScaleGestureDetector detector)
Called when a scale gesture ends.
void onReflowWebViewSingleTapUp(WebView webView, MotionEvent event)
Called when a tap occurs with the up event.
void resetInternalLinkClicked()
When isInternalLinkClicked() is called, this should be called to reset that an internal link has been clicked.
void setCurrentPage(int pageNum)
void setCustomColorMode(int backgroundColorMode)
Sets custom color.
void setDayMode()
Sets colors in the day mode (default).
static void setDebug(boolean debug)
void setListener(ReflowPagerAdapter.ReflowPagerAdapterCallback listener)
Sets the listener to ReflowPagerAdapterCallback
void setNightMode()
Sets colors in the night mode.
void setRightToLeftDirection(boolean isRtlMode)
Sets the right-to-left direction of the document.
void setTextSizeInPercent(int textSize)
Sets the text size using percentage.
void setTextZoom()
void startUpdate(ViewGroup container)
void zoomIn()
Zooms in.
void zoomOut()
Zooms out.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.pdftron.pdf.RequestHandler.RequestHandlerCallback
From interface com.pdftron.pdf.utils.ReflowWebView.ReflowWebViewCallback

Fields

public static final int TH_MAX_SCAlE

public static final int TH_MIN_SCAlE

Public Constructors

public ReflowPagerAdapter (ViewPager viewPager, Context context, PDFDoc doc)

Class constructor

Parameters
viewPager The view pager
context The context
doc The PDF doc

Public Methods

public void RequestHandlerProc (RequestHandler.JobRequestResult result, String outFilename, Object customData)

public void cleanup ()

Cleans up resources.

public void destroyItem (ViewGroup container, int position, Object object)

public void enableTurnPageOnTap (boolean enabled)

Enables turn page on tap.

Parameters
enabled True if enabled

public int getCount ()

public int getCurrentPage ()

public int getTextSizeInPercent ()

Returns
  • The text size in percentage

public Object instantiateItem (ViewGroup container, int position)

public boolean isInternalLinkClicked ()

Returns
  • True if an internal link has been clicked

public boolean isRightToLeftDirection ()

Returns
  • True if the direction is right-to-left

public boolean isViewFromObject (View view, Object object)

public void onPageBottom (WebView webView)

Called when the bottom of this WebView is reached.

public void onPageTop (WebView webView)

Called when the top of this WebView is reached.

public void onPagesModified ()

Should be called when pages of the document have been edited

public boolean onReflowWebViewScale (WebView webView, ScaleGestureDetector detector)

Called when user scales.

Parameters
detector The ScaleGestureDetector
Returns
  • True if handled

public boolean onReflowWebViewScaleBegin (WebView webView, ScaleGestureDetector detector)

Called when a scale gesture begins.

Parameters
detector The ScaleGestureDetector
Returns
  • True if handled

public void onReflowWebViewScaleEnd (WebView webView, ScaleGestureDetector detector)

Called when a scale gesture ends.

Parameters
detector The ScaleGestureDetector

public void onReflowWebViewSingleTapUp (WebView webView, MotionEvent event)

Called when a tap occurs with the up event.

Parameters
event The MotionEvent

public void resetInternalLinkClicked ()

When isInternalLinkClicked() is called, this should be called to reset that an internal link has been clicked.

public void setCurrentPage (int pageNum)

public void setCustomColorMode (int backgroundColorMode)

Sets custom color.

public void setDayMode ()

Sets colors in the day mode (default).

public static void setDebug (boolean debug)

public void setListener (ReflowPagerAdapter.ReflowPagerAdapterCallback listener)

Sets the listener to ReflowPagerAdapterCallback

Parameters
listener The listener

public void setNightMode ()

Sets colors in the night mode.

public void setRightToLeftDirection (boolean isRtlMode)

Sets the right-to-left direction of the document. Used for supporting right-to-left languages.

Parameters
isRtlMode True if right-to-left mode is enabled

public void setTextSizeInPercent (int textSize)

Sets the text size using percentage.

Parameters
textSize The text size using percentage

public void setTextZoom ()

public void startUpdate (ViewGroup container)

public void zoomIn ()

Zooms in.

public void zoomOut ()

Zooms out.