类 | |
| class | AdapterContextMenuInfo |
| class | AdapterDataSetObserver |
| interface | OnItemClickListener |
| interface | OnItemLongClickListener |
| interface | OnItemSelectedListener |
| class | SelectionNotifier |
Public 成员函数 | |
| 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) |
静态 Public 属性 | |
| 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 |
Protected 成员函数 | |
| void | onLayout (boolean changed, int left, int top, int right, int bottom) |
| void | dispatchSaveInstanceState (SparseArray< Parcelable > container) |
| void | dispatchRestoreInstanceState (SparseArray< Parcelable > container) |
| boolean | canAnimate () |
包函数 | |
| 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 () |
包属性 | |
| .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 |
静态包属性 | |
| static final int | SYNC_SELECTED_POSITION = 0 |
| static final int | SYNC_FIRST_POSITION = 1 |
| static final int | SYNC_MAX_DURATION_MILLIS = 100 |
Private 成员函数 | |
| void | updateEmptyStatus (boolean empty) |
| void | fireOnSelected () |
Private 属性 | |
| int | mLayoutHeight |
| View | mEmptyView |
| boolean | mDesiredFocusableState |
| boolean | mDesiredFocusableInTouchModeState |
| SelectionNotifier | mSelectionNotifier |
The Class CarouselAdapter.
| <T> | the generic type |
|
inline |
Instantiates a new carousel adapter.
| context | the context |
|
inline |
Instantiates a new carousel adapter.
| context | the context |
| attrs | the attrs |
|
inline |
Instantiates a new carousel adapter.
| context | the context |
| attrs | the attrs |
| defStyle | the def style |
|
inline |
This method is not supported and throws an UnsupportedOperationException when called.
| child | Ignored. |
|
inline |
This method is not supported and throws an UnsupportedOperationException when called.
| child | Ignored. |
| index | Ignored. |
|
inline |
This method is not supported and throws an UnsupportedOperationException when called.
| child | Ignored. |
| params | Ignored. |
|
inline |
This method is not supported and throws an UnsupportedOperationException when called.
| child | Ignored. |
| index | Ignored. |
| params | Ignored. |
|
inlineprotected |
描述:TODO.
|
inlinepackage |
Check focus.
|
inlinepackage |
Check selection changed.
|
inline |
描述:TODO.
| event | the event |
|
inlineprotected |
Override to prevent thawing of any views created by the adapter.
| container | the container |
|
inlineprotected |
Override to prevent freezing of any views created by the adapter.
| container | the container |
|
inlinepackage |
Searches the adapter for a position matching mSyncRowId. The search starts at mSyncPosition and then alternates between moving up and moving down until 1) we find the right position, or 2) we run out of time, or 3) we have looked at every position
|
inlineprivate |
Fire on selected.
|
abstract |
Returns the adapter currently associated with this widget.
|
inline |
Gets the count.
|
inline |
When the current adapter is empty, the CarouselAdapter can display a special view call the empty view. The empty view is used to provide feedback to the user that no data is available in this CarouselAdapter.
|
inline |
Returns the position within the adapter's data set for the first item displayed on screen.
|
inline |
Gets the data associated with the specified position in the list.
| position | Which data to get |
|
inline |
Gets the item id at position.
| position | the position |
|
inline |
Returns the position within the adapter's data set for the last item displayed on screen.
|
inline |
Gets the on item click listener.
|
inline |
Gets the on item long click listener.
|
inline |
Gets the on item selected listener.
|
inline |
Get the position within the adapter's data set for the view, where view is a an adapter item or a descendant of an adapter item.
| view | an adapter item, or a descendant of an adapter item. This must be visible in this CarouselAdapter at the time of the call. |
|
inline |
Gets the selected item.
|
inline |
Gets the selected item id.
|
inline |
Return the position of the currently selected item within the adapter's data set.
|
abstract |
Gets the selected view.
|
inlinepackage |
Handle data changed.
|
inlinepackage |
Indicates whether this view is in filter mode. Filter mode can for instance be enabled by a user when typing on the keyboard.
|
inlinepackage |
Find a position that can be selected (i.e., is not a separator).
| position | The starting position to look at. |
| lookDown | Whether to look down for other positions. |
|
inlineprotected |
描述:TODO.
| changed | the changed |
| left | the left |
| top | the top |
| right | the right |
| bottom | the bottom |
|
inline |
Call the OnItemClickListener, if it is defined.
| view | The view within the CarouselAdapter that was clicked. |
| position | The position of the view in the adapter. |
| id | The row id of the item that was clicked. |
|
inlinepackage |
Remember enough information to restore the screen state when the data has changed.
|
inline |
This method is not supported and throws an UnsupportedOperationException when called.
|
inline |
This method is not supported and throws an UnsupportedOperationException when called.
| child | Ignored. |
|
inline |
This method is not supported and throws an UnsupportedOperationException when called.
| index | Ignored. |
|
inlinepackage |
Selection changed.
|
abstract |
Sets the adapter that provides the data and the views to represent the data in this widget.
| adapter | The adapter to use to create this view's content. |
|
inline |
Sets the view to show if the adapter is empty.
| emptyView | the new empty view |
|
inline |
描述:TODO.
| focusable | the new focusable |
|
inline |
描述:TODO.
| focusable | the new focusable in touch mode |
|
inlinepackage |
Utility to keep mNextSelectedPosition and mNextSelectedRowId in sync.
| position | Intended value for mSelectedPosition the next time we go through layout |
|
inline |
描述:TODO.
| l | the new on click listener |
|
inline |
Register a callback to be invoked when an item in this CarouselAdapter has been clicked.
| listener | The callback that will be invoked. |
|
inline |
Register a callback to be invoked when an item in this CarouselAdapter has been clicked and held.
| listener | The callback that will run |
|
inline |
Register a callback to be invoked when an item in this CarouselAdapter has been selected.
| listener | The callback that will run |
|
inlinepackage |
Utility to keep mSelectedPosition and mSelectedRowId in sync.
| position | Our current position |
|
abstract |
Sets the currently selected item. To support accessibility subclasses that override this method must invoke the overriden super method first.
| position | Index (starting at 0) of the data item to be selected. |
|
inlineprivate |
Update the status of the list based on the empty parameter. If empty is true and we have an empty view, display it. In all the other cases, make sure that the listview is VISIBLE and that the empty view is GONE (if it's not null).
| empty | the empty |
|
static |
Represents an invalid position. All valid positions are in the range 0 to 1 less than the number of items in the current adapter.
|
static |
Represents an empty or invalid row id.
|
static |
The item view type returned by Adapter#getItemViewType(int) when the item is a header or footer.
|
static |
The item view type returned by Adapter#getItemViewType(int) when the adapter does not want the item's view recycled.
|
package |
When set to true, calls to requestLayout() will not propagate up the parent hierarchy. This is used to layout the children during a layout pass.
|
package |
True if the data has changed since the last layout.
|
private |
The m desired focusable in touch mode state.
|
private |
Indicates what focusable state is requested when calling setFocusable(). In addition to this, this view has other criteria for actually determining the focusable state (such as whether its empty or the text filter is shown).
|
private |
View to show if there are no items to show.
|
package |
The position of the first child displayed.
|
package |
Indicates that this view is currently being laid out.
|
package |
The number of items in the current adapter.
|
private |
Our height after the last layout.
|
package |
True if we need to sync to mSyncRowId.
|
package |
The position within the adapter's data set of the item to select during the next layout.
|
package |
The item id of the item to select during the next layout.
|
package |
The number of items in the adapter before a data changed event occured.
|
package |
The last selected position we used when notifying.
|
package |
The id of the last selected position we used when notifying.
|
package |
The listener that receives notifications when an item is clicked.
|
package |
The listener that receives notifications when an item is long clicked.
|
package |
The listener that receives notifications when an item is selected.
|
package |
The position within the adapter's data set of the currently selected item.
|
package |
The item id of the currently selected item.
|
private |
The m selection notifier.
|
package |
The offset in pixels from the top of the CarouselAdapter to the top of the view to select during the next layout.
|
package |
Height of the view when mSyncPosition and mSyncRowId where set.
|
package |
Indicates whether to sync based on the selection or position. Possible values are SYNC_SELECTED_POSITION or SYNC_FIRST_POSITION.
|
package |
Position from which to start looking for mSyncRowId.
|
package |
Row id to look for when data has changed.
|
staticpackage |
Sync based on the first child displayed.
|
staticpackage |
Maximum amount of time to spend in findSyncPosition().
|
staticpackage |
Sync based on the selected child.
1.8.8