Most visited

Recently visited

SearchEditText

public class SearchEditText
extends EditText

java.lang.Object
   ↳ android.view.View
     ↳ android.widget.TextView
       ↳ android.widget.EditText
         ↳ android.support.v17.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 XML attributes

From class android.widget.TextView
From class android.view.View

Inherited constants

From class android.view.View

Inherited fields

From class android.view.View

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)

Handle a key event before it is processed by any input method associated with the view hierarchy.

void reset()

Resets the text view.

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()

Finalize inflating a view from XML.

Inherited methods

From class android.widget.EditText
From class android.widget.TextView
From class android.view.View
From class java.lang.Object
From interface android.view.ViewTreeObserver.OnPreDrawListener
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.accessibility.AccessibilityEventSource

Public constructors

SearchEditText

SearchEditText (Context context)

Parameters
context Context

SearchEditText

SearchEditText (Context context, 
                AttributeSet attrs)

Parameters
context Context
attrs AttributeSet

SearchEditText

SearchEditText (Context context, 
                AttributeSet attrs, 
                int defStyle)

Parameters
context Context
attrs AttributeSet
defStyle int

Public methods

isLayoutRtl

boolean isLayoutRtl (View view)

Parameters
view View
Returns
boolean

onInitializeAccessibilityNodeInfo

void onInitializeAccessibilityNodeInfo (AccessibilityNodeInfo info)

This is required to make the View findable by uiautomator.

Parameters
info AccessibilityNodeInfo: The instance to initialize.

onKeyPreIme

boolean onKeyPreIme (int keyCode, 
                KeyEvent event)

Handle a key event before it is processed by any input method associated with the view hierarchy. This can be used to intercept key events in special situations before the IME consumes them; a typical example would be handling the BACK key to update the application's UI instead of allowing the IME to see it and close itself.

Parameters
keyCode int: The value in event.getKeyCode().
event KeyEvent: Description of the key event.
Returns
boolean If you handled the event, return true. If you want to allow the event to be handled by the next receiver, return false.

reset

void reset ()

Resets the text view.

setFinalRecognizedText

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

void setOnKeyboardDismissListener (SearchEditText.OnKeyboardDismissListener listener)

Sets a keyboard dismissed listener.

Parameters
listener SearchEditText.OnKeyboardDismissListener: The listener.

updateRecognizedText

void updateRecognizedText (String stableText, 
                String pendingText)

Updates the recognized text.

Parameters
stableText String
pendingText String

updateRecognizedText

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

Parameters
stableText String
rmsValues List

Protected methods

onFinishInflate

void onFinishInflate ()

Finalize inflating a view from XML. This is called as the last phase of inflation, after all child views have been added.

Even if the subclass overrides onFinishInflate, they should always be sure to call the super method, so that we get called.

Hooray!