类 | |
| class | CheckForTap |
| class | FlingRunnable |
| class | LayoutParams |
| interface | OnScrollListener |
| class | PerformClick |
| class | PositionScroller |
| class | RecycleBin |
| interface | RecyclerListener |
| class | WindowRunnnable |
Public 成员函数 | |
| AbMultiColumnBaseAbsListView (Context context) | |
| AbMultiColumnBaseAbsListView (Context context, AttributeSet attrs) | |
| void | setSmoothScrollbarEnabled (boolean enabled) |
| .ExportedProperty boolean | isSmoothScrollbarEnabled () |
| void | setOnScrollListener (OnScrollListener l) |
| .ExportedProperty boolean | isScrollingCacheEnabled () |
| void | setScrollingCacheEnabled (boolean enabled) |
| void | getFocusedRect (Rect r) |
| .ExportedProperty boolean | isStackFromBottom () |
| void | setStackFromBottom (boolean stackFromBottom) |
| void | onRestoreInstanceState (Parcelable state) |
| void | requestLayout () |
| .ExportedProperty View | getSelectedView () |
| int | getListPaddingTop () |
| int | getListPaddingBottom () |
| int | getListPaddingLeft () |
| int | getListPaddingRight () |
| void | setDrawSelectorOnTop (boolean onTop) |
| void | setSelector (int resID) |
| void | setSelector (Drawable sel) |
| Drawable | getSelector () |
| boolean | verifyDrawable (Drawable dr) |
| void | onWindowFocusChanged (boolean hasWindowFocus) |
| boolean | showContextMenuForChild (View originalView) |
| boolean | onKeyDown (int keyCode, KeyEvent event) |
| int | pointToPosition (int x, int y) |
| long | pointToRowId (int x, int y) |
| void | onTouchModeChanged (boolean isInTouchMode) |
| boolean | onTouchEvent (MotionEvent ev) |
| boolean | onInterceptTouchEvent (MotionEvent ev) |
| void | addTouchables (ArrayList< View > views) |
| void | smoothScrollToPosition (int position) |
| void | smoothScrollToPosition (int position, int boundPosition) |
| void | smoothScrollBy (int distance, int duration) |
| void | invalidateViews () |
| void | onGlobalLayout () |
| LayoutParams | generateLayoutParams (AttributeSet attrs) |
| void | setTranscriptMode (int mode) |
| int | getTranscriptMode () |
| int | getSolidColor () |
| void | setCacheColorHint (int color) |
| int | getCacheColorHint () |
| void | reclaimViews (List< View > views) |
| void | setRecyclerListener (RecyclerListener listener) |
静态 Public 属性 | |
| static final int | TRANSCRIPT_MODE_DISABLED = 0 |
| static final int | TRANSCRIPT_MODE_NORMAL = 1 |
| static final int | TRANSCRIPT_MODE_ALWAYS_SCROLL = 2 |
Protected 成员函数 | |
| int | computeVerticalScrollExtent () |
| int | computeVerticalScrollOffset () |
| int | computeVerticalScrollRange () |
| float | getTopFadingEdgeStrength () |
| float | getBottomFadingEdgeStrength () |
| void | onMeasure (int widthMeasureSpec, int heightMeasureSpec) |
| void | onLayout (boolean changed, int l, int t, int r, int b) |
| void | layoutChildren () |
| void | dispatchDraw (Canvas canvas) |
| void | onSizeChanged (int w, int h, int oldw, int oldh) |
| boolean | shouldShowSelector () |
| void | drawableStateChanged () |
| int[] | onCreateDrawableState (int extraSpace) |
| void | onAttachedToWindow () |
| void | onDetachedFromWindow () |
| ContextMenuInfo | getContextMenuInfo () |
| void | dispatchSetPressed (boolean pressed) |
| void | tryOffsetChildrenTopAndBottom (int offset) |
| void | handleDataChanged () |
| void | onLayoutSync (int syncPosition) |
| void | onLayoutSyncFinished (int syncPosition) |
| ViewGroup.LayoutParams | generateLayoutParams (ViewGroup.LayoutParams p) |
| boolean | checkLayoutParams (ViewGroup.LayoutParams p) |
| int | modifyFlingInitialVelocity (int initialVelocity) |
| int | getScrollChildTop () |
| int | getFirstChildTop () |
| int | getFillChildTop () |
| int | getFillChildBottom () |
| int | getScrollChildBottom () |
Protected 属性 | |
| ListAdapter | mAdapter |
| Rect | mListPadding = new Rect() |
| int | mWidthMeasureSpec = 0 |
| boolean | mCachingStarted |
| int | mMotionPosition |
| int | mTouchMode = TOUCH_MODE_REST |
静态 Protected 属性 | |
| static final int | TOUCH_MODE_DOWN = 0 |
| static final int | TOUCH_MODE_TAP = 1 |
| static final int | TOUCH_MODE_DONE_WAITING = 2 |
| static final int | TOUCH_MODE_SCROLL = 3 |
| static final int | TOUCH_MODE_FLING = 4 |
| static final boolean | DEBUG = false |
包函数 | |
| void | invokeOnItemScrollListener () |
| void | requestLayoutIfNecessary () |
| void | resetList () |
| View | obtainView (int position, boolean[] isScrap) |
| void | positionSelector (View sel) |
| boolean | touchModeDrawsInPressedState () |
| ContextMenuInfo | createContextMenuInfo (View view, int position, long id) |
| void | reportScrollStateChange (int newState) |
| boolean | trackMotionScroll (int deltaY, int incrementalDeltaY) |
| int | getHeaderViewsCount () |
| int | getFooterViewsCount () |
| abstract void | fillGap (boolean down) |
| abstract int | findMotionRow (int y) |
| int | findClosestMotionRow (int y) |
静态包函数 | |
| static int | getDistance (Rect source, Rect dest, int direction) |
包属性 | |
| int | mLayoutMode = LAYOUT_NORMAL |
| AdapterDataSetObserver | mDataSetObserver |
| boolean | mDrawSelectorOnTop = false |
| Drawable | mSelector |
| Rect | mSelectorRect = new Rect() |
| final RecycleBin | mRecycler = new RecycleBin() |
| int | mSelectionLeftPadding = 0 |
| int | mSelectionTopPadding = 0 |
| int | mSelectionRightPadding = 0 |
| int | mSelectionBottomPadding = 0 |
| int | mMotionViewOriginalTop |
| int | mMotionViewNewTop |
| int | mMotionX |
| int | mMotionY |
| int | mLastY |
| int | mMotionCorrection |
| int | mSelectedTop = 0 |
| boolean | mStackFromBottom |
| boolean | mScrollingCacheEnabled |
| int | mResurrectToPosition = INVALID_POSITION |
| final boolean[] | mIsScrap = new boolean[1] |
静态包属性 | |
| static final int | TOUCH_MODE_REST = -1 |
| static final int | LAYOUT_NORMAL = 0 |
| static final int | LAYOUT_FORCE_TOP = 1 |
| static final int | LAYOUT_SET_SELECTION = 2 |
| static final int | LAYOUT_FORCE_BOTTOM = 3 |
| static final int | LAYOUT_SPECIFIC = 4 |
| static final int | LAYOUT_SYNC = 5 |
| static final int | LAYOUT_MOVE_SELECTION = 6 |
Private 成员函数 | |
| void | initAbsListView () |
| void | useDefaultSelector () |
| void | positionSelector (int l, int t, int r, int b) |
| void | drawSelector (Canvas canvas) |
| boolean | startScrollIfNeeded (int deltaY) |
| void | onSecondaryPointerUp (MotionEvent ev) |
| void | createScrollingCache () |
| void | clearScrollingCache () |
| void | dispatchFinishTemporaryDetach (View v) |
Private 属性 | |
| VelocityTracker | mVelocityTracker |
| FlingRunnable | mFlingRunnable |
| PositionScroller | mPositionScroller |
| OnScrollListener | mOnScrollListener |
| boolean | mSmoothScrollbarEnabled = true |
| Rect | mTouchFrame |
| ContextMenuInfo | mContextMenuInfo = null |
| int | mLastTouchMode = TOUCH_MODE_UNKNOWN |
| boolean | mScrollProfilingStarted = false |
| boolean | mFlingProfilingStarted = false |
| Runnable | mPendingCheckForTap |
| AbMultiColumnBaseAbsListView.PerformClick | mPerformClick |
| int | mTranscriptMode |
| int | mCacheColorHint |
| boolean | mIsChildViewEnabled |
| int | mLastScrollState = OnScrollListener.SCROLL_STATE_IDLE |
| int | mTouchSlop |
| Runnable | mClearScrollingCache |
| int | mMinimumVelocity |
| int | mMaximumVelocity |
| int | mActivePointerId = INVALID_POINTER |
静态 Private 属性 | |
| static final int | TOUCH_MODE_UNKNOWN = -1 |
| static final int | TOUCH_MODE_ON = 0 |
| static final int | TOUCH_MODE_OFF = 1 |
| static final boolean | PROFILE_SCROLLING = false |
| static final boolean | PROFILE_FLINGING = false |
| static final int | INVALID_POINTER = -1 |
| static final String | TAG = "PLA_AbsListView" |
Base class that can be used to implement virtualized lists of items. A list does not have a spatial definition here. For instance, subclases of this class can display the content of the list in a grid, in a carousel, as stack, etc.
|
inline |
|
inline |
|
inline |
|
inlineprotected |
|
inlineprivate |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlinepackage |
Creates the ContextMenuInfo returned from getContextMenuInfo(). This methods knows the view, position and ID of the item that received the long press.
| view | The view that received the long press. |
| position | The position of the item that received the long press. |
| id | The ID of the item that received the long press. |
|
inlineprivate |
|
inlineprotected |
|
inlineprivate |
|
inlineprotected |
|
inlineprotected |
|
inlineprivate |
|
packagepure virtual |
Fills the gap left open by a touch-scroll. During a touch scroll, children that remain on screen are shifted and the other ones are discarded. The role of this method is to fill the gap thus created by performing a partial layout in the empty space.
| down | true if the scroll is going down, false if it is going up |
|
inlinepackage |
Find the row closest to y. This row will be used as the motion row when scrolling.
| y | Where the user touched |
|
packagepure virtual |
Find the row closest to y. This row will be used as the motion row when scrolling
| y | Where the user touched |
|
inlineprotected |
|
inline |
|
inlineprotected |
|
inline |
When set to a non-zero value, the cache color hint indicates that this list is always drawn on top of a solid, single-color, opaque background
|
inlineprotected |
|
inlinestaticpackage |
What is the distance between the source and destination rectangles given the direction of focus navigation between them? The direction basically helps figure out more quickly what is self evident by the relationship between the rects...
| source | the source rectangle |
| dest | the destination rectangle |
| direction | the direction |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inlinepackage |
Returns the number of footer views in the list. Footer views are special views at the bottom of the list that should not be recycled during a layout.
|
inlinepackage |
Returns the number of header views in the list. Header views are special views at the top of the list that should not be recycled during a layout.
|
inline |
List padding is the maximum of the normal view's padding and the padding of the selector.
|
inline |
List padding is the maximum of the normal view's padding and the padding of the selector.
|
inline |
List padding is the maximum of the normal view's padding and the padding of the selector.
|
inline |
List padding is the maximum of the normal view's padding and the padding of the selector.
|
inlineprotected |
|
inlineprotected |
used in order to determine fill list more or not.
|
inline |
|
inline |
Returns the selector android.graphics.drawable.Drawable that is used to draw the selection in the list.
|
inline |
|
inlineprotected |
|
inline |
Returns the current transcript mode.
|
inlineprotected |
|
inlineprivate |
|
inline |
Causes all the views to be rebuilt and redrawn.
|
inlinepackage |
Notify our scroll listener (if there is one) of a change in scroll state
|
inline |
Indicates whether the children's drawing cache is used during a scroll. By default, the drawing cache is enabled but this will consume more memory.
|
inline |
Returns the current state of the fast scroll feature.
|
inline |
Indicates whether the content of this view is pinned to, or stacked from, the bottom edge.
|
inlineprotected |
Subclasses must override this method to layout their children.
|
inlineprotected |
|
inlinepackage |
Get a view and have it show the data associated with the specified position. This is called when we have already discovered that the view is not available for reuse in the recycle bin. The only choices left are converting an old view or making a new one.
| position | The position to display |
| isScrap | Array of at least 1 boolean, the first entry will become true if the returned view was taken from the scrap heap, false if otherwise. |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
Subclasses should NOT override this method but layoutChildren() instead.
|
inlineprotected |
adapter data is changed.. should keep current view layout information..
| mSyncPosition |
|
inlineprotected |
adapter data is changed.. children layout manipulation is finished.
| mSyncPosition |
|
inlineprotected |
|
inline |
|
inlineprivate |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
inline |
Maps a point to a position in the list.
| x | X in local coordinate |
| y | Y in local coordinate |
|
inline |
Maps a point to a the rowId of the item which intersects that point.
| x | X in local coordinate |
| y | Y in local coordinate |
|
inlinepackage |
|
inlineprivate |
|
inline |
Move all views (excluding headers and footers) held by this AbsListView into the supplied List. This includes views displayed on the screen as well as views stored in AbsListView's internal view recycler.
| views | A list into which to put the reclaimed views |
|
inlinepackage |
Fires an "on scroll state changed" event to the registered android.widget.AbsListView.OnScrollListener, if any. The state change is fired only if the specified state is different from the previously known state.
| newState | The new scroll state. |
|
inline |
|
inlinepackage |
|
inlinepackage |
The list is empty. Clear everything out.
|
inline |
When set to a non-zero value, the cache color hint indicates that this list is always drawn on top of a solid, single-color, opaque background
| color | The background color |
|
inline |
Controls whether the selection highlight drawable should be drawn on top of the item or behind it.
| onTop | If true, the selector will be drawn on the item it is highlighting. The default is false. |
ref android.R.styleable::AbsListView_drawSelectorOnTop
|
inline |
Set the listener that will receive notifications every time the list scrolls.
| l | the scroll listener |
|
inline |
Sets the recycler listener to be notified whenever a View is set aside in the recycler for later reuse. This listener can be used to free resources associated to the View.
| listener | The recycler listener to be notified of views set aside in the recycler. |
|
inline |
Enables or disables the children's drawing cache during a scroll. By default, the drawing cache is enabled but this will use more memory.
When the scrolling cache is enabled, the caches are kept after the first scrolling. You can manually clear the cache by calling android.view.ViewGroup#setChildrenDrawingCacheEnabled(boolean).
| enabled | true to enable the scroll cache, false otherwise |
|
inline |
Set a Drawable that should be used to highlight the currently selected item.
| resID | A Drawable resource to use as the selection highlight. |
ref android.R.styleable::AbsListView_listSelector
|
inline |
|
inline |
When smooth scrollbar is enabled, the position and size of the scrollbar thumb is computed based on the number of visible pixels in the visible items. This however assumes that all list items have the same height. If you use a list in which items have different heights, the scrollbar will change appearance as the user scrolls through the list. To avoid this issue, you need to disable this property.
When smooth scrollbar is disabled, the position and size of the scrollbar thumb is based solely on the number of items in the adapter and the position of the visible items inside the adapter. This provides a stable scrollbar as the user navigates through a list of items with varying heights.
| enabled | Whether or not to enable smooth scrollbar. |
|
inline |
When stack from bottom is set to true, the list fills its content starting from the bottom of the view.
| stackFromBottom | true to pin the view's content to the bottom edge, false to pin the view's content to the top edge |
|
inline |
Puts the list or grid into transcript mode. In this mode the list or grid will always scroll to the bottom to show new items.
| mode | the transcript mode to set |
|
inlineprotected |
Indicates whether this view is in a state where the selector should be drawn. This will happen if we have focus but are not in touch mode, or we are in the middle of displaying the pressed state for an item.
|
inline |
|
inline |
Smoothly scroll by distance pixels over duration milliseconds.
| distance | Distance to scroll in pixels. |
| duration | Duration of the scroll animation in milliseconds. |
|
inline |
Smoothly scroll to the specified adapter position. The view will scroll such that the indicated position is displayed.
| position | Scroll to this adapter position. |
|
inline |
Smoothly scroll to the specified adapter position. The view will scroll such that the indicated position is displayed, but it will stop early if scrolling further would scroll boundPosition out of view.
| position | Scroll to this adapter position. |
| boundPosition | Do not scroll if it would move this adapter position out of view. |
|
inlineprivate |
|
inlinepackage |
|
inlinepackage |
Track a motion scroll
| deltaY | Amount to offset mMotionView. This is the accumulated delta since the motion began. Positive numbers mean the user's finger is moving down the screen. |
| incrementalDeltaY | Change in deltaY from the previous event. |
|
inlineprotected |
|
inlineprivate |
|
inline |
|
staticprotected |
|
staticprivate |
Sentinel value for no current active pointer. Used by mActivePointerId.
|
staticpackage |
Show the last item
|
staticpackage |
Show the first item
|
staticpackage |
Layout as a result of using the navigation keys
|
staticpackage |
Regular layout - usually an unsolicited layout from the view system
|
staticpackage |
Force the selected item to be on somewhere on the screen
|
staticpackage |
Make a mSelectedItem appear in a specific location and build the rest of the views from there. The top is specified by mSpecificTop.
|
staticpackage |
Layout to sync as a result of a data change. Restore mSyncPosition to have its top at mSpecificTop
|
private |
ID of the active pointer. This is used to retain consistency during drags/flings if multiple pointers are used.
|
protected |
The adapter containing the data to be displayed by this view
|
private |
Indicates that this list is always drawn on top of a solid, single-color, opaque background
|
protected |
When the view is scrolling, this flag is set to true to indicate subclasses that the drawing cache was enabled on the children
|
private |
|
private |
|
package |
Should be used by subclasses to listen to changes in the dataset
|
package |
Indicates whether the list selector should be drawn on top of the children or behind
|
private |
|
private |
Handles one frame of a fling
|
private |
The select child's view (from the adapter's getView) is enabled.
|
package |
|
private |
The last scroll state reported to clients through OnScrollListener.
|
private |
|
package |
Y value from on the previous motion event (if any)
|
package |
Controls how the next layout will happen
|
protected |
This view's padding
|
private |
|
private |
|
package |
How far the finger moved before we started scrolling
|
protected |
The position of the view that received the down motion event
|
package |
The desired offset to the top of the mMotionPosition view after a scroll
|
package |
The offset to the top of the mMotionPosition view when the down motion event was received
|
package |
The X value associated with the the down motion event
|
package |
The Y value associated with the the down motion event
|
private |
Optional callback to notify client when scroll position has changed
|
private |
The last CheckForTap runnable we posted, if any
|
private |
Acts upon click
|
private |
Handles scrolling between positions within the list.
|
package |
The data set used to store unused views that should be reused during the next layout to avoid creating new ones
|
package |
The position to resurrect the selected position to.
|
package |
When set to true, the list automatically discards the children's bitmap cache after scrolling.
|
private |
|
package |
The offset in pixels form the top of the AdapterView to the top of the currently selected view. Used to save and restore state.
|
package |
The selection's bottom padding
|
package |
The selection's left padding
|
package |
The selection's right padding
|
package |
The selection's top padding
|
package |
The drawable used to draw the selector
|
package |
Defines the selector's location and dimension at drawing time
|
private |
Indicates whether to use pixels-based or position-based scrollbar properties.
|
package |
Indicates whether the list is stacked from the bottom edge or the top edge.
|
private |
Rectangle used for hit testing children
|
protected |
One of TOUCH_MODE_REST, TOUCH_MODE_DOWN, TOUCH_MODE_TAP, TOUCH_MODE_SCROLL, or TOUCH_MODE_DONE_WAITING
|
private |
|
private |
This view is in transcript mode – it shows the bottom of the list when the data changes
|
private |
Determines speed during touch scrolling
|
protected |
Subclasses must retain their measure spec from onMeasure() into this member
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprotected |
Indicates we have waited for everything we can wait for, but the user's finger is still down
|
staticprotected |
Indicates we just received the touch event and we are waiting to see if the it is a tap or a scroll gesture.
|
staticprotected |
Indicates the view is in the process of being flung
|
staticprivate |
|
staticprivate |
|
staticpackage |
Indicates that we are not in the middle of a touch gesture
|
staticprotected |
Indicates the touch gesture is a scroll
|
staticprotected |
Indicates the touch has been recognized as a tap and we are now waiting to see if the touch is a longpress
|
staticprivate |
Used to request a layout when we changed touch mode
|
static |
The list will automatically scroll to the bottom, no matter what items are currently visible.
|
static |
Disables the transcript mode.
|
static |
The list will automatically scroll to the bottom when a data set change notification is received and only if the last item is already visible on screen.
1.8.4