android[API]ViewPager.OnPageChangeListener

类概述


回调响应变化状态选择页面调用的接口

Summary


Public Methods
abstract void onPageScrollStateChanged(int state)
Called when the scroll state changes.
滚动状态修改时调用
abstract void onPageScrolled(int position, float positionOffset, int positionOffsetPixels)
滚动过程调用
This method will be invoked when the current page is scrolled, either as part of a programmatically initiated smooth scroll or a user initiated touch scroll.
abstract void onPageSelected(int position)
This method will be invoked when a new page becomes selected.
当新的页面成为新的选择成功时候调用

Public Methods


public abstract void onPageScrollStateChanged (int state)

Called when the scroll state changes. Useful for discovering when the user begins dragging, when the pager is automatically settling to the current page, or when it is fully stopped/idle.

Parameters
state The new scroll state.
See Also

public abstract void onPageScrolled (int position, float positionOffset, int positionOffsetPixels)

This method will be invoked when the current page is scrolled, either as part of a programmatically initiated smooth scroll or a user initiated touch scroll.

滚动时候被调用

Parameters
position Position index of the first page currently being displayed. Page position+1 will be visible if positionOffset is nonzero.
目前显示的第一个页面
positionOffsetValue from [0, 1) indicating the offset from the page at position.
值(0,1)表示页面位置的偏移。
positionOffsetPixels Value in pixels indicating the offset from position.
偏移的像素点
public abstract void onPageSelected (int position)

This method will be invoked when a new page becomes selected. Animation is not necessarily complete.

一个新页被调用时执行,仍为原来的page时,该方法不被调用  

Parameters
position Position index of the new selected page.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值