/**@class android.widget.AbsListView implements android.text.TextWatcher implements android.view.ViewTreeObserver.OnGlobalLayoutListener implements android.widget.Filter.FilterListener implements android.view.ViewTreeObserver.OnTouchModeChangeListener implements android.widget.RemoteViewsAdapter.RemoteAdapterConnectionCallback @extends android.widget.AdapterView Base class that can be used to implement virtualized lists of items. A list does not have a spatial definition here. For instance, subclasses of this class can display the content of the list in a grid, in a carousel, as stack, etc. @attr ref android.R.styleable#AbsListView_listSelector @attr ref android.R.styleable#AbsListView_drawSelectorOnTop @attr ref android.R.styleable#AbsListView_stackFromBottom @attr ref android.R.styleable#AbsListView_scrollingCache @attr ref android.R.styleable#AbsListView_textFilterEnabled @attr ref android.R.styleable#AbsListView_transcriptMode @attr ref android.R.styleable#AbsListView_cacheColorHint @attr ref android.R.styleable#AbsListView_fastScrollEnabled @attr ref android.R.styleable#AbsListView_smoothScrollbar @attr ref android.R.styleable#AbsListView_choiceMode */ var AbsListView = { /** Disables the transcript mode. @see #setTranscriptMode(int) */ TRANSCRIPT_MODE_DISABLED : "0", /** 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. @see #setTranscriptMode(int) */ TRANSCRIPT_MODE_NORMAL : "1", /** The list will automatically scroll to the bottom, no matter what items are currently visible. @see #setTranscriptMode(int) */ TRANSCRIPT_MODE_ALWAYS_SCROLL : "2", /** Normal list that does not indicate choices */ CHOICE_MODE_NONE : "0", /** The list allows up to one choice */ CHOICE_MODE_SINGLE : "1", /** The list allows multiple choices */ CHOICE_MODE_MULTIPLE : "2", /** The list allows multiple choices in a modal selection mode */ CHOICE_MODE_MULTIPLE_MODAL : "3", /**{@inheritDoc} */ setAdapter : function( ) {}, /**Returns the number of items currently selected. This will only be valid if the choice mode is not {@link #CHOICE_MODE_NONE} (default). <p>To determine the specific items that are currently selected, use one of the <code>getChecked*</code> methods. @return {Number} The number of items currently selected @see #getCheckedItemPosition() @see #getCheckedItemPositions() @see #getCheckedItemIds() */ getCheckedItemCount : function( ) {}, /**Returns the checked state of the specified position. The result is only valid if the choice mode has been set to {@link #CHOICE_MODE_SINGLE} or {@link #CHOICE_MODE_MULTIPLE}. @param {Number} position The item whose checked state to return @return {Boolean} The item's checked state or <code>false</code> if choice mode is invalid @see #setChoiceMode(int) */ isItemChecked : function( ) {}, /**Returns the currently checked item. The result is only valid if the choice mode has been set to {@link #CHOICE_MODE_SINGLE}. @return {Number} The position of the currently checked item or {@link #INVALID_POSITION} if nothing is selected @see #setChoiceMode(int) */ getCheckedItemPosition : function( ) {}, /**Returns the set of checked items in the list. The result is only valid if the choice mode has not been set to {@link #CHOICE_MODE_NONE}. @return {Object {android.util.SparseBooleanArray}} A SparseBooleanArray which will return true for each call to get(int position) where position is a checked position in the list and false otherwise, or <code>null</code> if the choice mode is set to {@link #CHOICE_MODE_NONE}. */ getCheckedItemPositions : function( ) {}, /**Returns the set of checked items ids. The result is only valid if the choice mode has not been set to {@link #CHOICE_MODE_NONE} and the adapter has stable IDs. ({@link android.widget.ListAdapter#hasStableIds()} == {@code true}) @return {Number} A new array which contains the id of each checked item in the list. */ getCheckedItemIds : function( ) {}, /**Clear any choices previously set */ clearChoices : function( ) {}, /**Sets the checked state of the specified position. The is only valid if the choice mode has been set to {@link #CHOICE_MODE_SINGLE} or {@link #CHOICE_MODE_MULTIPLE}. @param {Number} position The item whose checked state is to be checked @param {Boolean} value The new checked state for the item */ setItemChecked : function( ) {}, /** */ performItemClick : function( ) {}, /** @see #setChoiceMode(int) @return {Number} The current choice mode */ getChoiceMode : function( ) {}, /**Defines the choice behavior for the List. By default, Lists do not have any choice behavior ({@link #CHOICE_MODE_NONE}). By setting the choiceMode to {@link #CHOICE_MODE_SINGLE}, the List allows up to one item to be in a chosen state. By setting the choiceMode to {@link #CHOICE_MODE_MULTIPLE}, the list allows any number of items to be chosen. @param {Number} choiceMode One of {@link #CHOICE_MODE_NONE}, {@link #CHOICE_MODE_SINGLE}, or {@link #CHOICE_MODE_MULTIPLE} */ setChoiceMode : function( ) {}, /**Set a {@link android.widget.AbsListView.MultiChoiceModeListener} that will manage the lifecycle of the selection {@link ActionMode}. Only used when the choice mode is set to {@link #CHOICE_MODE_MULTIPLE_MODAL}. @param {Object {AbsListView.MultiChoiceModeListener}} listener Listener that will manage the selection mode @see #setChoiceMode(int) */ setMultiChoiceModeListener : function( ) {}, /**Specifies whether fast scrolling is enabled or disabled. <p> When fast scrolling is enabled, the user can quickly scroll through lists by dragging the fast scroll thumb. <p> If the adapter backing this list implements {@link android.widget.SectionIndexer}, the fast scroller will display section header previews as the user scrolls. Additionally, the user will be able to quickly jump between sections by tapping along the length of the scroll bar. @param {Boolean} enabled true to enable fast scrolling, false otherwise @see #isFastScrollEnabled() @param enabled true to enable fast scrolling, false otherwise */ setFastScrollEnabled : function( ) {}, /**Specifies the style of the fast scroller decorations. @param {Number} styleResId style resource containing fast scroller properties @see android.R.styleable#FastScroll */ setFastScrollStyle : function( ) {}, /**Set whether or not the fast scroller should always be shown in place of the standard scroll bars. This will enable fast scrolling if it is not already enabled. <p> Fast scrollers shown in this way will not fade out and will be a permanent fixture within the list. This is best combined with an inset scroll bar style to ensure the scroll bar does not overlap content. @param {Boolean} alwaysShow true if the fast scroller should always be displayed, false otherwise @see #setScrollBarStyle(int) @see #setFastScrollEnabled(boolean) */ setFastScrollAlwaysVisible : function( ) {}, /**Returns true if the fast scroller is set to always show on this view. @return {Boolean} true if the fast scroller will always show @see #setFastScrollAlwaysVisible(boolean) */ isFastScrollAlwaysVisible : function( ) {}, /** */ getVerticalScrollbarWidth : function( ) {}, /**Returns true if the fast scroller is enabled. @see #setFastScrollEnabled(boolean) @return {Boolean} true if fast scroll is enabled, false otherwise */ isFastScrollEnabled : function( ) {}, /** */ setVerticalScrollbarPosition : function( ) {}, /** */ setScrollBarStyle : function( ) {}, /**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. @param {Boolean} enabled Whether or not to enable smooth scrollbar. @see #setSmoothScrollbarEnabled(boolean) @attr ref android.R.styleable#AbsListView_smoothScrollbar */ setSmoothScrollbarEnabled : function( ) {}, /**Returns the current state of the fast scroll feature. @return {Boolean} True if smooth scrollbar is enabled is enabled, false otherwise. @see #setSmoothScrollbarEnabled(boolean) */ isSmoothScrollbarEnabled : function( ) {}, /**Set the listener that will receive notifications every time the list scrolls. @param {Object {AbsListView.OnScrollListener}} l the scroll listener */ setOnScrollListener : function( ) {}, /** @hide */ sendAccessibilityEventUnchecked : function( ) {}, /** */ getAccessibilityClassName : function( ) {}, /** @hide */ onInitializeAccessibilityNodeInfoInternal : function( ) {}, /** @hide */ performAccessibilityActionInternal : function( ) {}, /**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. @return {Boolean} true if the scrolling cache is enabled, false otherwise @see #setScrollingCacheEnabled(boolean) @see View#setDrawingCacheEnabled(boolean) */ isScrollingCacheEnabled : function( ) {}, /**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 {@link android.view.ViewGroup#setChildrenDrawingCacheEnabled(boolean)}. @param {Boolean} enabled true to enable the scroll cache, false otherwise @see #isScrollingCacheEnabled() @see View#setDrawingCacheEnabled(boolean) */ setScrollingCacheEnabled : function( ) {}, /**Enables or disables the type filter window. If enabled, typing when this view has focus will filter the children to match the users input. Note that the {@link android.widget.Adapter} used by this view must implement the {@link android.widget.Filterable} interface. @param {Boolean} textFilterEnabled true to enable type filtering, false otherwise @see Filterable */ setTextFilterEnabled : function( ) {}, /**Indicates whether type filtering is enabled for this view @return {Boolean} true if type filtering is enabled, false otherwise @see #setTextFilterEnabled(boolean) @see Filterable */ isTextFilterEnabled : function( ) {}, /** */ getFocusedRect : function( ) {}, /**Indicates whether the content of this view is pinned to, or stacked from, the bottom edge. @return {Boolean} true if the content is stacked from the bottom edge, false otherwise */ isStackFromBottom : function( ) {}, /**When stack from bottom is set to true, the list fills its content starting from the bottom of the view. @param {Boolean} stackFromBottom true to pin the view's content to the bottom edge, false to pin the view's content to the top edge */ setStackFromBottom : function( ) {}, /** */ onSaveInstanceState : function( ) {}, /** */ onRestoreInstanceState : function( ) {}, /**Sets the initial value for the text filter. @param {String} filterText The text to use for the filter. @see #setTextFilterEnabled */ setFilterText : function( ) {}, /**Returns the list's text filter, if available. @return {Object {java.lang.CharSequence}} the list's text filter or null if filtering isn't enabled */ getTextFilter : function( ) {}, /** */ requestLayout : function( ) {}, /** */ getSelectedView : function( ) {}, /**List padding is the maximum of the normal view's padding and the padding of the selector. @see android.view.View#getPaddingTop() @see #getSelector() @return {Number} The top list padding. */ getListPaddingTop : function( ) {}, /**List padding is the maximum of the normal view's padding and the padding of the selector. @see android.view.View#getPaddingBottom() @see #getSelector() @return {Number} The bottom list padding. */ getListPaddingBottom : function( ) {}, /**List padding is the maximum of the normal view's padding and the padding of the selector. @see android.view.View#getPaddingLeft() @see #getSelector() @return {Number} The left list padding. */ getListPaddingLeft : function( ) {}, /**List padding is the maximum of the normal view's padding and the padding of the selector. @see android.view.View#getPaddingRight() @see #getSelector() @return {Number} The right list padding. */ getListPaddingRight : function( ) {}, /**Initializes an {@link AccessibilityNodeInfo} with information about a particular item in the list. @param {Object {View}} view View representing the list item. @param {Number} position Position of the list item within the adapter. @param {Object {AccessibilityNodeInfo}} info Node info to populate. */ onInitializeAccessibilityNodeInfoForItem : function( ) {}, /** @hide */ shouldDrawSelector : function( ) {}, /**Controls whether the selection highlight drawable should be drawn on top of the item or behind it. @param {Boolean} onTop If true, the selector will be drawn on the item it is highlighting. The default is false. @attr ref android.R.styleable#AbsListView_drawSelectorOnTop */ setDrawSelectorOnTop : function( ) {}, /**Returns whether the selection highlight drawable should be drawn on top of the item or behind it. @return {Boolean} true if selector is drawn on top, false otherwise @attr ref android.R.styleable#AbsListView_drawSelectorOnTop */ isDrawSelectorOnTop : function( ) {}, /**Set a Drawable that should be used to highlight the currently selected item. @param {Number} resID A Drawable resource to use as the selection highlight. @attr ref android.R.styleable#AbsListView_listSelector */ setSelector : function( ) {}, /** */ setSelector : function( ) {}, /**Returns the selector {@link android.graphics.drawable.Drawable} that is used to draw the selection in the list. @return {Object {android.graphics.drawable.Drawable}} the drawable used to display the selector */ getSelector : function( ) {}, /** */ setScrollIndicators : function( ) {}, /** */ verifyDrawable : function( ) {}, /** */ jumpDrawablesToCurrentState : function( ) {}, /** */ onWindowFocusChanged : function( ) {}, /** */ onRtlPropertiesChanged : function( ) {}, /** */ onCancelPendingInputEvents : function( ) {}, /** */ showContextMenu : function( ) {}, /** */ showContextMenu : function( ) {}, /** */ showContextMenuForChild : function( ) {}, /** */ showContextMenuForChild : function( ) {}, /** */ onKeyDown : function( ) {}, /** */ onKeyUp : function( ) {}, /** */ dispatchDrawableHotspotChanged : function( ) {}, /**Maps a point to a position in the list. @param {Number} x X in local coordinate @param {Number} y Y in local coordinate @return {Number} The position of the item which contains the specified point, or {@link #INVALID_POSITION} if the point does not intersect an item. */ pointToPosition : function( ) {}, /**Maps a point to a the rowId of the item which intersects that point. @param {Number} x X in local coordinate @param {Number} y Y in local coordinate @return {Number} The rowId of the item which contains the specified point, or {@link #INVALID_ROW_ID} if the point does not intersect an item. */ pointToRowId : function( ) {}, /** */ onTouchModeChanged : function( ) {}, /** */ onTouchEvent : function( ) {}, /** */ onGenericMotionEvent : function( ) {}, /**Initiate a fling with the given velocity. <p>Applications can use this method to manually initiate a fling as if the user initiated it via touch interaction.</p> @param {Number} velocityY Vertical velocity in pixels per second. Note that this is velocity of content, not velocity of a touch that initiated the fling. */ fling : function( ) {}, /** */ onStartNestedScroll : function( ) {}, /** */ onNestedScrollAccepted : function( ) {}, /** */ onNestedScroll : function( ) {}, /** */ onNestedFling : function( ) {}, /** */ draw : function( ) {}, /** */ requestDisallowInterceptTouchEvent : function( ) {}, /** */ onInterceptHoverEvent : function( ) {}, /** */ onResolvePointerIcon : function( ) {}, /** */ onInterceptTouchEvent : function( ) {}, /**{@inheritDoc} */ addTouchables : function( ) {}, /**The amount of friction applied to flings. The default value is {@link ViewConfiguration#getScrollFriction}. */ setFriction : function( ) {}, /**Sets a scale factor for the fling velocity. The initial scale factor is 1.0. @param {Number} scale The scale factor to multiply the velocity by. */ setVelocityScale : function( ) {}, /**Smoothly scroll to the specified adapter position. The view will scroll such that the indicated position is displayed. @param {Number} position Scroll to this adapter position. */ smoothScrollToPosition : function( ) {}, /**Smoothly scroll to the specified adapter position. The view will scroll such that the indicated position is displayed <code>offset</code> pixels below the top edge of the view. If this is impossible, (e.g. the offset would scroll the first or last item beyond the boundaries of the list) it will get as close as possible. The scroll will take <code>duration</code> milliseconds to complete. @param {Number} position Position to scroll to @param {Number} offset Desired distance in pixels of <code>position</code> from the top of the view when scrolling is finished @param {Number} duration Number of milliseconds to use for the scroll */ smoothScrollToPositionFromTop : function( ) {}, /**Smoothly scroll to the specified adapter position. The view will scroll such that the indicated position is displayed <code>offset</code> pixels below the top edge of the view. If this is impossible, (e.g. the offset would scroll the first or last item beyond the boundaries of the list) it will get as close as possible. @param {Number} position Position to scroll to @param {Number} offset Desired distance in pixels of <code>position</code> from the top of the view when scrolling is finished */ smoothScrollToPositionFromTop : function( ) {}, /**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. @param {Number} position Scroll to this adapter position. @param {Number} boundPosition Do not scroll if it would move this adapter position out of view. */ smoothScrollToPosition : function( ) {}, /**Smoothly scroll by distance pixels over duration milliseconds. @param {Number} distance Distance to scroll in pixels. @param {Number} duration Duration of the scroll animation in milliseconds. */ smoothScrollBy : function( ) {}, /**Scrolls the list items within the view by a specified number of pixels. <p>The actual amount of scroll is capped by the list content viewport height which is the list height minus top and bottom paddings minus one pixel.</p> @param {Number} y the amount of pixels to scroll by vertically @see #canScrollList(int) */ scrollListBy : function( ) {}, /**Check if the items in the list can be scrolled in a certain direction. @param {Number} direction Negative to check scrolling up, positive to check scrolling down. @return {Boolean} true if the list can be scrolled in the specified direction, false otherwise. @see #scrollListBy(int) */ canScrollList : function( ) {}, /**Causes all the views to be rebuilt and redrawn. */ invalidateViews : function( ) {}, /**Return an InputConnection for editing of the filter text. */ onCreateInputConnection : function( ) {}, /**For filtering we proxy an input connection to an internal text editor, and this allows the proxying to happen. */ checkInputConnectionProxy : function( ) {}, /**Clear the text filter. */ clearTextFilter : function( ) {}, /**Returns if the ListView currently has a text filter. */ hasTextFilter : function( ) {}, /** */ onGlobalLayout : function( ) {}, /**For our text watcher that is associated with the text filter. Does nothing. */ beforeTextChanged : function( ) {}, /**For our text watcher that is associated with the text filter. Performs the actual filtering as the text changes, and takes care of hiding and showing the popup displaying the currently entered filter text. */ onTextChanged : function( ) {}, /**For our text watcher that is associated with the text filter. Does nothing. */ afterTextChanged : function( ) {}, /** */ onFilterComplete : function( ) {}, /** */ generateLayoutParams : function( ) {}, /**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. @param {Number} mode the transcript mode to set @see #TRANSCRIPT_MODE_DISABLED @see #TRANSCRIPT_MODE_NORMAL @see #TRANSCRIPT_MODE_ALWAYS_SCROLL */ setTranscriptMode : function( ) {}, /**Returns the current transcript mode. @return {Number} {@link #TRANSCRIPT_MODE_DISABLED}, {@link #TRANSCRIPT_MODE_NORMAL} or {@link #TRANSCRIPT_MODE_ALWAYS_SCROLL} */ getTranscriptMode : function( ) {}, /** */ getSolidColor : function( ) {}, /**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. Zero means that what's behind this object is translucent (non solid) or is not made of a single color. This hint will not affect any existing background drawable set on this view ( typically set via {@link #setBackgroundDrawable}(Drawable)). @param {Number} color The background color */ setCacheColorHint : function( ) {}, /**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 @return {Number} The cache color hint */ getCacheColorHint : function( ) {}, /**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. @param {Object {java.util.List}} views A list into which to put the reclaimed views */ reclaimViews : function( ) {}, /**Sets up this AbsListView to use a remote views adapter which connects to a RemoteViewsService through the specified intent. @param {Object {Intent}} intent the intent used to identify the RemoteViewsService for the adapter to connect to. */ setRemoteViewsAdapter : function( ) {}, /** @hide */ setRemoteViewsAdapterAsync : function( ) {}, /** @hide */ setRemoteViewsAdapter : function( ) {}, /**Sets up the onClickHandler to be used by the RemoteViewsAdapter when inflating RemoteViews @param {Object {RemoteViews.OnClickHandler}} handler The OnClickHandler to use when inflating RemoteViews. @hide */ setRemoteViewsOnClickHandler : function( ) {}, /**This defers a notifyDataSetChanged on the pending RemoteViewsAdapter if it has not connected yet. */ deferNotifyDataSetChanged : function( ) {}, /**Called back when the adapter connects to the RemoteViewsService. */ onRemoteAdapterConnected : function( ) {}, /**Called back when the adapter disconnects from the RemoteViewsService. */ onRemoteAdapterDisconnected : function( ) {}, /**Sets the edge effect color for both top and bottom edge effects. @param {Number} color The color for the edge effects. @see #setTopEdgeEffectColor(int) @see #setBottomEdgeEffectColor(int) @see #getTopEdgeEffectColor() @see #getBottomEdgeEffectColor() */ setEdgeEffectColor : function( ) {}, /**Sets the bottom edge effect color. @param {Number} color The color for the bottom edge effect. @see #setTopEdgeEffectColor(int) @see #setEdgeEffectColor(int) @see #getTopEdgeEffectColor() @see #getBottomEdgeEffectColor() */ setBottomEdgeEffectColor : function( ) {}, /**Sets the top edge effect color. @param {Number} color The color for the top edge effect. @see #setBottomEdgeEffectColor(int) @see #setEdgeEffectColor(int) @see #getTopEdgeEffectColor() @see #getBottomEdgeEffectColor() */ setTopEdgeEffectColor : function( ) {}, /**Returns the top edge effect color. @return {Number} The top edge effect color. @see #setEdgeEffectColor(int) @see #setTopEdgeEffectColor(int) @see #setBottomEdgeEffectColor(int) @see #getBottomEdgeEffectColor() */ getTopEdgeEffectColor : function( ) {}, /**Returns the bottom edge effect color. @return {Number} The bottom edge effect color. @see #setEdgeEffectColor(int) @see #setTopEdgeEffectColor(int) @see #setBottomEdgeEffectColor(int) @see #getTopEdgeEffectColor() */ getBottomEdgeEffectColor : function( ) {}, /**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. @param {Object {AbsListView.RecyclerListener}} listener The recycler listener to be notified of views set aside in the recycler. @see android.widget.AbsListView.RecyclerListener */ setRecyclerListener : function( ) {}, /**Sets the selected item and positions the selection y pixels from the top edge of the ListView. (If in touch mode, the item will not be selected but it will still be positioned appropriately.) @param {Number} position Index (starting at 0) of the data item to be selected. @param {Number} y The distance from the top edge of the ListView (plus padding) that the item will be positioned. */ setSelectionFromTop : function( ) {}, };