| AndBase开发框架 1.6

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

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

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

## 类
class | RecycleBin
class | SavedState

## Public 成员函数
| CarouselSpinner (Context context)
| CarouselSpinner (Context context, AttributeSet attrs)
| CarouselSpinner (Context context, AttributeSet attrs, int defStyle)
SpinnerAdapter | getAdapter ()
void | setAdapter (SpinnerAdapter adapter)
View | getSelectedView ()
void | setSelection (int position, boolean animate)
void | setSelection (int position)
void | requestLayout ()
int | getCount ()
int | pointToPositionView (int x, int y)
int | pointToPositionImage (int x, int y)
Parcelable | onSaveInstanceState ()
void | onRestoreInstanceState (Parcelable state)
Public 成员函数 继承自 com.ab.view.carousel.CarouselAdapter< T extends Adapter >
| CarouselAdapter (Context context)
| CarouselAdapter (Context context, AttributeSet attrs)
| CarouselAdapter (Context context, AttributeSet attrs, int defStyle)
void | setOnItemClickListener (OnItemClickListener listener)
final OnItemClickListener | getOnItemClickListener ()
boolean | performItemClick (View view, int position, long id)
void | setOnItemLongClickListener (OnItemLongClickListener listener)
final OnItemLongClickListener | getOnItemLongClickListener ()
void | setOnItemSelectedListener (OnItemSelectedListener listener)
final OnItemSelectedListener | getOnItemSelectedListener ()
abstract T | getAdapter ()
abstract void | setAdapter (T adapter)
void | addView (View child)
void | addView (View child, int index)
void | addView (View child, LayoutParams params)
void | addView (View child, int index, LayoutParams params)
void | removeView (View child)
void | removeViewAt (int index)
void | removeAllViews ()
.CapturedViewProperty int | getSelectedItemPosition ()
.CapturedViewProperty long | getSelectedItemId ()
abstract View | getSelectedView ()
Object | getSelectedItem ()
.CapturedViewProperty int | getCount ()
int | getPositionForView (View view)
int | getFirstVisiblePosition ()
int | getLastVisiblePosition ()
abstract void | setSelection (int position)
void | setEmptyView (View emptyView)
View | getEmptyView ()
void | setFocusable (boolean focusable)
void | setFocusableInTouchMode (boolean focusable)
Object | getItemAtPosition (int position)
long | getItemIdAtPosition (int position)
void | setOnClickListener (OnClickListener l)
boolean | dispatchPopulateAccessibilityEvent (AccessibilityEvent event)

## Protected 成员函数
void | onMeasure (int widthMeasureSpec, int heightMeasureSpec)
ViewGroup.LayoutParams | generateDefaultLayoutParams ()
Protected 成员函数 继承自 com.ab.view.carousel.CarouselAdapter< T extends Adapter >
void | onLayout (boolean changed, int left, int top, int right, int bottom)
void | dispatchSaveInstanceState (SparseArray< Parcelable > container)
void | dispatchRestoreInstanceState (SparseArray< Parcelable > container)
boolean | canAnimate ()

## 包函数
void | setSelectionInt (int position, boolean animate)
abstract void | layout (int delta, boolean animate)
void | resetList ()
int | getChildHeight (View child)
int | getChildWidth (View child)
void | recycleAllViews ()
包函数 继承自 com.ab.view.carousel.CarouselAdapter< T extends Adapter >
boolean | isInFilterMode ()
void | checkFocus ()
void | selectionChanged ()
void | handleDataChanged ()
void | checkSelectionChanged ()
int | findSyncPosition ()
int | lookForSelectablePosition (int position, boolean lookDown)
void | setSelectedPositionInt (int position)
void | setNextSelectedPositionInt (int position)
void | rememberSyncState ()

## 包属性
SpinnerAdapter | mAdapter
int | mHeightMeasureSpec
int | mWidthMeasureSpec
boolean | mBlockLayoutRequests
int | mSelectionLeftPadding = 0
int | mSelectionTopPadding = 0
int | mSelectionRightPadding = 0
int | mSelectionBottomPadding = 0
final Rect | mSpinnerPadding = new Rect()
final RecycleBin | mRecycler = new RecycleBin()
包属性 继承自 com.ab.view.carousel.CarouselAdapter< T extends Adapter >
.ExportedProperty int | mFirstPosition = 0
int | mSpecificTop
int | mSyncPosition
long | mSyncRowId = INVALID_ROW_ID
long | mSyncHeight
boolean | mNeedSync = false
int | mSyncMode
boolean | mInLayout = false
OnItemSelectedListener | mOnItemSelectedListener
OnItemClickListener | mOnItemClickListener
OnItemLongClickListener | mOnItemLongClickListener
boolean | mDataChanged
.ExportedProperty int | mNextSelectedPosition = INVALID_POSITION
long | mNextSelectedRowId = INVALID_ROW_ID
.ExportedProperty int | mSelectedPosition = INVALID_POSITION
long | mSelectedRowId = INVALID_ROW_ID
.ExportedProperty int | mItemCount
int | mOldItemCount
int | mOldSelectedPosition = INVALID_POSITION
long | mOldSelectedRowId = INVALID_ROW_ID
boolean | mBlockLayoutRequests = false

