public class ViewPager
extends android.support.v4.view.ViewPager
| Constructor and Description |
|---|
ViewPager(android.content.Context context)
Creates a new view pager, which allows to disable switching between fragments using swipe
gestures.
|
ViewPager(android.content.Context context,
android.util.AttributeSet attributeSet)
Creates a new view pager, which allows to disable switching between fragments using swipe
gestures.
|
| Modifier and Type | Method and Description |
|---|---|
void |
enableSwipe(boolean enable)
Sets, whether switching between fragments using swipe gestures should be enabled, false
otherwise.
|
boolean |
isSwipeEnabled()
Returns, whether switching between fragments using swipe gestures is enabled, or not.
|
boolean |
onInterceptTouchEvent(android.view.MotionEvent event) |
boolean |
onTouchEvent(android.view.MotionEvent event) |
public ViewPager(android.content.Context context)
context - The context, which should be used by the view, as an instance of the class Context. The context may not be nullpublic ViewPager(android.content.Context context,
android.util.AttributeSet attributeSet)
context - The context, which should be used by the view, as an instance of the class Context. The context may not be nullattributeSet - The attribute set, the view's attributes should be obtained from, as an instance of
the type AttributeSet or null, if no attributes should be obtainedpublic final boolean isSwipeEnabled()
public final void enableSwipe(boolean enable)
enable - True, if switching between fragments using swipe gestures should be enabled, false
otherwisepublic final boolean onInterceptTouchEvent(android.view.MotionEvent event)
public final boolean onTouchEvent(android.view.MotionEvent event)