public class LoopViewPager
extends ViewPager
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
LoopViewPager.OnSingleTouchListener
创建点击事件接口
|
| 构造器和说明 |
|---|
LoopViewPager(android.content.Context context) |
LoopViewPager(android.content.Context context,
android.util.AttributeSet attrs) |
| 限定符和类型 | 方法和说明 |
|---|---|
PagerAdapter |
getAdapter() |
int |
getCurrentItem() |
boolean |
isScrollable() |
boolean |
onInterceptTouchEvent(android.view.MotionEvent ev) |
void |
onSingleTouch(int num)
单击
|
boolean |
onTouchEvent(android.view.MotionEvent arg0) |
void |
setAdapter(PagerAdapter adapter) |
void |
setBoundaryCaching(boolean flag)
If set to true, the boundary views (i.e. first and last) will never be destroyed
This may help to prevent "blinking" of some views
|
void |
setCurrentItem(int item) |
void |
setCurrentItem(int item,
boolean smoothScroll) |
void |
setOnPageChangeListener(OnPageChangeListener listener) |
void |
setOnSingleTouch(LoopViewPager.OnSingleTouchListener listener) |
void |
setScrollable(boolean isScrollable) |
static int |
toRealPosition(int position,
int count)
helper function which may be used when implementing FragmentPagerAdapter
|
public LoopViewPager(android.content.Context context)
public LoopViewPager(android.content.Context context,
android.util.AttributeSet attrs)
public static int toRealPosition(int position,
int count)
position - count - public void setBoundaryCaching(boolean flag)
flag - public void setAdapter(PagerAdapter adapter)
public PagerAdapter getAdapter()
public int getCurrentItem()
public void setCurrentItem(int item,
boolean smoothScroll)
public void setCurrentItem(int item)
public void setOnPageChangeListener(OnPageChangeListener listener)
public boolean onInterceptTouchEvent(android.view.MotionEvent ev)
public boolean onTouchEvent(android.view.MotionEvent arg0)
public void setOnSingleTouch(LoopViewPager.OnSingleTouchListener listener)
public void onSingleTouch(int num)
public void setScrollable(boolean isScrollable)
public boolean isScrollable()