public class

CustomRelativeLayout

extends RelativeLayout
implements PDFViewCtrl.OnCanvasSizeChangeListener PDFViewCtrl.PageSlidingListener
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.RelativeLayout
         ↳ com.pdftron.pdf.tools.CustomRelativeLayout
Known Direct Subclasses

Class Overview

a RelativeLayout inside PDFViewCtrl with specified page position posX, posY, and page_num. See: setPagePosition(double, double, int)

The position of this layout is calculated in PDF page coordinates. In page coordinate, the origin location (0, 0) is at the bottom left corner of the PDF page. The x axis extends horizontally to the right and y axis extends vertically upward.

Summary

[Expand]
Inherited Constants
From class android.widget.RelativeLayout
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
CustomRelativeLayout(Context context, PDFViewCtrl parent, double x, double y, int page_num)
Constructor
CustomRelativeLayout(Context context)
CustomRelativeLayout(Context context, AttributeSet attrs)
CustomRelativeLayout(Context context, AttributeSet attrs, int defStyleAttr)
CustomRelativeLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
Public Methods
void onCanvasSizeChanged()
current canvas size is changed
void onScrollOffsetChanged(int x, int y)
Called when PDFViewCtrl undergoes page sliding transformation.
void setAnnot(PDFViewCtrl pdfViewCtrl, Annot annot, int annotPageNum)
set view position and size by given annotation bounding box
void setPagePosition(double x, double y, int pageNum)
Sets page position of this view This will only take effect if setRect(PDFViewCtrl, Rect, int) is called already
The position of this layout is calculated in PDF page coordinates.
void setRect(PDFViewCtrl pdfViewCtrl, Rect rect, int pageNum)
set view position and size by given rect
void setScreenPosition(double left, double top, int pageNum)
Sets screen position of this view This will only take effect if setRect(PDFViewCtrl, Rect, int) is called already
This specifies the top left corner of the view.
void setScreenRect(double left, double top, double right, double bottom, int pageNum)
void setZoomWithParent(boolean zoomWithParent)
decide if the view will zoom while parent view is zooming
[Expand]
Inherited Methods
From class android.widget.RelativeLayout
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.accessibility.AccessibilityEventSource
From interface com.pdftron.pdf.PDFViewCtrl.OnCanvasSizeChangeListener
From interface com.pdftron.pdf.PDFViewCtrl.PageSlidingListener

Public Constructors

public CustomRelativeLayout (Context context, PDFViewCtrl parent, double x, double y, int page_num)

Constructor

Parameters
context context of view
parent parent view
x x coordinates in page pt.
y y coordinates in page pt.
page_num pdf page number

public CustomRelativeLayout (Context context)

public CustomRelativeLayout (Context context, AttributeSet attrs)

public CustomRelativeLayout (Context context, AttributeSet attrs, int defStyleAttr)

public CustomRelativeLayout (Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)

Public Methods

public void onCanvasSizeChanged ()

current canvas size is changed

public void onScrollOffsetChanged (int x, int y)

Called when PDFViewCtrl undergoes page sliding transformation.

Parameters
x same as #getSlidingScrollX()
y same as #getSlidingScrollY()

public void setAnnot (PDFViewCtrl pdfViewCtrl, Annot annot, int annotPageNum)

set view position and size by given annotation bounding box

Parameters
pdfViewCtrl the PDFViewCtrl
annot the annotation
annotPageNum annotation page number

public void setPagePosition (double x, double y, int pageNum)

Sets page position of this view This will only take effect if setRect(PDFViewCtrl, Rect, int) is called already

The position of this layout is calculated in PDF page coordinates. In page coordinate, the origin location (0, 0) is at the bottom left corner of the PDF page. The x axis extends horizontally to the right and y axis extends vertically upward.

Parameters
x the x coordinates in page pt
y the y coordinates in page pt
pageNum the page number

public void setRect (PDFViewCtrl pdfViewCtrl, Rect rect, int pageNum)

set view position and size by given rect

Parameters
pdfViewCtrl the PDFViewCtrl
rect the rect
pageNum the page number

public void setScreenPosition (double left, double top, int pageNum)

Sets screen position of this view This will only take effect if setRect(PDFViewCtrl, Rect, int) is called already

This specifies the top left corner of the view.

Parameters
left the left in screen pt
top the top in screen pt
pageNum the page number

public void setScreenRect (double left, double top, double right, double bottom, int pageNum)

public void setZoomWithParent (boolean zoomWithParent)

decide if the view will zoom while parent view is zooming

Parameters
zoomWithParent if true, when parent view is zooming, this view will also zoom; otherwise this view will remain same size