## Private 成员函数
void | initCarouselSpinner ()

## Private 属性
DataSetObserver | mDataSetObserver

## 额外继承的成员函数
静态 Public 属性 继承自 com.ab.view.carousel.CarouselAdapter< T extends Adapter >
static final int | ITEM_VIEW_TYPE_IGNORE = -1
static final int | ITEM_VIEW_TYPE_HEADER_OR_FOOTER = -2
static final int | INVALID_POSITION = -1
static final long | INVALID_ROW_ID = Long.MIN_VALUE
静态包属性 继承自 com.ab.view.carousel.CarouselAdapter< T extends Adapter >
static final int | SYNC_SELECTED_POSITION = 0
static final int | SYNC_FIRST_POSITION = 1
static final int | SYNC_MAX_DURATION_MILLIS = 100

## 详细描述

The Class CarouselSpinner.

## 构造及析构函数说明

com.ab.view.carousel.CarouselSpinner.CarouselSpinner | ( | Context | context | ) |
| inline

Instantiates a new carousel spinner.

参数

  context | the context

com.ab.view.carousel.CarouselSpinner.CarouselSpinner | ( | Context | context,
|  | AttributeSet | attrs
| ) |  |
| inline

Instantiates a new carousel spinner.

参数

  context | the context
  attrs | the attrs

com.ab.view.carousel.CarouselSpinner.CarouselSpinner | ( | Context | context,
|  | AttributeSet | attrs,
|  | int | defStyle
| ) |  |
| inline

Instantiates a new carousel spinner.

参数

  context | the context
  attrs | the attrs
  defStyle | the def style

## 成员函数说明

ViewGroup.LayoutParams com.ab.view.carousel.CarouselSpinner.generateDefaultLayoutParams | ( |  | ) |
| inline protected

描述：TODO.

版本
  v1.0

返回
  the view group. layout params

参见
  android.view.ViewGroup::generateDefaultLayoutParams()

作者
  : amsoft.cn

日期
  ：2013-11-28 上午11:14:34

SpinnerAdapter com.ab.view.carousel.CarouselSpinner.getAdapter | ( |  | ) |
| inline

描述：TODO.

版本
  v1.0

返回
  the adapter

参见
  com.ab.view.carousel.CarouselAdapter::getAdapter()

作者
  : amsoft.cn

日期
  ：2013-11-28 上午11:14:34

int com.ab.view.carousel.CarouselSpinner.getChildHeight | ( | View | child | ) |
| inline package

Gets the child height.

参数

  child | the child

返回
  the child height

int com.ab.view.carousel.CarouselSpinner.getChildWidth | ( | View | child | ) |
| inline package

Gets the child width.

参数

  child | the child

返回
  the child width

int com.ab.view.carousel.CarouselSpinner.getCount | ( |  | ) |
| inline

描述：TODO.

版本
  v1.0

返回
  the count

参见
  com.ab.view.carousel.CarouselAdapter::getCount()

作者
  : amsoft.cn

日期
  ：2013-11-28 上午11:14:34

View com.ab.view.carousel.CarouselSpinner.getSelectedView | ( |  | ) |
| inline

描述：TODO.

版本
  v1.0

返回
  the selected view

参见
  com.ab.view.carousel.CarouselAdapter::getSelectedView()

作者
  : amsoft.cn

日期
  ：2013-11-28 上午11:14:34

void com.ab.view.carousel.CarouselSpinner.initCarouselSpinner | ( |  | ) |
| inline private

Common code for different constructor flavors.

abstract void com.ab.view.carousel.CarouselSpinner.layout | ( | int | delta,
|  | boolean | animate
| ) |  |
| abstract package

Layout.

参数

  delta | the delta
  animate | the animate

void com.ab.view.carousel.CarouselSpinner.onMeasure | ( | int | widthMeasureSpec,
|  | int | heightMeasureSpec
| ) |  |
| inline protected

