android.widget
Class AutoCompleteTextView
java.lang.Object
android.view.View
android.widget.TextView
android.widget.EditText
android.widget.AutoCompleteTextView
- All Implemented Interfaces:
- Drawable.Callback, AccessibilityEventSource, KeyEvent.Callback, ViewTreeObserver.OnPreDrawListener, Filter.FilterListener
- Direct Known Subclasses:
- MultiAutoCompleteTextView
public class AutoCompleteTextView
- extends EditText
- implements Filter.FilterListener
Nested classes/interfaces inherited from class android.view.View |
View.AccessibilityDelegate, View.BaseSavedState, View.DragShadowBuilder, View.MeasureSpec, View.OnAttachStateChangeListener, View.OnClickListener, View.OnCreateContextMenuListener, View.OnDragListener, View.OnFocusChangeListener, View.OnGenericMotionListener, View.OnHoverListener, View.OnKeyListener, View.OnLayoutChangeListener, View.OnLongClickListener, View.OnSystemUiVisibilityChangeListener, View.OnTouchListener |
Fields inherited from class android.view.View |
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, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, 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_WINDOW_FOCUSED_STATE_SET, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, 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_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, TRANSLATION_X, TRANSLATION_Y, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y |
Methods inherited from class android.widget.TextView |
addTextChangedListener, append, append, beginBatchEdit, bringPointIntoView, cancelLongPress, clearComposingText, computeHorizontalScrollRange, computeScroll, computeVerticalScrollExtent, computeVerticalScrollRange, debug, didTouchFocusSelect, drawableStateChanged, endBatchEdit, extractText, findViewsWithText, getAutoLinkMask, getBaseline, getBottomPaddingOffset, getCompoundDrawablePadding, getCompoundDrawables, getCompoundPaddingBottom, getCompoundPaddingLeft, getCompoundPaddingRight, getCompoundPaddingTop, getCurrentHintTextColor, getCurrentTextColor, getCustomSelectionActionModeCallback, getEditableText, getEllipsize, getError, getExtendedPaddingBottom, getExtendedPaddingTop, getFilters, getFocusedRect, getFreezesText, getGravity, getHint, getHintTextColors, getImeActionId, getImeActionLabel, getImeOptions, getInputExtras, getInputType, getKeyListener, getLayout, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLineBounds, getLineCount, getLineHeight, getLinksClickable, getLinkTextColors, getMovementMethod, getOffsetForPosition, getPaint, getPaintFlags, getPrivateImeOptions, getRightFadingEdgeStrength, getRightPaddingOffset, getSelectionEnd, getSelectionStart, getTextColor, getTextColors, getTextColors, getTextScaleX, getTextSize, getTopPaddingOffset, getTotalPaddingBottom, getTotalPaddingLeft, getTotalPaddingRight, getTotalPaddingTop, getTransformationMethod, getTypeface, getUrls, hasSelection, invalidateDrawable, isInputMethodTarget, isPaddingOffsetRequired, isSuggestionsEnabled, isTextSelectable, jumpDrawablesToCurrentState, length, moveCursorToVisibleOffset, onBeginBatchEdit, onCheckIsTextEditor, onCommitCorrection, onCreateContextMenu, onCreateDrawableState, onCreateInputConnection, onDragEvent, onDraw, onEditorAction, onEndBatchEdit, onFinishTemporaryDetach, onGenericMotionEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyMultiple, onKeyShortcut, onMeasure, onPopulateAccessibilityEvent, onPreDraw, onPrivateIMECommand, onRestoreInstanceState, onSaveInstanceState, onScrollChanged, onSelectionChanged, onSetAlpha, onStartTemporaryDetach, onTextChanged, onTextContextMenuItem, onTouchEvent, onTrackballEvent, onVisibilityChanged, performLongClick, removeTextChangedListener, resetResolvedDrawables, resetResolvedLayoutDirection, resolveDrawables, resolveTextDirection, sendAccessibilityEvent, setAllCaps, setAutoLinkMask, setCompoundDrawablePadding, setCompoundDrawables, setCompoundDrawablesWithIntrinsicBounds, setCompoundDrawablesWithIntrinsicBounds, setCursorVisible, setCustomSelectionActionModeCallback, setEditableFactory, setEms, setEnabled, setError, setError, setExtractedText, setFilters, setFreezesText, setGravity, setHeight, setHighlightColor, setHint, setHint, setHintTextColor, setHintTextColor, setHorizontallyScrolling, setImeActionLabel, setImeOptions, setIncludeFontPadding, setInputExtras, setInputType, setKeyListener, setLines, setLineSpacing, setLinksClickable, setLinkTextColor, setLinkTextColor, setMarqueeRepeatLimit, setMaxEms, setMaxHeight, setMaxLines, setMaxWidth, setMinEms, setMinHeight, setMinLines, setMinWidth, setMovementMethod, setOnEditorActionListener, setPadding, setPaintFlags, setPrivateImeOptions, setRawInputType, setScroller, setSelectAllOnFocus, setSelected, setShadowLayer, setSingleLine, setSingleLine, setSpannableFactory, setText, setText, setText, setText, setTextAppearance, setTextColor, setTextColor, setTextIsSelectable, setTextKeepState, setTextKeepState, setTextScaleX, setTextSize, setTextSize, setTransformationMethod, setTypeface, setTypeface, setWidth, verifyDrawable |
Methods inherited from class android.view.View |
addFocusables, addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, addTouchables, animate, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, clearFocus, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeVerticalScrollOffset, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchGenericFocusedEvent, dispatchGenericMotionEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowVisibilityChanged, draw, findFocus, findViewById, findViewWithTag, fitsSystemWindows, fitSystemWindows, focusSearch, forceLayout, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBottom, getBottomFadingEdgeStrength, getContentDescription, getContext, getContextMenuInfo, getDefaultSize, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFilterTouchesWhenObscured, getFocusables, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getKeepScreenOn, getKeyDispatcherState, getLayerType, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOverScrollMode, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getParent, getPivotX, getPivotY, getResources, getRight, getRootView, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemUiVisibility, getTag, getTag, getTop, getTopFadingEdgeStrength, getTouchables, getTouchDelegate, getTranslationX, getTranslationY, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, hasFocus, hasFocusable, hasWindowFocus, inflate, initializeFadingEdge, initializeScrollbars, invalidate, invalidate, invalidate, isActivated, isClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isInEditMode, isInTouchMode, isLayoutRequested, isLongClickable, isOpaque, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isSelected, isShown, isSoundEffectsEnabled, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, layout, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onConfigurationChanged, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onHoverChanged, onHoverEvent, onKeyLongPress, onLayout, onOverScrolled, onSizeChanged, onWindowVisibilityChanged, overScrollBy, performClick, performHapticFeedback, performHapticFeedback, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setActivated, setAlpha, setAnimation, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBottom, setCameraDistance, setClickable, setContentDescription, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setHapticFeedbackEnabled, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setKeepScreenOn, setLayerType, setLayoutParams, setLeft, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOverScrollMode, setPivotX, setPivotY, setPressed, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollbarFadingEnabled, setScrollBarStyle, setScrollContainer, setScrollX, setScrollY, setSoundEffectsEnabled, setSystemUiVisibility, setTag, setTag, setTop, setTouchDelegate, setTranslationX, setTranslationY, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, showContextMenu, startActionMode, startAnimation, startDrag, unscheduleDrawable, unscheduleDrawable, willNotCacheDrawing, willNotDraw |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AutoCompleteTextView
public AutoCompleteTextView(Context context)
AutoCompleteTextView
public AutoCompleteTextView(Context context,
AttributeSet attrs)
AutoCompleteTextView
public AutoCompleteTextView(Context context,
AttributeSet attrs,
int defStyle)
setOnClickListener
public void setOnClickListener(View.OnClickListener listener)
- Overrides:
setOnClickListener
in class View
setCompletionHint
public void setCompletionHint(CharSequence hint)
getDropDownWidth
public int getDropDownWidth()
setDropDownWidth
public void setDropDownWidth(int width)
getDropDownHeight
public int getDropDownHeight()
setDropDownHeight
public void setDropDownHeight(int height)
getDropDownAnchor
public int getDropDownAnchor()
setDropDownAnchor
public void setDropDownAnchor(int id)
getDropDownBackground
public Drawable getDropDownBackground()
setDropDownBackgroundDrawable
public void setDropDownBackgroundDrawable(Drawable d)
setDropDownBackgroundResource
public void setDropDownBackgroundResource(int id)
setDropDownVerticalOffset
public void setDropDownVerticalOffset(int offset)
getDropDownVerticalOffset
public int getDropDownVerticalOffset()
setDropDownHorizontalOffset
public void setDropDownHorizontalOffset(int offset)
getDropDownHorizontalOffset
public int getDropDownHorizontalOffset()
getThreshold
public int getThreshold()
setThreshold
public void setThreshold(int threshold)
setOnItemClickListener
public void setOnItemClickListener(AdapterView.OnItemClickListener l)
setOnItemSelectedListener
public void setOnItemSelectedListener(AdapterView.OnItemSelectedListener l)
getItemClickListener
public AdapterView.OnItemClickListener getItemClickListener()
getItemSelectedListener
public AdapterView.OnItemSelectedListener getItemSelectedListener()
getOnItemClickListener
public AdapterView.OnItemClickListener getOnItemClickListener()
getOnItemSelectedListener
public AdapterView.OnItemSelectedListener getOnItemSelectedListener()
getAdapter
public ListAdapter getAdapter()
setAdapter
public <T extends ListAdapter & Filterable> void setAdapter(T adapter)
onKeyPreIme
public boolean onKeyPreIme(int keyCode,
KeyEvent event)
- Overrides:
onKeyPreIme
in class TextView
onKeyUp
public boolean onKeyUp(int keyCode,
KeyEvent event)
- Specified by:
onKeyUp
in interface KeyEvent.Callback
- Overrides:
onKeyUp
in class TextView
onKeyDown
public boolean onKeyDown(int keyCode,
KeyEvent event)
- Specified by:
onKeyDown
in interface KeyEvent.Callback
- Overrides:
onKeyDown
in class TextView
enoughToFilter
public boolean enoughToFilter()
isPopupShowing
public boolean isPopupShowing()
convertSelectionToString
protected CharSequence convertSelectionToString(Object selectedItem)
clearListSelection
public void clearListSelection()
setListSelection
public void setListSelection(int position)
getListSelection
public int getListSelection()
performFiltering
protected void performFiltering(CharSequence text,
int keyCode)
performCompletion
public void performCompletion()
onCommitCompletion
public void onCommitCompletion(CompletionInfo completion)
- Overrides:
onCommitCompletion
in class TextView
isPerformingCompletion
public boolean isPerformingCompletion()
replaceText
protected void replaceText(CharSequence text)
onFilterComplete
public void onFilterComplete(int count)
- Specified by:
onFilterComplete
in interface Filter.FilterListener
onWindowFocusChanged
public void onWindowFocusChanged(boolean hasWindowFocus)
- Overrides:
onWindowFocusChanged
in class TextView
onDisplayHint
protected void onDisplayHint(int hint)
- Overrides:
onDisplayHint
in class View
onFocusChanged
protected void onFocusChanged(boolean focused,
int direction,
Rect previouslyFocusedRect)
- Overrides:
onFocusChanged
in class TextView
onAttachedToWindow
protected void onAttachedToWindow()
- Overrides:
onAttachedToWindow
in class TextView
onDetachedFromWindow
protected void onDetachedFromWindow()
- Overrides:
onDetachedFromWindow
in class TextView
dismissDropDown
public void dismissDropDown()
setFrame
protected boolean setFrame(int l,
int t,
int r,
int b)
- Overrides:
setFrame
in class TextView
showDropDown
public void showDropDown()
setValidator
public void setValidator(AutoCompleteTextView.Validator validator)
getValidator
public AutoCompleteTextView.Validator getValidator()
performValidation
public void performValidation()
getFilter
protected Filter getFilter()
Copyright © 2008-2012. All Rights Reserved.