added in version 1.0.0
belongs to Maven artifact androidx.leanback:leanback:1.0.0-beta01

SearchEditText

public class SearchEditText
extends EditText

java.lang.Object
   ↳ android.view.View
     ↳ android.widget.TextView
       ↳ android.widget.EditText
         ↳ androidx.leanback.widget.SearchEditText


EditText widget that monitors keyboard changes.

Summary

Nested classes

interface SearchEditText.OnKeyboardDismissListener

Interface for receiving notification when the keyboard is dismissed. 

Inherited constants

Inherited fields

Public constructors

SearchEditText(Context context)
SearchEditText(Context context, AttributeSet attrs)
SearchEditText(Context context, AttributeSet attrs, int defStyle)

Public methods

static boolean isLayoutRtl(View view)
void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info)

This is required to make the View findable by uiautomator.

boolean onKeyPreIme(int keyCode, KeyEvent event)
void reset()

Resets the text view.

void setCustomSelectionActionModeCallback(ActionMode.Callback actionModeCallback)

See TextViewCompat.setCustomSelectionActionModeCallback(TextView, ActionMode.Callback)

void setFinalRecognizedText(CharSequence finalText)

Sets the final, non changing, full text result.

void setOnKeyboardDismissListener(SearchEditText.OnKeyboardDismissListener listener)

Sets a keyboard dismissed listener.

void updateRecognizedText(String stableText, String pendingText)

Updates the recognized text.

void updateRecognizedText(String stableText, List<Float> rmsValues)

Protected methods

void onFinishInflate()

Inherited methods

Public constructors

SearchEditText

added in version 1.0.0
public SearchEditText (Context context)

Parameters
context Context

SearchEditText

added in version 1.0.0
public SearchEditText (Context context, 
                AttributeSet attrs)

Parameters
context Context

attrs AttributeSet

SearchEditText

added in version 1.0.0
public SearchEditText (Context context, 
                AttributeSet attrs, 
                int defStyle)

Parameters
context Context

attrs AttributeSet

defStyle int

Public methods

isLayoutRtl

public static boolean isLayoutRtl (View view)

Parameters
view View

Returns
boolean

onInitializeAccessibilityNodeInfo

public void onInitializeAccessibilityNodeInfo (AccessibilityNodeInfo info)

This is required to make the View findable by uiautomator.

Parameters
info AccessibilityNodeInfo

onKeyPreIme

public boolean onKeyPreIme (int keyCode, 
                KeyEvent event)

Parameters
keyCode int

event KeyEvent

Returns
boolean

reset

public void reset ()

Resets the text view.

setCustomSelectionActionModeCallback

public void setCustomSelectionActionModeCallback (ActionMode.Callback actionModeCallback)

See TextViewCompat.setCustomSelectionActionModeCallback(TextView, ActionMode.Callback)

Parameters
actionModeCallback ActionMode.Callback

setFinalRecognizedText

public void setFinalRecognizedText (CharSequence finalText)

Sets the final, non changing, full text result. This should only happen at the very end of a recognition.

Parameters
finalText CharSequence: to the view to.

setOnKeyboardDismissListener

added in version 1.0.0
public void setOnKeyboardDismissListener (SearchEditText.OnKeyboardDismissListener listener)

Sets a keyboard dismissed listener.

Parameters
listener SearchEditText.OnKeyboardDismissListener: The listener.

updateRecognizedText

public void updateRecognizedText (String stableText, 
                String pendingText)

Updates the recognized text.

Parameters
stableText String

pendingText String

updateRecognizedText

public void updateRecognizedText (String stableText, 
                List<Float> rmsValues)

Parameters
stableText String

rmsValues List

Protected methods

onFinishInflate

protected void onFinishInflate ()