On measure.

参数

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

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

Figure out the dimensions of this Spinner. The width comes from the widthMeasureSpec as Spinnners can't have their width set to UNSPECIFIED. The height is based on the height of the selected item plus padding.

void com.ab.view.carousel.CarouselSpinner.onRestoreInstanceState | ( | Parcelable | state | ) |
| inline

描述：TODO.

版本
  v1.0

参数

  state | the state

参见
  android.view.View::onRestoreInstanceState(android.os.Parcelable)

作者
  : amsoft.cn

日期
  ：2013-11-28 上午11:14:34

Parcelable com.ab.view.carousel.CarouselSpinner.onSaveInstanceState | ( |  | ) |
| inline

描述：TODO.

版本
  v1.0

返回
  the parcelable

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

作者
  : amsoft.cn

日期
  ：2013-11-28 上午11:14:34

int com.ab.view.carousel.CarouselSpinner.pointToPositionImage | ( | int | x,
|  | int | y
| ) |  |
| inline

Maps a point to a position in the list.

参数

  x | X in local coordinate
  y | Y in local coordinate

返回
  The position of the item which contains the specified point, or INVALID_POSITION if the point does not intersect an item.

int com.ab.view.carousel.CarouselSpinner.pointToPositionView | ( | int | x,
|  | int | y
| ) |  |
| inline

Maps a point to a position in the list.

参数

  x | X in local coordinate
  y | Y in local coordinate

返回
  The position of the item which contains the specified point, or INVALID_POSITION if the point does not intersect an item.

void com.ab.view.carousel.CarouselSpinner.recycleAllViews | ( |  | ) |
| inline package

Recycle all views.

void com.ab.view.carousel.CarouselSpinner.requestLayout | ( |  | ) |
| inline

Override to prevent spamming ourselves with layout requests as we place views.

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

void com.ab.view.carousel.CarouselSpinner.resetList | ( |  | ) |
| inline package

Clear out all children from the list.

void com.ab.view.carousel.CarouselSpinner.setAdapter | ( | SpinnerAdapter | adapter | ) |
| inline

描述：TODO.

版本
  v1.0

参数

  adapter | the new adapter

参见
  com.ab.view.carousel.CarouselAdapter::setAdapter(android.widget.Adapter)

作者
  : amsoft.cn

日期
  ：2013-11-28 上午11:14:34

void com.ab.view.carousel.CarouselSpinner.setSelection | ( | int | position,
|  | boolean | animate
| ) |  |
| inline

Jump directly to a specific item in the adapter data.

参数

  position | the position
  animate | the animate

void com.ab.view.carousel.CarouselSpinner.setSelection | ( | int | position | ) |
| inline

描述：TODO.

版本
  v1.0

参数

  position | the new selection

参见
  com.ab.view.carousel.CarouselAdapter::setSelection(int)

作者
  : amsoft.cn

日期
  ：2013-11-28 上午11:14:34

void com.ab.view.carousel.CarouselSpinner.setSelectionInt | ( | int | position,
|  | boolean | animate
| ) |  |
| inline package

Makes the item at the supplied position selected.

参数

  position | Position to select
  animate | Should the transition be animated

## 类成员变量说明

SpinnerAdapter com.ab.view.carousel.CarouselSpinner.mAdapter
| package

The m adapter.

boolean com.ab.view.carousel.CarouselSpinner.mBlockLayoutRequests
| package

The m block layout requests.

DataSetObserver com.ab.view.carousel.CarouselSpinner.mDataSetObserver
| private

The m data set observer.

int com.ab.view.carousel.CarouselSpinner.mHeightMeasureSpec
| package

The m height measure spec.

final RecycleBin com.ab.view.carousel.CarouselSpinner.mRecycler = new RecycleBin()
| package

The m recycler.

int com.ab.view.carousel.CarouselSpinner.mSelectionBottomPadding = 0
| package

The m selection bottom padding.

int com.ab.view.carousel.CarouselSpinner.mSelectionLeftPadding = 0
| package

The m selection left padding.

int com.ab.view.carousel.CarouselSpinner.mSelectionRightPadding = 0
| package

The m selection right padding.

int com.ab.view.carousel.CarouselSpinner.mSelectionTopPadding = 0
| package

The m selection top padding.

final Rect com.ab.view.carousel.CarouselSpinner.mSpinnerPadding = new Rect()
| package

The m spinner padding.

int com.ab.view.carousel.CarouselSpinner.mWidthMeasureSpec
| package

The m width measure spec.

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

- src/com/ab/view/carousel/CarouselSpinner.java