| AndBase开发框架 1.6

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

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

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

## 类
interface | CanvasTransformer
interface | OnClosedListener
interface | OnCloseListener
interface | OnOpenedListener
interface | OnOpenListener

## Public 成员函数
| SlidingMenu (Context context)
| SlidingMenu (Activity activity, int slideStyle)
| SlidingMenu (Context context, AttributeSet attrs)
| SlidingMenu (Context context, AttributeSet attrs, int defStyle)
void | attachToActivity (Activity activity, int slideStyle)
void | attachToActivity (Activity activity, int slideStyle, boolean actionbarOverlay)
void | setContent (int res)
void | setContent (View view)
View | getContent ()
void | setMenu (int res)
void | setMenu (View v)
View | getMenu ()
void | setSecondaryMenu (int res)
void | setSecondaryMenu (View v)
View | getSecondaryMenu ()
void | setSlidingEnabled (boolean b)
boolean | isSlidingEnabled ()
void | setMode (int mode)
int | getMode ()
void | setStatic (boolean b)
void | showMenu ()
void | showMenu (boolean animate)
void | showSecondaryMenu ()
void | showSecondaryMenu (boolean animate)
void | showContent ()
void | showContent (boolean animate)
void | toggle ()
void | toggle (boolean animate)
boolean | isMenuShowing ()
boolean | isSecondaryMenuShowing ()
int | getBehindOffset ()
void | setBehindOffset (int i)
void | setBehindOffsetRes (int resID)
void | setAboveOffset (int i)
void | setAboveOffsetRes (int resID)

## 静态 Public 属性
static final int | SLIDING_WINDOW = 0
static final int | SLIDING_CONTENT = 1
static final int | TOUCHMODE_MARGIN = 0
static final int | TOUCHMODE_FULLSCREEN = 1
static final int | TOUCHMODE_NONE = 2
static final int | LEFT = 0
static final int | RIGHT = 1
static final int | LEFT_RIGHT = 2

## Private 属性
boolean | mActionbarOverlay = false
CustomViewAbove | mViewAbove
CustomViewBehind | mViewBehind
OnOpenListener | mOpenListener
OnOpenListener | mSecondaryOpenListner
OnCloseListener | mCloseListener

## 静态 Private 属性
static final String | TAG = "SlidingMenu"

## 详细描述

The Class SlidingMenu.

## 构造及析构函数说明

com.ab.view.slidingmenu.SlidingMenu.SlidingMenu | ( | Context | context | ) |
| inline

Instantiates a new SlidingMenu.

参数

  context | the associated Context

com.ab.view.slidingmenu.SlidingMenu.SlidingMenu | ( | Activity | activity,
|  | int | slideStyle
| ) |  |
| inline

Instantiates a new SlidingMenu and attach to Activity.

参数

  activity | the activity to attach slidingmenu
  slideStyle | the slidingmenu style

com.ab.view.slidingmenu.SlidingMenu.SlidingMenu | ( | Context | context,
|  | AttributeSet | attrs
| ) |  |
| inline

Instantiates a new SlidingMenu.

参数

  context | the associated Context
  attrs | the attrs

com.ab.view.slidingmenu.SlidingMenu.SlidingMenu | ( | Context | context,
|  | AttributeSet | attrs,
|  | int | defStyle
| ) |  |
| inline

Instantiates a new SlidingMenu.

参数

  context | the associated Context
  attrs | the attrs
  defStyle | the def style

## 成员函数说明

void com.ab.view.slidingmenu.SlidingMenu.attachToActivity | ( | Activity | activity,
|  | int | slideStyle
| ) |  |
| inline

Attaches the SlidingMenu to an entire Activity.

参数

  activity | the Activity
  slideStyle | either SLIDING_CONTENT or SLIDING_WINDOW

void com.ab.view.slidingmenu.SlidingMenu.attachToActivity | ( | Activity | activity,
|  | int | slideStyle,
|  | boolean | actionbarOverlay
| ) |  |
| inline

Attaches the SlidingMenu to an entire Activity.

参数

  activity | the Activity
  slideStyle | either SLIDING_CONTENT or SLIDING_WINDOW
  actionbarOverlay | whether or not the ActionBar is overlaid

