public class

CustomRelativeLayout

extends RelativeLayout
implements PDFViewCtrl.OnCanvasSizeChangeListener
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 setAnnot(PDFViewCtrl pdfViewCtrl, Annot annot, int annotPageNum)
set view position and size by given annotation bounding box
void setPagePosition(double x, double y, int page_num)
Sets page position of this view
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 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

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 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 page_num)

Sets page position of this view

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 x coordinates in page pt.
y y coordinates in page pt.
page_num 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 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