public class

PageIndicatorLayout

extends LinearLayout
implements View.OnAttachStateChangeListener PDFViewCtrl.PageChangeListener
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.LinearLayout
         ↳ com.pdftron.pdf.controls.PageIndicatorLayout

Class Overview

A LinearLayout that shows page indicator. It includes current page number and total page number.

Summary

Nested Classes
interface PageIndicatorLayout.OnPDFViewVisibilityChanged Listener for PDFViewCtrl visibility change event  
[Expand]
Inherited Constants
From class android.widget.LinearLayout
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
PageIndicatorLayout(Context context)
Class constructor
PageIndicatorLayout(Context context, AttributeSet attrs)
Class constructor
PageIndicatorLayout(Context context, AttributeSet attrs, int defStyleAttr)
Class constructor
PageIndicatorLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
Class constructor for API > 21
Public Methods
int[] calculateAutoAdjustPosition()
Calculates the position of page indicator if it is going to adjust position automatically.
TextView getIndicator()
Gets page indicator text view
ProgressBar getSpinner()
Gets the loading spinner
void onPageChange(int old_page, int cur_page, PDFViewCtrl.PageChangeState state)
This is called when there is a page changes in PDFViewCtrl
void onViewAttachedToWindow(View v)
void onViewDetachedFromWindow(View v)
void setAutoAdjustPosition(boolean autoAdjust)
Sets whether to auto adjust position when there is layout changes
void setGravity(int gravity)
Overload implementation of setGravity(int) Describes how the child views are positioned.
void setOnPdfViewCtrlVisibilityChangeListener(PageIndicatorLayout.OnPDFViewVisibilityChanged listener)
Sets PDFViewCtrl visibility change listener
void setPdfViewCtrl(PDFViewCtrl pdfViewCtrl)
Sets PDFViewCtrl
[Expand]
Inherited Methods
From class android.widget.LinearLayout
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.View.OnAttachStateChangeListener
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.accessibility.AccessibilityEventSource
From interface com.pdftron.pdf.PDFViewCtrl.PageChangeListener

Public Constructors

public PageIndicatorLayout (Context context)

Class constructor

public PageIndicatorLayout (Context context, AttributeSet attrs)

Class constructor

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

Class constructor

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

Class constructor for API > 21

Public Methods

public int[] calculateAutoAdjustPosition ()

Calculates the position of page indicator if it is going to adjust position automatically.

Returns
  • This page indicator position

public TextView getIndicator ()

Gets page indicator text view

Returns
  • page indicator text view

public ProgressBar getSpinner ()

Gets the loading spinner

Returns
  • loading spinner

public void onPageChange (int old_page, int cur_page, PDFViewCtrl.PageChangeState state)

This is called when there is a page changes in PDFViewCtrl

Parameters
old_page the old page number
cur_page the current (new) page number
state in non-continuous page presentation modes and when the built-in page sliding is in process, this flag is used to

public void onViewAttachedToWindow (View v)

public void onViewDetachedFromWindow (View v)

public void setAutoAdjustPosition (boolean autoAdjust)

Sets whether to auto adjust position when there is layout changes

Parameters
autoAdjust true then auto adjust position, false otherwise

public void setGravity (int gravity)

Overload implementation of setGravity(int) Describes how the child views are positioned. Defaults to GRAVITY_TOP. If this layout has a VERTICAL orientation, this controls where all the child views are placed if there is extra vertical space. If this layout has a HORIZONTAL orientation, this controls the alignment of the children.

Parameters
gravity See android.view.Gravity

public void setOnPdfViewCtrlVisibilityChangeListener (PageIndicatorLayout.OnPDFViewVisibilityChanged listener)

Sets PDFViewCtrl visibility change listener

Parameters
listener PDFViewCtrl visibility change listener

public void setPdfViewCtrl (PDFViewCtrl pdfViewCtrl)

Sets PDFViewCtrl

Parameters
pdfViewCtrl The PDFViewCtrl