public abstract class AdapterView<T extends android.widget.Adapter>
extends android.view.ViewGroup
Adapter.| Modifier and Type | Class and Description |
|---|---|
static class |
AdapterView.AdapterContextMenuInfo
Extra menu information provided to the
android.view.View.OnCreateContextMenuListener#onCreateContextMenu(ContextMenu, View, ContextMenuInfo) callback when a
context menu is brought up for this AdapterView. |
static interface |
AdapterView.OnItemClickListener
Interface definition for a callback to be invoked when an item in this AdapterView has been clicked.
|
static interface |
AdapterView.OnItemLongClickListener
Interface definition for a callback to be invoked when an item in this view has been clicked and held.
|
static interface |
AdapterView.OnItemSelectedListener
Interface definition for a callback to be invoked when an item in this view has been selected.
|
android.view.ViewGroup.LayoutParams, android.view.ViewGroup.MarginLayoutParams, android.view.ViewGroup.OnHierarchyChangeListenerandroid.view.View.AccessibilityDelegate, android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, android.view.View.OnAttachStateChangeListener, android.view.View.OnClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnDragListener, android.view.View.OnFocusChangeListener, android.view.View.OnGenericMotionListener, android.view.View.OnHoverListener, android.view.View.OnKeyListener, android.view.View.OnLayoutChangeListener, android.view.View.OnLongClickListener, android.view.View.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListener| Modifier and Type | Field and Description |
|---|---|
static long |
INVALID_COL_ID
Represents an empty or invalid col id
|
static int |
INVALID_POSITION
Represents an invalid position.
|
static int |
ITEM_VIEW_TYPE_HEADER_OR_FOOTER
The item view type returned by
Adapter.getItemViewType(int) when the item is a header or footer. |
static int |
ITEM_VIEW_TYPE_IGNORE
The item view type returned by
Adapter.getItemViewType(int) when the adapter does not want the item's view recycled. |
static boolean |
LOG_ENABLED |
static java.lang.String |
LOG_TAG |
protected boolean |
mBlockLayoutRequests
When set to true, calls to requestLayout() will not propagate up the parent hierarchy.
|
boolean |
mDataChanged
True if the data has changed since the last layout
|
protected int |
mFirstPosition
The position of the first child displayed
|
protected boolean |
mInLayout
Indicates that this view is currently being laid out.
|
protected int |
mItemCount
The number of items in the current adapter.
|
protected boolean |
mNeedSync
True if we need to sync to mSyncColId
|
protected long |
mNextSelectedColId
The item id of the item to select during the next layout.
|
protected int |
mNextSelectedPosition
The position within the adapter's data set of the item to select during the next layout.
|
protected int |
mOldItemCount
The number of items in the adapter before a data changed event occurred.
|
protected long |
mOldSelectedColId
The id of the last selected position we used when notifying
|
protected int |
mOldSelectedPosition
The last selected position we used when notifying
|
protected long |
mSelectedColId
The item id of the currently selected item.
|
protected int |
mSelectedPosition
The position within the adapter's data set of the currently selected item.
|
protected int |
mSpecificLeft
The offset in pixels from the left of the AdapterView to the left of the view to select during the next layout.
|
protected long |
mSyncColId
Col id to look for when data has changed
|
protected int |
mSyncPosition
Position from which to start looking for mSyncRowId
|
protected long |
mSyncWidth
Width of the view when mSyncPosition and mSyncColId where set
|
CLIP_TO_PADDING_MASK, FOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS, LAYOUT_MODE_CLIP_BOUNDS, LAYOUT_MODE_OPTICAL_BOUNDS, PERSISTENT_ALL_CACHES, PERSISTENT_ANIMATION_CACHE, PERSISTENT_NO_CACHE, PERSISTENT_SCROLLING_CACHEACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, EMPTY_STATE_SET, ENABLED_FOCUSED_SELECTED_STATE_SET, ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_FOCUSED_STATE_SET, ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, ENABLED_SELECTED_STATE_SET, ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_STATE_SET, ENABLED_WINDOW_FOCUSED_STATE_SET, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, FOCUSED_SELECTED_STATE_SET, FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, FOCUSED_STATE_SET, FOCUSED_WINDOW_FOCUSED_STATE_SET, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET, PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_SELECTED_STATE_SET, PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_STATE_SET, PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_SELECTED_STATE_SET, PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_STATE_SET, PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_SELECTED_STATE_SET, PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_STATE_SET, PRESSED_WINDOW_FOCUSED_STATE_SET, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SELECTED_STATE_SET, SELECTED_WINDOW_FOCUSED_STATE_SET, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y| Constructor and Description |
|---|
AdapterView(android.content.Context context) |
AdapterView(android.content.Context context,
android.util.AttributeSet attrs) |
AdapterView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyle) |
| Modifier and Type | Method and Description |
|---|---|
void |
addView(android.view.View child)
This method is not supported and throws an UnsupportedOperationException when called.
|
void |
addView(android.view.View child,
int index)
This method is not supported and throws an UnsupportedOperationException when called.
|
void |
addView(android.view.View child,
int index,
android.view.ViewGroup.LayoutParams params)
This method is not supported and throws an UnsupportedOperationException when called.
|
void |
addView(android.view.View child,
android.view.ViewGroup.LayoutParams params)
This method is not supported and throws an UnsupportedOperationException when called.
|
protected boolean |
canAnimate() |
protected void |
checkFocus() |
protected void |
checkSelectionChanged() |
boolean |
dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent event) |
protected void |
dispatchRestoreInstanceState(android.util.SparseArray<android.os.Parcelable> container)
Override to prevent thawing of any views created by the adapter.
|
protected void |
dispatchSaveInstanceState(android.util.SparseArray<android.os.Parcelable> container)
Override to prevent freezing of any views created by the adapter.
|
abstract T |
getAdapter()
Returns the adapter currently associated with this widget.
|
int |
getCount() |
android.view.View |
getEmptyView()
When the current adapter is empty, the AdapterView can display a special view call the empty view.
|
int |
getFirstVisiblePosition()
Returns the position within the adapter's data set for the first item displayed on screen.
|
java.lang.Object |
getItemAtPosition(int position)
Gets the data associated with the specified position in the list.
|
long |
getItemIdAtPosition(int position) |
int |
getLastVisiblePosition()
Returns the position within the adapter's data set for the last item displayed on screen.
|
AdapterView.OnItemClickListener |
getOnItemClickListener() |
AdapterView.OnItemLongClickListener |
getOnItemLongClickListener() |
AdapterView.OnItemSelectedListener |
getOnItemSelectedListener() |
int |
getPositionForView(android.view.View view)
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.
|
java.lang.Object |
getSelectedItem() |
long |
getSelectedItemId() |
int |
getSelectedItemPosition()
Return the position of the currently selected item within the adapter's data set
|
abstract android.view.View |
getSelectedView() |
protected int |
lookForSelectablePosition(int position,
boolean lookDown)
Find a position that can be selected (i.e., is not a separator).
|
protected void |
onDetachedFromWindow() |
void |
onInitializeAccessibilityEvent(android.view.accessibility.AccessibilityEvent event) |
void |
onInitializeAccessibilityNodeInfo(android.view.accessibility.AccessibilityNodeInfo info) |
protected void |
onLayout(boolean changed,
int left,
int top,
int right,
int bottom) |
boolean |
onRequestSendAccessibilityEvent(android.view.View child,
android.view.accessibility.AccessibilityEvent event) |
boolean |
performItemClick(android.view.View view,
int position,
long id)
Call the OnItemClickListener, if it is defined.
|
void |
rememberSyncState()
Remember enough information to restore the screen state when the data has changed.
|
void |
removeAllViews()
This method is not supported and throws an UnsupportedOperationException when called.
|
void |
removeView(android.view.View child)
This method is not supported and throws an UnsupportedOperationException when called.
|
void |
removeViewAt(int index)
This method is not supported and throws an UnsupportedOperationException when called.
|
abstract void |
setAdapter(T adapter)
Sets the adapter that provides the data and the views to represent the data in this widget.
|
void |
setEmptyView(android.view.View emptyView)
Sets the view to show if the adapter is empty
|
void |
setFocusable(boolean focusable) |
void |
setFocusableInTouchMode(boolean focusable) |
protected void |
setNextSelectedPositionInt(int position)
Utility to keep mNextSelectedPosition and mNextSelectedColId in sync
|
void |
setOnClickListener(android.view.View.OnClickListener l) |
void |
setOnItemClickListener(AdapterView.OnItemClickListener listener)
Register a callback to be invoked when an item in this AdapterView has been clicked.
|
void |
setOnItemLongClickListener(AdapterView.OnItemLongClickListener listener)
Register a callback to be invoked when an item in this AdapterView has been clicked and held
|
void |
setOnItemSelectedListener(AdapterView.OnItemSelectedListener listener)
Register a callback to be invoked when an item in this AdapterView has been selected.
|
protected void |
setSelectedPositionInt(int position)
Utility to keep mSelectedPosition and mSelectedColId in sync
|
abstract void |
setSelection(int position)
Sets the currently selected item.
|
addChildrenForAccessibility, addFocusables, addStatesFromChildren, addTouchables, addView, addViewInLayout, addViewInLayout, attachLayoutAnimationParameters, attachViewToParent, bringChildToFront, checkLayoutParams, childDrawableStateChanged, childHasTransientStateChanged, cleanupLayoutState, clearChildFocus, clearDisappearingChildren, clearFocus, debug, detachAllViewsFromParent, detachViewFromParent, detachViewFromParent, detachViewsFromParent, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchFreezeSelfOnly, dispatchGenericFocusedEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchSystemUiVisibilityChanged, dispatchThawSelfOnly, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, drawableStateChanged, drawChild, endViewTransition, findFocus, findViewsWithText, fitSystemWindows, focusableViewAvailable, focusSearch, gatherTransparentRegion, generateDefaultLayoutParams, generateLayoutParams, generateLayoutParams, getChildAt, getChildCount, getChildDrawingOrder, getChildMeasureSpec, getChildStaticTransformation, getChildVisibleRect, getClipChildren, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getOverlay, getPersistentDrawingCache, hasFocus, hasFocusable, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isChildrenDrawingOrderEnabled, isChildrenDrawnWithCacheEnabled, isMotionEventSplittingEnabled, jumpDrawablesToCurrentState, layout, measureChild, measureChildren, measureChildWithMargins, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onAnimationEnd, onAnimationStart, onAttachedToWindow, onCreateDrawableState, onInterceptHoverEvent, onInterceptTouchEvent, onRequestFocusInDescendants, recomputeViewAttributes, removeAllViewsInLayout, removeDetachedView, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setChildrenDrawingCacheEnabled, setChildrenDrawingOrderEnabled, setChildrenDrawnWithCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setStaticTransformationsEnabled, shouldDelayChildPressedState, showContextMenuForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, updateViewLayoutaddFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, animate, announceForAccessibility, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, draw, findViewById, findViewWithTag, focusSearch, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBaseline, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getCameraDistance, getClipBounds, getContentDescription, getContext, getContextMenuInfo, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getResources, getRight, getRightFadingEdgeStrength, getRightPaddingOffset, getRootView, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchables, getTouchDelegate, getTranslationX, getTranslationY, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, hasOnClickListeners, hasOverlappingRendering, hasWindowFocus, inflate, initializeFadingEdge, initializeScrollbars, invalidate, invalidate, invalidate, invalidateDrawable, isActivated, isAttachedToWindow, isClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isInEditMode, isInLayout, isInTouchMode, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isOpaque, isPaddingOffsetRequired, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onCancelPendingInputEvents, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateInputConnection, onDisplayHint, onDragEvent, onDraw, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onMeasure, onOverScrolled, onPopulateAccessibilityEvent, onRestoreInstanceState, onRtlPropertiesChanged, onSaveInstanceState, onScreenStateChanged, onScrollChanged, onSetAlpha, onSizeChanged, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onVisibilityChanged, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestFitSystemWindows, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setActivated, setAlpha, setAnimation, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBottom, setCameraDistance, setClickable, setClipBounds, setContentDescription, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPressed, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTop, setTouchDelegate, setTranslationX, setTranslationY, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, showContextMenu, startActionMode, startAnimation, startDrag, toString, unscheduleDrawable, unscheduleDrawable, verifyDrawable, willNotCacheDrawing, willNotDrawclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcanResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, createContextMenu, getLayoutDirection, getParent, getParentForAccessibility, getTextAlignment, getTextDirection, isLayoutDirectionResolved, isLayoutRequested, isTextAlignmentResolved, isTextDirectionResolved, requestFitSystemWindows, requestLayoutpublic static final java.lang.String LOG_TAG
public static final boolean LOG_ENABLED
public static final int ITEM_VIEW_TYPE_IGNORE
Adapter.getItemViewType(int) when the adapter does not want the item's view recycled.public static final int ITEM_VIEW_TYPE_HEADER_OR_FOOTER
Adapter.getItemViewType(int) when the item is a header or footer.protected int mFirstPosition
protected int mSpecificLeft
protected int mSyncPosition
protected long mSyncColId
protected long mSyncWidth
protected boolean mNeedSync
protected boolean mInLayout
public boolean mDataChanged
protected int mNextSelectedPosition
protected long mNextSelectedColId
protected int mSelectedPosition
protected long mSelectedColId
protected int mItemCount
protected int mOldItemCount
public static final int INVALID_POSITION
public static final long INVALID_COL_ID
protected int mOldSelectedPosition
protected long mOldSelectedColId
protected boolean mBlockLayoutRequests
public AdapterView(android.content.Context context)
public AdapterView(android.content.Context context,
android.util.AttributeSet attrs)
public AdapterView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyle)
public void setOnItemClickListener(AdapterView.OnItemClickListener listener)
listener - The callback that will be invoked.public final AdapterView.OnItemClickListener getOnItemClickListener()
public boolean performItemClick(android.view.View view,
int position,
long id)
view - The view within the AdapterView that was clicked.position - The position of the view in the adapter.id - The col id of the item that was clicked.public void setOnItemLongClickListener(AdapterView.OnItemLongClickListener listener)
listener - The callback that will runpublic final AdapterView.OnItemLongClickListener getOnItemLongClickListener()
public void setOnItemSelectedListener(AdapterView.OnItemSelectedListener listener)
listener - The callback that will runpublic final AdapterView.OnItemSelectedListener getOnItemSelectedListener()
public abstract T getAdapter()
public abstract void setAdapter(T adapter)
adapter - The adapter to use to create this view's content.public void addView(android.view.View child)
addView in class android.view.ViewGroupchild - Ignored.java.lang.UnsupportedOperationException - Every time this method is invoked.public void addView(android.view.View child,
int index)
addView in class android.view.ViewGroupchild - Ignored.index - Ignored.java.lang.UnsupportedOperationException - Every time this method is invoked.public void addView(android.view.View child,
android.view.ViewGroup.LayoutParams params)
addView in interface android.view.ViewManageraddView in class android.view.ViewGroupchild - Ignored.params - Ignored.java.lang.UnsupportedOperationException - Every time this method is invoked.public void addView(android.view.View child,
int index,
android.view.ViewGroup.LayoutParams params)
addView in class android.view.ViewGroupchild - Ignored.index - Ignored.params - Ignored.java.lang.UnsupportedOperationException - Every time this method is invoked.public void removeView(android.view.View child)
removeView in interface android.view.ViewManagerremoveView in class android.view.ViewGroupchild - Ignored.java.lang.UnsupportedOperationException - Every time this method is invoked.public void removeViewAt(int index)
removeViewAt in class android.view.ViewGroupindex - Ignored.java.lang.UnsupportedOperationException - Every time this method is invoked.public void removeAllViews()
removeAllViews in class android.view.ViewGroupjava.lang.UnsupportedOperationException - Every time this method is invoked.protected void onLayout(boolean changed,
int left,
int top,
int right,
int bottom)
onLayout in class android.view.ViewGrouppublic int getSelectedItemPosition()
INVALID_POSITION if there is nothing selected.public long getSelectedItemId()
public abstract android.view.View getSelectedView()
public java.lang.Object getSelectedItem()
public int getCount()
public int getPositionForView(android.view.View view)
view - an adapter item, or a descendant of an adapter item. This must be visible in this AdapterView at the time of the
call.INVALID_POSITION if the view does not correspond
to a list item (or it is not currently visible).public int getFirstVisiblePosition()
public int getLastVisiblePosition()
public abstract void setSelection(int position)
position - Index (starting at 0) of the data item to be selected.public void setEmptyView(android.view.View emptyView)
public android.view.View getEmptyView()
public void setFocusable(boolean focusable)
setFocusable in class android.view.Viewpublic void setFocusableInTouchMode(boolean focusable)
setFocusableInTouchMode in class android.view.Viewprotected void checkFocus()
public java.lang.Object getItemAtPosition(int position)
position - Which data to getpublic long getItemIdAtPosition(int position)
public void setOnClickListener(android.view.View.OnClickListener l)
setOnClickListener in class android.view.Viewprotected void dispatchSaveInstanceState(android.util.SparseArray<android.os.Parcelable> container)
dispatchSaveInstanceState in class android.view.ViewGroupprotected void dispatchRestoreInstanceState(android.util.SparseArray<android.os.Parcelable> container)
dispatchRestoreInstanceState in class android.view.ViewGroupprotected void onDetachedFromWindow()
onDetachedFromWindow in class android.view.ViewGrouppublic boolean dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent event)
dispatchPopulateAccessibilityEvent in class android.view.Viewpublic boolean onRequestSendAccessibilityEvent(android.view.View child,
android.view.accessibility.AccessibilityEvent event)
onRequestSendAccessibilityEvent in class android.view.ViewGrouppublic void onInitializeAccessibilityNodeInfo(android.view.accessibility.AccessibilityNodeInfo info)
onInitializeAccessibilityNodeInfo in class android.view.Viewpublic void onInitializeAccessibilityEvent(android.view.accessibility.AccessibilityEvent event)
onInitializeAccessibilityEvent in class android.view.Viewprotected boolean canAnimate()
canAnimate in class android.view.ViewGroupprotected void checkSelectionChanged()
protected int lookForSelectablePosition(int position,
boolean lookDown)
position - The starting position to look at.lookDown - Whether to look down for other positions.INVALID_POSITION if nothing can be found.protected void setSelectedPositionInt(int position)
position - Our current positionprotected void setNextSelectedPositionInt(int position)
position - Intended value for mSelectedPosition the next time we go through layoutpublic void rememberSyncState()