| AndBase开发框架 1.6

- 首页
- 相关页面
- 命名空间
- 类
- 文件

- 类列表
- 类索引
- 类继承关系
- 类成员

全部 类 命名空间 文件 函数 变量 枚举值 页
类 | Public 成员函数 | Protected 成员函数 | Private 成员函数 | Private 属性 | 静态 Private 属性 | 所有成员列表
com.ab.view.pullview.AbPullToRefreshView类 参考
类 com.ab.view.pullview.AbPullToRefreshView 继承关系图:

## 类
interface | OnFooterLoadListener
interface | OnHeaderRefreshListener

## Public 成员函数
| AbPullToRefreshView (Context context, AttributeSet attrs)
| AbPullToRefreshView (Context context)
boolean | onInterceptTouchEvent (MotionEvent e)
boolean | onTouchEvent (MotionEvent event)
void | headerRefreshing ()
void | onHeaderRefreshFinish ()
void | onFooterLoadFinish ()
void | setOnHeaderRefreshListener (OnHeaderRefreshListener headerRefreshListener)
void | setOnFooterLoadListener (OnFooterLoadListener footerLoadListener)
void | setPullRefreshEnable (boolean enable)
void | setLoadMoreEnable (boolean enable)
boolean | isEnablePullRefresh ()
boolean | isEnableLoadMore ()
AbListViewHeader | getHeaderView ()
AbListViewFooter | getFooterView ()
ProgressBar | getHeaderProgressBar ()
ProgressBar | getFooterProgressBar ()

## Protected 成员函数
void | onFinishInflate ()

## Private 成员函数
void | init (Context context)
void | addHeaderView ()
void | addFooterView ()
void | initContentAdapterView ()
boolean | isRefreshViewScroll (int deltaY)
void | headerPrepareToRefresh (int deltaY)
void | footerPrepareToRefresh (int deltaY)
int | updateHeaderViewTopMargin (int deltaY)
void | footerLoading ()
void | setHeaderTopMargin (int topMargin)
int | getHeaderTopMargin ()

## Private 属性
Context | mContext = null
boolean | mEnablePullRefresh = true
boolean | mEnableLoadMore = true
int | mLastMotionX
int | mLastMotionY
AbListViewHeader | mHeaderView
AbListViewFooter | mFooterView
AdapterView<?> | mAdapterView
ScrollView | mScrollView
int | mHeaderViewHeight
int | mFooterViewHeight
int | mPullState
int | mCount = 0
boolean | mPullRefreshing = false
boolean | mPullLoading = false
OnFooterLoadListener | mOnFooterLoadListener
OnHeaderRefreshListener | mOnHeaderRefreshListener

## 静态 Private 属性
static final int | PULL_UP_STATE = 0
static final int | PULL_DOWN_STATE = 1

## 详细描述

© 2012 amsoft.cn 名称：AbPullToRefreshView.java 描述：下拉刷新和加载更多的View.

作者
  还如一梦中

版本
  v1.0

日期
  ：2014-06-04 下午11:52:13

## 构造及析构函数说明

com.ab.view.pullview.AbPullToRefreshView.AbPullToRefreshView | ( | Context | context,
|  | AttributeSet | attrs
| ) |  |
| inline

构造.

参数

  context | the context
  attrs | the attrs

com.ab.view.pullview.AbPullToRefreshView.AbPullToRefreshView | ( | Context | context | ) |
| inline

构造.

参数

  context | the context

## 成员函数说明

void com.ab.view.pullview.AbPullToRefreshView.addFooterView | ( |  | ) |
| inline private

add FooterView.

void com.ab.view.pullview.AbPullToRefreshView.addHeaderView | ( |  | ) |
| inline private

add HeaderView.

void com.ab.view.pullview.AbPullToRefreshView.footerLoading | ( |  | ) |
| inline private

加载更多.

void com.ab.view.pullview.AbPullToRefreshView.footerPrepareToRefresh | ( | int | deltaY | ) |
| inline private

footer 准备刷新,手指移动过程,还没有释放 移动footer view高度同样和移动header view 高度是一样，都是通过修改header view的topmargin的值来达到.

参数

  deltaY | 手指滑动的距离

ProgressBar com.ab.view.pullview.AbPullToRefreshView.getFooterProgressBar | ( |  | ) |
| inline

描述：获取Footer ProgressBar，用于设置自定义样式.

返回
  the footer progress bar

AbListViewFooter com.ab.view.pullview.AbPullToRefreshView.getFooterView | ( |  | ) |
| inline

描述：获取Footer View.

返回
  the footer view

ProgressBar com.ab.view.pullview.AbPullToRefreshView.getHeaderProgressBar | ( |  | ) |
| inline

描述：获取Header ProgressBar，用于设置自定义样式.

返回
  the header progress bar

int com.ab.view.pullview.AbPullToRefreshView.getHeaderTopMargin | ( |  | ) |
| inline private

获取当前header view 的topMargin.

返回
  the header top margin

AbListViewHeader com.ab.view.pullview.AbPullToRefreshView.getHeaderView | ( |  | ) |
| inline

描述：获取Header View.

返回
  the header view

void com.ab.view.pullview.AbPullToRefreshView.headerPrepareToRefresh | ( | int | deltaY | ) |
| inline private

header 准备刷新,手指移动过程,还没有释放.

参数

  deltaY | 手指滑动的距离

void com.ab.view.pullview.AbPullToRefreshView.headerRefreshing | ( |  | ) |
| inline

下拉刷新.