int com.ab.view.slidingmenu.SlidingMenu.getBehindOffset | ( |  | ) |
| inline

Gets the behind offset.

返回
  The margin on the right of the screen that the behind view scrolls to

View com.ab.view.slidingmenu.SlidingMenu.getContent | ( |  | ) |
| inline

Retrieves the current content.

返回
  the current content

View com.ab.view.slidingmenu.SlidingMenu.getMenu | ( |  | ) |
| inline

Retrieves the main menu.

返回
  the main menu

int com.ab.view.slidingmenu.SlidingMenu.getMode | ( |  | ) |
| inline

Returns the current side that the SlidingMenu is on.

返回
  the current mode, either SlidingMenu.LEFT or SlidingMenu.RIGHT

View com.ab.view.slidingmenu.SlidingMenu.getSecondaryMenu | ( |  | ) |
| inline

Retrieves the current secondary menu (right).

返回
  the current menu

boolean com.ab.view.slidingmenu.SlidingMenu.isMenuShowing | ( |  | ) |
| inline

Checks if is the behind view showing.

返回
  Whether or not the behind view is showing

boolean com.ab.view.slidingmenu.SlidingMenu.isSecondaryMenuShowing | ( |  | ) |
| inline

Checks if is the behind view showing.

返回
  Whether or not the behind view is showing

boolean com.ab.view.slidingmenu.SlidingMenu.isSlidingEnabled | ( |  | ) |
| inline

Checks if is sliding enabled.

返回
  true, if is sliding enabled

void com.ab.view.slidingmenu.SlidingMenu.setAboveOffset | ( | int | i | ) |
| inline

Sets the above offset.

参数

  i | the new above offset, in pixels

void com.ab.view.slidingmenu.SlidingMenu.setAboveOffsetRes | ( | int | resID | ) |
| inline

Sets the above offset.

参数

  resID | The dimension resource id to be set as the above offset.

void com.ab.view.slidingmenu.SlidingMenu.setBehindOffset | ( | int | i | ) |
| inline

Sets the behind offset.

参数

  i | The margin, in pixels, on the right of the screen that the behind view scrolls to.

void com.ab.view.slidingmenu.SlidingMenu.setBehindOffsetRes | ( | int | resID | ) |
| inline

Sets the behind offset.

参数

  resID | The dimension resource id to be set as the behind offset. The menu, when open, will leave this width margin on the right of the screen.

void com.ab.view.slidingmenu.SlidingMenu.setContent | ( | int | res | ) |
| inline

Set the above view content from a layout resource. The resource will be inflated, adding all top-level views to the above view.

参数

  res | the new content

void com.ab.view.slidingmenu.SlidingMenu.setContent | ( | View | view | ) |
| inline

Set the above view content to the given View.

参数

  view | The desired content to display.

void com.ab.view.slidingmenu.SlidingMenu.setMenu | ( | int | res | ) |
| inline

Set the behind view (menu) content from a layout resource. The resource will be inflated, adding all top-level views to the behind view.

参数

  res | the new content

void com.ab.view.slidingmenu.SlidingMenu.setMenu | ( | View | v | ) |
| inline

Set the behind view (menu) content to the given View.

参数

  v | the new menu

void com.ab.view.slidingmenu.SlidingMenu.setMode | ( | int | mode | ) |
| inline

Sets which side the SlidingMenu should appear on.

参数

  mode | must be either SlidingMenu.LEFT or SlidingMenu.RIGHT

void com.ab.view.slidingmenu.SlidingMenu.setSecondaryMenu | ( | int | res | ) |
| inline

Set the secondary behind view (right menu) content from a layout resource. The resource will be inflated, adding all top-level views to the behind view.

参数

  res | the new content

void com.ab.view.slidingmenu.SlidingMenu.setSecondaryMenu | ( | View | v | ) |
| inline

Set the secondary behind view (right menu) content to the given View.

参数

  v | the new secondary menu

void com.ab.view.slidingmenu.SlidingMenu.setSlidingEnabled | ( | boolean | b | ) |
| inline

Sets the sliding enabled.

参数

  b | true to enable sliding, false to disable it.

void com.ab.view.slidingmenu.SlidingMenu.setStatic | ( | boolean | b | ) |
| inline

