| AndBase开发框架 1.5.7

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

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

全部 类 命名空间 文件 函数 变量 枚举值 页
Public 成员函数 | 包函数 | Private 成员函数 | Private 属性 | 所有成员列表
com.ab.view.pullview.AbMultiColumnBaseAbsListView.RecycleBin类 参考

## Public 成员函数
void | setViewTypeCount (int viewTypeCount)
void | markChildrenDirty ()
boolean | shouldRecycleViewType (int viewType)

## 包函数
void | clear ()
void | fillActiveViews (int childCount, int firstActivePosition)
View | getActiveView (int position)
View | getScrapView (int position)
void | addScrapView (View scrap)
void | scrapActiveViews ()
void | reclaimScrapViews (List< View > views)
void | setCacheColorHint (int color)

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

## Private 属性
RecyclerListener | mRecyclerListener
int | mFirstActivePosition
View[] | mActiveViews = new View[0]
ArrayList< View >[] | mScrapViews
int | mViewTypeCount
ArrayList< View > | mCurrentScrap

## 详细描述

The RecycleBin facilitates reuse of views across layouts. The RecycleBin has two levels of storage: ActiveViews and ScrapViews. ActiveViews are those views which were onscreen at the start of a layout. By construction, they are displaying current information. At the end of layout, all views in ActiveViews are demoted to ScrapViews. ScrapViews are old views that could potentially be used by the adapter to avoid allocating views unnecessarily.

参见
  android.widget.AbsListView::setRecyclerListener(android.widget.AbsListView.RecyclerListener)
  android.widget.AbsListView.RecyclerListener

## 成员函数说明

void com.ab.view.pullview.AbMultiColumnBaseAbsListView.RecycleBin.addScrapView | ( | View | scrap) |  |
| inline package

Put a view into the ScapViews list. These views are unordered.

参数

  scrap | The view to add

void com.ab.view.pullview.AbMultiColumnBaseAbsListView.RecycleBin.clear | ( | ) |  |
| inline package

Clears the scrap heap.

void com.ab.view.pullview.AbMultiColumnBaseAbsListView.RecycleBin.fillActiveViews | ( | int | childCount,
|  | int | firstActivePosition
| ) |  |
| inline package

Fill ActiveViews with all of the children of the AbsListView.

参数

  childCount | The minimum number of views mActiveViews should hold
  firstActivePosition | The position of the first view that will be stored in mActiveViews

View com.ab.view.pullview.AbMultiColumnBaseAbsListView.RecycleBin.getActiveView | ( | int | position) |  |
| inline package

Get the view corresponding to the specified position. The view will be removed from mActiveViews if it is found.

参数

  position | The position to look up in mActiveViews

返回
  The view if it is found, null otherwise

View com.ab.view.pullview.AbMultiColumnBaseAbsListView.RecycleBin.getScrapView | ( | int | position) |  |
| inline package

返回
  A view from the ScrapViews collection. These are unordered.

void com.ab.view.pullview.AbMultiColumnBaseAbsListView.RecycleBin.markChildrenDirty | ( | ) |  |
| inline

void com.ab.view.pullview.AbMultiColumnBaseAbsListView.RecycleBin.pruneScrapViews | ( | ) |  |
| inline private

Makes sure that the size of mScrapViews does not exceed the size of mActiveViews. (This can happen if an adapter does not recycle its views).

void com.ab.view.pullview.AbMultiColumnBaseAbsListView.RecycleBin.reclaimScrapViews | ( | List< View > | views) |  |
| inline package

Puts all views in the scrap heap into the supplied list.

void com.ab.view.pullview.AbMultiColumnBaseAbsListView.RecycleBin.scrapActiveViews | ( | ) |  |
| inline package

Move all views remaining in mActiveViews to mScrapViews.

void com.ab.view.pullview.AbMultiColumnBaseAbsListView.RecycleBin.setCacheColorHint | ( | int | color) |  |
| inline package

Updates the cache color hint of all known views.

参数

  color | The new cache color hint.

void com.ab.view.pullview.AbMultiColumnBaseAbsListView.RecycleBin.setViewTypeCount | ( | int | viewTypeCount) |  |
| inline

boolean com.ab.view.pullview.AbMultiColumnBaseAbsListView.RecycleBin.shouldRecycleViewType | ( | int | viewType) |  |
| inline

## 类成员变量说明

View [] com.ab.view.pullview.AbMultiColumnBaseAbsListView.RecycleBin.mActiveViews = new View[0]
| private

Views that were on screen at the start of layout. This array is populated at the start of layout, and at the end of layout all view in mActiveViews are moved to mScrapViews. Views in mActiveViews represent a contiguous range of Views, with position of the first view store in mFirstActivePosition.

ArrayList<View> com.ab.view.pullview.AbMultiColumnBaseAbsListView.RecycleBin.mCurrentScrap
| private

int com.ab.view.pullview.AbMultiColumnBaseAbsListView.RecycleBin.mFirstActivePosition
| private

The position of the first view stored in mActiveViews.

RecyclerListener com.ab.view.pullview.AbMultiColumnBaseAbsListView.RecycleBin.mRecyclerListener
| private

ArrayList<View> [] com.ab.view.pullview.AbMultiColumnBaseAbsListView.RecycleBin.mScrapViews
| private

Unsorted views that can be used by the adapter as a convert view.

int com.ab.view.pullview.AbMultiColumnBaseAbsListView.RecycleBin.mViewTypeCount
| private

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

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