void com.ab.view.pullview.AbPullToRefreshView.init | ( | Context | context | ) |
| inline private

初始化View.

参数

  context | the context

void com.ab.view.pullview.AbPullToRefreshView.initContentAdapterView | ( |  | ) |
| inline private

init AdapterView like ListView, GridView and so on; or init ScrollView.

boolean com.ab.view.pullview.AbPullToRefreshView.isEnableLoadMore | ( |  | ) |
| inline

加载更多是打开的吗.

返回
  true, if is enable load more

boolean com.ab.view.pullview.AbPullToRefreshView.isEnablePullRefresh | ( |  | ) |
| inline

下拉刷新是打开的吗.

返回
  true, if is enable pull refresh

boolean com.ab.view.pullview.AbPullToRefreshView.isRefreshViewScroll | ( | int | deltaY | ) |
| inline private

判断滑动方向，和是否响应事件.

参数

  deltaY | deltaY > 0 是向下运动,< 0是向上运动

返回
  true, if is refresh view scroll

void com.ab.view.pullview.AbPullToRefreshView.onFinishInflate | ( |  | ) |
| inline protected

在此添加footer view保证添加到linearlayout中的最后.

void com.ab.view.pullview.AbPullToRefreshView.onFooterLoadFinish | ( |  | ) |
| inline

footer view 完成更新后恢复初始状态.

void com.ab.view.pullview.AbPullToRefreshView.onHeaderRefreshFinish | ( |  | ) |
| inline

header view 完成更新后恢复初始状态.

boolean com.ab.view.pullview.AbPullToRefreshView.onInterceptTouchEvent | ( | MotionEvent | e | ) |
| inline

boolean com.ab.view.pullview.AbPullToRefreshView.onTouchEvent | ( | MotionEvent | event | ) |
| inline

void com.ab.view.pullview.AbPullToRefreshView.setHeaderTopMargin | ( | int | topMargin | ) |
| inline private

设置header view 的topMargin的值.

参数

  topMargin | the new header top margin

void com.ab.view.pullview.AbPullToRefreshView.setLoadMoreEnable | ( | boolean | enable | ) |
| inline

打开或者关闭加载更多功能.

参数

  enable | 开关标记

void com.ab.view.pullview.AbPullToRefreshView.setOnFooterLoadListener | ( | OnFooterLoadListener | footerLoadListener | ) |
| inline

设置加载更多的监听器.

参数

  footerLoadListener | the new on footer load listener

void com.ab.view.pullview.AbPullToRefreshView.setOnHeaderRefreshListener | ( | OnHeaderRefreshListener | headerRefreshListener | ) |
| inline

设置下拉刷新的监听器.

参数

  headerRefreshListener | the new on header refresh listener

void com.ab.view.pullview.AbPullToRefreshView.setPullRefreshEnable | ( | boolean | enable | ) |
| inline

打开或者关闭下拉刷新功能.

参数

  enable | 开关标记

int com.ab.view.pullview.AbPullToRefreshView.updateHeaderViewTopMargin | ( | int | deltaY | ) |
| inline private

修改Header view top margin的值.

参数

  deltaY | the delta y

返回
  the int

## 类成员变量说明

AdapterView<?> com.ab.view.pullview.AbPullToRefreshView.mAdapterView
| private

list or grid.

Context com.ab.view.pullview.AbPullToRefreshView.mContext = null
| private

上下文.

int com.ab.view.pullview.AbPullToRefreshView.mCount = 0
| private

上一次的数量.

boolean com.ab.view.pullview.AbPullToRefreshView.mEnableLoadMore = true
| private

加载更多的开关.

boolean com.ab.view.pullview.AbPullToRefreshView.mEnablePullRefresh = true
| private

下拉刷新的开关.

AbListViewFooter com.ab.view.pullview.AbPullToRefreshView.mFooterView
| private

footer view.

int com.ab.view.pullview.AbPullToRefreshView.mFooterViewHeight
| private

footer view 高度.

AbListViewHeader com.ab.view.pullview.AbPullToRefreshView.mHeaderView
| private

header view.

int com.ab.view.pullview.AbPullToRefreshView.mHeaderViewHeight
| private

header view 高度.

int com.ab.view.pullview.AbPullToRefreshView.mLastMotionX
| private

x上一次保存的.

int com.ab.view.pullview.AbPullToRefreshView.mLastMotionY
| private

y上一次保存的.

OnFooterLoadListener com.ab.view.pullview.AbPullToRefreshView.mOnFooterLoadListener
| private

Footer加载更多监听器.

OnHeaderRefreshListener com.ab.view.pullview.AbPullToRefreshView.mOnHeaderRefreshListener
| private

Header下拉刷新监听器.

boolean com.ab.view.pullview.AbPullToRefreshView.mPullLoading = false
| private

正在加载更多.

boolean com.ab.view.pullview.AbPullToRefreshView.mPullRefreshing = false
| private

正在下拉刷新.

int com.ab.view.pullview.AbPullToRefreshView.mPullState
| private

滑动状态.

ScrollView com.ab.view.pullview.AbPullToRefreshView.mScrollView
| private

Scrollview.

final int com.ab.view.pullview.AbPullToRefreshView.PULL_DOWN_STATE = 1
| static private

下拉动作.

final int com.ab.view.pullview.AbPullToRefreshView.PULL_UP_STATE = 0
| static private

上滑动作.

该类的文档由以下文件生成:

- src/com/ab/view/pullview/AbPullToRefreshView.java