public class

ReflowPagerAdapter

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

Class Overview

pager adapter for reflow

Summary

Nested Classes
interface ReflowPagerAdapter.ReflowAppCallback  
class ReflowPagerAdapter.ReflowAppInterface  
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 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()
boolean getImageInReflowEnabled()
Gets value to show images in reflow mode, default to true.
boolean getIsDoNotReflowTextOverImages()
Gets value to show text over images in reflow mode, default to false.
boolean getIsHideBackgroundImages()
Gets value to show background images in reflow mode, default to false.
boolean getIsHideImagesUnderInvisibleText()
Gets value to show images under invisible text in reflow mode, default to false.
boolean getIsHideImagesUnderText()
Gets value to show images under text in reflow mode, default to false.
int getTextSizeInPercent()
Object instantiateItem(ViewGroup container, int position)
boolean isEditingEnabled()
boolean isInternalLinkClicked()
boolean isRightToLeftDirection()
boolean isTextSelectionMenuEnabled()
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
void onReflowWebViewLongPress(WebView webView, MotionEvent event)
Called when a long press event occurs.
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 scrollPageBy(int x, int y)
void setAnnotStyleProperties(HashMap<Integer, AnnotStyleProperty> annotStyleProperties)
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 setDoNotReflowTextOverImages(boolean doNotReflowTextOverImages)
Sets whether to show text over images in reflow mode, default to false.
void setEditingEnabled(boolean editingEnabled)
void setHideBackgroundImages(boolean hideBackgroundImages)
Sets whether to show background images in reflow mode, default to false.
void setHideImagesUnderInvisibleText(boolean hideImagesUnderInvisibleText)
Sets whether to show images under invisible text in reflow mode, default to false.
void setHideImagesUnderText(boolean hideImagesUnderText)
Sets whether to show images under text in reflow mode, default to false.
void setImageInReflowEnabled(boolean imageInReflowEnabled)
Sets whether to show images in reflow mode, default to true.
void setListener(ReflowPagerAdapter.ReflowPagerAdapterCallback listener)
Sets the listener to ReflowPagerAdapterCallback
void setNightMode()
Sets colors in the night mode.
void setReflowUrlLoadedListener(ReflowControl.ReflowUrlLoadedListener listener)
Sets a ReflowUrlLoadedListener for ReflowPagerAdapterCallback
void setRightToLeftDirection(boolean isRtlMode)
Sets the right-to-left direction of the document.
void setTextSelectionMenuEnabled(boolean textSelectionMenuEnabled)
void setTextSizeInPercent(int textSize)
Sets the text size using percentage.
void setTextZoom()
void setToolManager(ToolManager toolManager)
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.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 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 boolean getImageInReflowEnabled ()

Gets value to show images in reflow mode, default to true.

public boolean getIsDoNotReflowTextOverImages ()

Gets value to show text over images in reflow mode, default to false.

public boolean getIsHideBackgroundImages ()

Gets value to show background images in reflow mode, default to false.

public boolean getIsHideImagesUnderInvisibleText ()

Gets value to show images under invisible text in reflow mode, default to false.

public boolean getIsHideImagesUnderText ()

Gets value to show images under text in reflow mode, default to false.

public int getTextSizeInPercent ()

Returns
  • The text size in percentage

public Object instantiateItem (ViewGroup container, int position)

public boolean isEditingEnabled ()

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 isTextSelectionMenuEnabled ()

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 void onReflowWebViewLongPress (WebView webView, MotionEvent event)

Called when a long press event occurs.

Parameters
event The MotionEvent

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 scrollPageBy (int x, int y)

public void setAnnotStyleProperties (HashMap<Integer, AnnotStyleProperty> annotStyleProperties)

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 setDoNotReflowTextOverImages (boolean doNotReflowTextOverImages)

Sets whether to show text over images in reflow mode, default to false.

public void setEditingEnabled (boolean editingEnabled)

public void setHideBackgroundImages (boolean hideBackgroundImages)

Sets whether to show background images in reflow mode, default to false.

public void setHideImagesUnderInvisibleText (boolean hideImagesUnderInvisibleText)

Sets whether to show images under invisible text in reflow mode, default to false.

public void setHideImagesUnderText (boolean hideImagesUnderText)

Sets whether to show images under text in reflow mode, default to false.

public void setImageInReflowEnabled (boolean imageInReflowEnabled)

Sets whether to show images in reflow mode, default to true.

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 setReflowUrlLoadedListener (ReflowControl.ReflowUrlLoadedListener listener)

Sets a ReflowUrlLoadedListener for ReflowPagerAdapterCallback

Parameters
listener The listener

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 setTextSelectionMenuEnabled (boolean textSelectionMenuEnabled)

public void setTextSizeInPercent (int textSize)

Sets the text size using percentage.

Parameters
textSize The text size using percentage

public void setTextZoom ()

public void setToolManager (ToolManager toolManager)

public void startUpdate (ViewGroup container)

public void zoomIn ()

Zooms in.

public void zoomOut ()

Zooms out.