public class

SearchView.SearchAutoComplete

extends AppCompatAutoCompleteTextView

 java.lang.Object

↳AutoCompleteTextView

androidx.appcompat.widget.AppCompatAutoCompleteTextView

↳androidx.appcompat.widget.SearchView.SearchAutoComplete

Overview

Local subclass for AutoCompleteTextView.

Summary

Constructors
publicSearchAutoComplete(Context context)

publicSearchAutoComplete(Context context, AttributeSet attrs)

publicSearchAutoComplete(Context context, AttributeSet attrs, int defStyle)

Methods
public booleanenoughToFilter()

We override this method so that we can allow a threshold of zero, which ACTV does not.

public InputConnectiononCreateInputConnection(EditorInfo editorInfo)

We override View as a signal to schedule a pending request (if any).

protected voidonFinishInflate()

protected voidonFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect)

public booleanonKeyPreIme(int keyCode, KeyEvent event)

public voidonWindowFocusChanged(boolean hasWindowFocus)

We override this method to be sure and show the soft keyboard if appropriate when the TextView has focus.

public voidperformCompletion()

We override this method to avoid an extra onItemClick being called on the drop-down's OnItemClickListener by when an item is clicked with the trackball.

protected voidreplaceText(java.lang.CharSequence text)

We override this method to avoid replacing the query box text when a suggestion is clicked.

public voidsetThreshold(int threshold)

from AppCompatAutoCompleteTextViewdrawableStateChanged, getCustomSelectionActionModeCallback, getSupportBackgroundTintList, getSupportBackgroundTintMode, getSupportCompoundDrawablesTintList, getSupportCompoundDrawablesTintMode, isEmojiCompatEnabled, setBackgroundDrawable, setBackgroundResource, setCompoundDrawables, setCompoundDrawablesRelative, setCustomSelectionActionModeCallback, setDropDownBackgroundResource, setEmojiCompatEnabled, setKeyListener, setSupportBackgroundTintList, setSupportBackgroundTintMode, setSupportCompoundDrawablesTintList, setSupportCompoundDrawablesTintMode, setTextAppearance
from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public SearchAutoComplete(Context context)

public SearchAutoComplete(Context context, AttributeSet attrs)

public SearchAutoComplete(Context context, AttributeSet attrs, int defStyle)

Methods

protected void onFinishInflate()

public void setThreshold(int threshold)

protected void replaceText(java.lang.CharSequence text)

We override this method to avoid replacing the query box text when a suggestion is clicked.

public void performCompletion()

We override this method to avoid an extra onItemClick being called on the drop-down's OnItemClickListener by when an item is clicked with the trackball.

public void onWindowFocusChanged(boolean hasWindowFocus)

We override this method to be sure and show the soft keyboard if appropriate when the TextView has focus.

protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect)

public boolean enoughToFilter()

We override this method so that we can allow a threshold of zero, which ACTV does not.

public boolean onKeyPreIme(int keyCode, KeyEvent event)

public InputConnection onCreateInputConnection(EditorInfo editorInfo)

We override View as a signal to schedule a pending request (if any).