|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkankan.wheel.widget.WheelRecycle
public class WheelRecycle
Recycle stores wheel items to reuse.
| Field Summary | |
|---|---|
private java.util.List<View> |
emptyItems
|
private java.util.List<View> |
items
|
private WheelView |
wheel
|
| Constructor Summary | |
|---|---|
WheelRecycle(WheelView wheel)
Constructor |
|
| Method Summary | |
|---|---|
private java.util.List<View> |
addView(View view,
java.util.List<View> cache)
Adds view to specified cache. |
void |
clearAll()
Clears all views |
private View |
getCachedView(java.util.List<View> cache)
Gets view from specified cache. |
View |
getEmptyItem()
Gets empty item view |
View |
getItem()
Gets item view |
int |
recycleItems(LinearLayout layout,
int firstItem,
ItemsRange range)
Recycles items from specified layout. |
private void |
recycleView(View view,
int index)
Adds view to cache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.util.List<View> items
private java.util.List<View> emptyItems
private WheelView wheel
| Constructor Detail |
|---|
public WheelRecycle(WheelView wheel)
wheel - the wheel view| Method Detail |
|---|
public int recycleItems(LinearLayout layout,
int firstItem,
ItemsRange range)
layout - the layout containing items to be cachedfirstItem - the number of first item in layoutrange - the range of current wheel items
public View getItem()
public View getEmptyItem()
public void clearAll()
private java.util.List<View> addView(View view,
java.util.List<View> cache)
view - the view to be cachedcache - the cache list
private void recycleView(View view,
int index)
view - the view to be cachedindex - the index of viewprivate View getCachedView(java.util.List<View> cache)
cache - the cache
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||