| AndBase开发框架 1.6

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

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

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

## Public 成员函数
| AbSlidingPageView (Context context)
| AbSlidingPageView (Context context, AttributeSet attrs)
void | showNext ()
void | showPrevious ()
void | computeScroll ()
int | getScreenState ()
void | addContentView (View view)
void | addNextView (View view)
int | getNextViewOffset ()
void | setNextViewOffset (int nextViewOffset)
OnPageChangeListener | getOnPageChangeListener ()
void | setOnPageChangeListener (OnPageChangeListener onPageChangeListener)

## 静态 Public 属性
static final int | SCREEN_STATE_NEXT = 0
static final int | SCREEN_STATE_PROVIOUS = 1

## Protected 成员函数
void | onLayout (boolean changed, int l, int t, int r, int b)
void | onMeasure (int widthMeasureSpec, int heightMeasureSpec)

## Private 成员函数
void | obtainVelocityTracker (MotionEvent event)
void | releaseVelocityTracker ()

## Private 属性
String | TAG = AbSlidingPageView.class.getSimpleName()
boolean | D = true
Scroller | mScroller
VelocityTracker | mVelocityTracker
int | mScreenState = SCREEN_STATE_PROVIOUS
int | nextViewOffset = 50
OnPageChangeListener | onPageChangeListener = null
boolean | finish = true

## 详细描述

© 2012 amsoft.cn 名称：AbSlidingPageView.java 描述：页面滚动切换,实现焦点触发和Touch，适用于电视开发.

作者
  还如一梦中

版本
  v1.0

日期
  ：2013-05-17 下午6:46:29

## 构造及析构函数说明

com.ab.view.sliding.AbSlidingPageView.AbSlidingPageView | ( | Context | context | ) |
| inline

构造.

参数

  context | the context

com.ab.view.sliding.AbSlidingPageView.AbSlidingPageView | ( | Context | context,
|  | AttributeSet | attrs
| ) |  |
| inline

构造.

参数

  context | the context
  attrs | the attrs

## 成员函数说明

void com.ab.view.sliding.AbSlidingPageView.addContentView | ( | View | view | ) |
| inline

设置主View.

参数

  view | the view

void com.ab.view.sliding.AbSlidingPageView.addNextView | ( | View | view | ) |
| inline

设置下一个View.

参数

  view | the view

void com.ab.view.sliding.AbSlidingPageView.computeScroll | ( |  | ) |
| inline

描述：滚动.

参见
  android.view.View::computeScroll()

int com.ab.view.sliding.AbSlidingPageView.getNextViewOffset | ( |  | ) |
| inline

Gets the next view offset.

返回
  the next view offset

OnPageChangeListener com.ab.view.sliding.AbSlidingPageView.getOnPageChangeListener | ( |  | ) |
| inline

Gets the on page change listener.

返回
  the on page change listener

int com.ab.view.sliding.AbSlidingPageView.getScreenState | ( |  | ) |
| inline

获取当前状态.

返回
  the screen state

void com.ab.view.sliding.AbSlidingPageView.obtainVelocityTracker | ( | MotionEvent | event | ) |
| inline private

初始化速度检测.

参数

  event | the event

void com.ab.view.sliding.AbSlidingPageView.onLayout | ( | boolean | changed,
|  | int | l,
|  | int | t,
|  | int | r,
|  | int | b
| ) |  |
| inline protected

描述：View的位置设定.

参数

  changed | the changed
  l | the l
  t | the t
  r | the r
  b | the b

void com.ab.view.sliding.AbSlidingPageView.onMeasure | ( | int | widthMeasureSpec,
|  | int | heightMeasureSpec
| ) |  |
| inline protected

描述：测量View的宽高.

参数

  widthMeasureSpec | the width measure spec
  heightMeasureSpec | the height measure spec

参见
  android.view.View::onMeasure(int, int)

void com.ab.view.sliding.AbSlidingPageView.releaseVelocityTracker | ( |  | ) |
| inline private

释放速度检测.

void com.ab.view.sliding.AbSlidingPageView.setNextViewOffset | ( | int | nextViewOffset | ) |
| inline

设置遮挡距离.

参数

  nextViewOffset | the new next view offset

void com.ab.view.sliding.AbSlidingPageView.setOnPageChangeListener | ( | OnPageChangeListener | onPageChangeListener | ) |
| inline

设置页面改变监听器.

参数

  onPageChangeListener | the new on page change listener

void com.ab.view.sliding.AbSlidingPageView.showNext | ( |  | ) |
| inline

打开下一个View.

void com.ab.view.sliding.AbSlidingPageView.showPrevious | ( |  | ) |
| inline

返回上一个View.

## 类成员变量说明

boolean com.ab.view.sliding.AbSlidingPageView.D = true
| private

记录日志的开关.

boolean com.ab.view.sliding.AbSlidingPageView.finish = true
| private

目标滚动是否完成.

int com.ab.view.sliding.AbSlidingPageView.mScreenState = SCREEN_STATE_PROVIOUS
| private

当前屏幕状态.

Scroller com.ab.view.sliding.AbSlidingPageView.mScroller
| private

滚动器.

VelocityTracker com.ab.view.sliding.AbSlidingPageView.mVelocityTracker
| private

速度.

int com.ab.view.sliding.AbSlidingPageView.nextViewOffset = 50
| private

下一个View的偏移.

OnPageChangeListener com.ab.view.sliding.AbSlidingPageView.onPageChangeListener = null
| private

页面切换监听器.

final int com.ab.view.sliding.AbSlidingPageView.SCREEN_STATE_NEXT = 0
| static

显示的下一个View.

final int com.ab.view.sliding.AbSlidingPageView.SCREEN_STATE_PROVIOUS = 1
| static

显示的前一个View.

String com.ab.view.sliding.AbSlidingPageView.TAG = AbSlidingPageView.class.getSimpleName()
| private

记录日志的标记.

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

- src/com/ab/view/sliding/AbSlidingPageView.java