Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
added in version 1.0.0
belongs to Maven artifact androidx.leanback:leanback:1.0.0-rc01

GuidedActionEditText

public class GuidedActionEditText
extends EditText implements ImeKeyMonitor, GuidedActionAutofillSupport

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


A custom EditText that satisfies the IME key monitoring requirements of GuidedStepFragment.

Summary

Inherited constants

Inherited fields

Public constructors

GuidedActionEditText(Context ctx)
GuidedActionEditText(Context ctx, AttributeSet attrs)
GuidedActionEditText(Context ctx, AttributeSet attrs, int defStyleAttr)

Public methods

void autofill(AutofillValue values)
int getAutofillType()
void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info)
boolean onKeyPreIme(int keyCode, KeyEvent event)
void setCustomSelectionActionModeCallback(ActionMode.Callback actionModeCallback)

See TextViewCompat.setCustomSelectionActionModeCallback(TextView, ActionMode.Callback)

void setImeKeyListener(ImeKeyMonitor.ImeKeyListener listener)

Set the listener for this edit text object.

void setOnAutofillListener(GuidedActionAutofillSupport.OnAutofillListener autofillListener)

Sets AutofillListener on the custom view.

Protected methods

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

Inherited methods

Public constructors

GuidedActionEditText

added in version 1.0.0
public GuidedActionEditText (Context ctx)

Parameters
ctx Context

GuidedActionEditText

added in version 1.0.0
public GuidedActionEditText (Context ctx, 
                AttributeSet attrs)

Parameters
ctx Context

attrs AttributeSet

GuidedActionEditText

added in version 1.0.0
public GuidedActionEditText (Context ctx, 
                AttributeSet attrs, 
                int defStyleAttr)

Parameters
ctx Context

attrs AttributeSet

defStyleAttr int

Public methods

autofill

public void autofill (AutofillValue values)

Parameters
values AutofillValue

getAutofillType

public int getAutofillType ()

Returns
int

onInitializeAccessibilityNodeInfo

public void onInitializeAccessibilityNodeInfo (AccessibilityNodeInfo info)

Parameters
info AccessibilityNodeInfo

onKeyPreIme

public boolean onKeyPreIme (int keyCode, 
                KeyEvent event)

Parameters
keyCode int

event KeyEvent

Returns
boolean

setCustomSelectionActionModeCallback

public void setCustomSelectionActionModeCallback (ActionMode.Callback actionModeCallback)

See TextViewCompat.setCustomSelectionActionModeCallback(TextView, ActionMode.Callback)

Parameters
actionModeCallback ActionMode.Callback

setImeKeyListener

added in version 1.0.0
public void setImeKeyListener (ImeKeyMonitor.ImeKeyListener listener)

Set the listener for this edit text object. The listener's onKeyPreIme method will be invoked from the host edit text's onKeyPreIme method.

Parameters
listener ImeKeyMonitor.ImeKeyListener

setOnAutofillListener

added in version 1.0.0
public void setOnAutofillListener (GuidedActionAutofillSupport.OnAutofillListener autofillListener)

Sets AutofillListener on the custom view.

Parameters
autofillListener GuidedActionAutofillSupport.OnAutofillListener

Protected methods

onFocusChanged

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

Parameters
focused boolean

direction int

previouslyFocusedRect Rect