| AndBase开发框架 1.6

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

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

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

## Public 成员函数
| AbSlidingMenuView (Context context)
| AbSlidingMenuView (Context context, AttributeSet attrs)
boolean | dispatchTouchEvent (MotionEvent ev)
boolean | onInterceptTouchEvent (MotionEvent ev)
boolean | onTouchEvent (MotionEvent event)
void | open ()
void | close ()
void | computeScroll ()
int | getScreenState ()
void | setContentView (View view)

## 静态 Public 属性
static final int | SCREEN_STATE_CLOSE = 0
static final int | SCREEN_STATE_OPEN = 1
static final int | TOUCH_STATE_RESTART = 0
static final int | TOUCH_STATE_SCROLLING = 1
static final int | SCROLL_STATE_NO_ALLOW = 0
static final int | SCROLL_STATE_ALLOW = 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 属性
Scroller | mScroller
VelocityTracker | mVelocityTracker
int | mWidth
int | mScreenState = 0
int | mTouchState = 0
int | mScrollState = 0
int | mVelocityValue = 0
boolean | mOnClick = false

## 详细描述

© 2012 amsoft.cn 名称：AbSlidingMenuView.java 描述：左右简单的侧边栏实现 滑动事件只在一个android:clickable="true"的View上.

作者
  还如一梦中

版本
  v1.0

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

## 构造及析构函数说明

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

构造.

参数

  context | the context

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

构造.

参数

  context | the context
  attrs | the attrs

## 成员函数说明

void com.ab.view.sliding.AbSlidingMenuView.close | ( |  | ) |
| inline

关闭menu.

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

描述：滚动.

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

boolean com.ab.view.sliding.AbSlidingMenuView.dispatchTouchEvent | ( | MotionEvent | ev | ) |
| inline

描述：执行触摸事件.

参数

  ev | the ev

返回
  true, if successful

参见
  android.view.ViewGroup::dispatchTouchEvent(android.view.MotionEvent)

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

获取当前状态.

返回
  the screen state

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

初始化速度检测.

参数

  event | the event

boolean com.ab.view.sliding.AbSlidingMenuView.onInterceptTouchEvent | ( | MotionEvent | ev | ) |
| inline

描述：拦截的触摸事件.

参数

  ev | the ev

返回
  true, if successful

参见
  android.view.ViewGroup::onInterceptTouchEvent(android.view.MotionEvent)

void com.ab.view.sliding.AbSlidingMenuView.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.AbSlidingMenuView.onMeasure | ( | int | widthMeasureSpec,
|  | int | heightMeasureSpec
| ) |  |
| inline protected

描述：测量View的宽高.

参数

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

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

boolean com.ab.view.sliding.AbSlidingMenuView.onTouchEvent | ( | MotionEvent | event | ) |
| inline

描述：触摸事件.

参数

  event | the event

返回
  true, if successful

参见
  android.view.View::onTouchEvent(android.view.MotionEvent)

void com.ab.view.sliding.AbSlidingMenuView.open | ( |  | ) |
| inline

打开menu.

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

释放速度检测.

void com.ab.view.sliding.AbSlidingMenuView.setContentView | ( | View | view | ) |
| inline

设置主View.

参数

  view | the new content view

## 类成员变量说明

boolean com.ab.view.sliding.AbSlidingMenuView.mOnClick = false
| private

The m on click.

int com.ab.view.sliding.AbSlidingMenuView.mScreenState = 0
| private

The m screen state.

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

The m scroller.

int com.ab.view.sliding.AbSlidingMenuView.mScrollState = 0
| private

The m scroll state.

int com.ab.view.sliding.AbSlidingMenuView.mTouchState = 0
| private

The m touch state.

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

The m velocity tracker.

int com.ab.view.sliding.AbSlidingMenuView.mVelocityValue = 0
| private

The m velocity value.

int com.ab.view.sliding.AbSlidingMenuView.mWidth
| private

The m width.

final int com.ab.view.sliding.AbSlidingMenuView.SCREEN_STATE_CLOSE = 0
| static

The Constant SCREEN_STATE_CLOSE.

final int com.ab.view.sliding.AbSlidingMenuView.SCREEN_STATE_OPEN = 1
| static

The Constant SCREEN_STATE_OPEN.

final int com.ab.view.sliding.AbSlidingMenuView.SCROLL_STATE_ALLOW = 1
| static

The Constant SCROLL_STATE_ALLOW.

final int com.ab.view.sliding.AbSlidingMenuView.SCROLL_STATE_NO_ALLOW = 0
| static

The Constant SCROLL_STATE_NO_ALLOW.

final int com.ab.view.sliding.AbSlidingMenuView.TOUCH_STATE_RESTART = 0
| static

The Constant TOUCH_STATE_RESTART.

final int com.ab.view.sliding.AbSlidingMenuView.TOUCH_STATE_SCROLLING = 1
| static

The Constant TOUCH_STATE_SCROLLING.

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

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