Sets whether or not the SlidingMenu is in static mode (i.e. nothing is moving and everything is showing)

参数

  b | true to set static mode, false to disable static mode.

void com.ab.view.slidingmenu.SlidingMenu.showContent | ( |  | ) |
| inline

Closes the menu and shows the above view.

void com.ab.view.slidingmenu.SlidingMenu.showContent | ( | boolean | animate | ) |
| inline

Closes the menu and shows the above view.

参数

  animate | true to animate the transition, false to ignore animation

void com.ab.view.slidingmenu.SlidingMenu.showMenu | ( |  | ) |
| inline

Opens the menu and shows the menu view.

void com.ab.view.slidingmenu.SlidingMenu.showMenu | ( | boolean | animate | ) |
| inline

Opens the menu and shows the menu view.

参数

  animate | true to animate the transition, false to ignore animation

void com.ab.view.slidingmenu.SlidingMenu.showSecondaryMenu | ( |  | ) |
| inline

Opens the menu and shows the secondary menu view. Will default to the regular menu if there is only one.

void com.ab.view.slidingmenu.SlidingMenu.showSecondaryMenu | ( | boolean | animate | ) |
| inline

Opens the menu and shows the secondary (right) menu view. Will default to the regular menu if there is only one.

参数

  animate | true to animate the transition, false to ignore animation

void com.ab.view.slidingmenu.SlidingMenu.toggle | ( |  | ) |
| inline

Toggle the SlidingMenu. If it is open, it will be closed, and vice versa.

void com.ab.view.slidingmenu.SlidingMenu.toggle | ( | boolean | animate | ) |
| inline

Toggle the SlidingMenu. If it is open, it will be closed, and vice versa.

参数

  animate | true to animate the transition, false to ignore animation

## 类成员变量说明

final int com.ab.view.slidingmenu.SlidingMenu.LEFT = 0
| static

Constant value for use with setMode(). Puts the menu to the left of the content.

final int com.ab.view.slidingmenu.SlidingMenu.LEFT_RIGHT = 2
| static

Constant value for use with setMode(). Puts menus to the left and right of the content.

boolean com.ab.view.slidingmenu.SlidingMenu.mActionbarOverlay = false
| private

The m actionbar overlay.

OnCloseListener com.ab.view.slidingmenu.SlidingMenu.mCloseListener
| private

The m close listener.

OnOpenListener com.ab.view.slidingmenu.SlidingMenu.mOpenListener
| private

The m open listener.

OnOpenListener com.ab.view.slidingmenu.SlidingMenu.mSecondaryOpenListner
| private

The m secondary open listner.

CustomViewAbove com.ab.view.slidingmenu.SlidingMenu.mViewAbove
| private

The m view above.

CustomViewBehind com.ab.view.slidingmenu.SlidingMenu.mViewBehind
| private

The m view behind.

final int com.ab.view.slidingmenu.SlidingMenu.RIGHT = 1
| static

Constant value for use with setMode(). Puts the menu to the right of the content.

final int com.ab.view.slidingmenu.SlidingMenu.SLIDING_CONTENT = 1
| static

The Constant SLIDING_CONTENT.

final int com.ab.view.slidingmenu.SlidingMenu.SLIDING_WINDOW = 0
| static

The Constant SLIDING_WINDOW.

final String com.ab.view.slidingmenu.SlidingMenu.TAG = "SlidingMenu"
| static private

The Constant TAG.

final int com.ab.view.slidingmenu.SlidingMenu.TOUCHMODE_FULLSCREEN = 1
| static

Constant value for use with setTouchModeAbove(). Allows the SlidingMenu to be opened with a swipe gesture anywhere on the screen

final int com.ab.view.slidingmenu.SlidingMenu.TOUCHMODE_MARGIN = 0
| static

Constant value for use with setTouchModeAbove(). Allows the SlidingMenu to be opened with a swipe gesture on the screen's margin

final int com.ab.view.slidingmenu.SlidingMenu.TOUCHMODE_NONE = 2
| static

Constant value for use with setTouchModeAbove(). Denies the SlidingMenu to be opened with a swipe gesture

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

- src/com/ab/view/slidingmenu/SlidingMenu.java