public abstract class BaseTransformer extends java.lang.Object implements ViewPagerEx.PageTransformer
| Constructor and Description |
|---|
BaseTransformer() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
hideOffscreenPages()
If the position offset of a fragment is less than negative one or greater than one, returning true will set the
visibility of the fragment to
View.GONE. |
protected boolean |
isPagingEnabled()
Indicates if the default animations of the view pager should be used.
|
protected void |
onPostTransform(android.view.View view,
float position)
Called each
transformPage(View, float) call after onTransform(View, float) is finished. |
protected void |
onPreTransform(android.view.View view,
float position)
Called each
transformPage(View, float) before {onTransform(View, float) is called. |
protected abstract void |
onTransform(android.view.View view,
float position)
Called each
transformPage(View, float). |
void |
setCustomAnimationInterface(BaseAnimationInterface animationInterface) |
void |
transformPage(android.view.View view,
float position)
Apply a property transformation to the given page.
|
protected abstract void onTransform(android.view.View view,
float position)
transformPage(View, float).view - position - public void transformPage(android.view.View view,
float position)
ViewPagerEx.PageTransformertransformPage in interface ViewPagerEx.PageTransformerview - Apply the transformation to this pageposition - Position of page relative to the current front-and-center
position of the pager. 0 is front and center. 1 is one full
page position to the right, and -1 is one page position to the left.protected boolean hideOffscreenPages()
View.GONE. Returning false will force the fragment to View.VISIBLE.protected boolean isPagingEnabled()
protected void onPreTransform(android.view.View view,
float position)
transformPage(View, float) before {onTransform(View, float) is called.view - position - protected void onPostTransform(android.view.View view,
float position)
transformPage(View, float) call after onTransform(View, float) is finished.view - position - public void setCustomAnimationInterface(BaseAnimationInterface animationInterface)