public class

WrapContentViewPager

extends ViewPager
java.lang.Object
   ↳ ViewPager
     ↳ com.pdftron.pdf.widget.WrapContentViewPager

Summary

Public Constructors
WrapContentViewPager(Context context)
WrapContentViewPager(Context context, AttributeSet attrs)
Public Methods
void setContentHeight(int height)
Caches the measured content height, assuming it was measured against the pager's current width.
void setContentHeight(int height, int width)
Caches the measured content height for the given width so it can be reused on subsequent measure passes without remeasuring the page.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public WrapContentViewPager (Context context)

public WrapContentViewPager (Context context, AttributeSet attrs)

Public Methods

public void setContentHeight (int height)

Caches the measured content height, assuming it was measured against the pager's current width. Kept for source/binary compatibility with existing callers; prefer setContentHeight(int, int) when the width used for measurement is known, so the cache can be correctly invalidated if the pager's width changes later.

Parameters
height the measured content height, or -1 to invalidate the cache

public void setContentHeight (int height, int width)

Caches the measured content height for the given width so it can be reused on subsequent measure passes without remeasuring the page. The cache is automatically ignored if the pager's width changes later (e.g. rotation, or the tablet/phone dialog width switch in BaseBottomDialogFragment#adjustBottomSheetWidth()), since the content height is width-dependent (some rows use 0dp/MATCH_CONSTRAINT children).

Parameters
height the measured content height, or -1 to invalidate the cache
width the width the height was measured against