public class CustomViewPager
extends ViewPager
android.support.v4.view.ViewPager implementation that corrects
the height of the ViewPager and also dispatches touch events to either the ViewPager
or the date or time picker depending on the direction of the swipe.| Constructor and Description |
|---|
CustomViewPager(android.content.Context context) |
CustomViewPager(android.content.Context context,
android.util.AttributeSet attrs) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
dispatchTouchEvent(android.view.MotionEvent event)
When the user swipes their finger horizontally, dispatch
those touch events to the ViewPager.
|
void |
onMeasure(int widthMeasureSpec,
int heightMeasureSpec)
Setting wrap_content on a ViewPager's layout_height in XML
doesn't seem to be recognized and the ViewPager will fill the
height of the screen regardless.
|
public CustomViewPager(android.content.Context context)
public CustomViewPager(android.content.Context context,
android.util.AttributeSet attrs)
public void onMeasure(int widthMeasureSpec,
int heightMeasureSpec)
public boolean dispatchTouchEvent(android.view.MotionEvent event)
event -