GuidedActionAutofillSupport
public
interface
GuidedActionAutofillSupport
androidx.leanback.widget.GuidedActionAutofillSupport |
Interface for a custom EditText subclass to support autofill in
GuidedStepSupportFragment
.
Apps who needs to supply custom layouts for GuidedActionsStylist
with their own EditText
classes should implement this interface in order to support autofill in
GuidedStepSupportFragment
. This ensures autofill event happened
within custom EditText is propagated to GuidedStepSupportFragment.
e.g.
public class MyEditText extends EditText implements GuidedActionAutofillSupport {
OnAutofillListener mAutofillViewListener;
@Override
public void setOnAutofillListener(OnAutofillListener autofillViewListener) {
mAutofillViewListener = autofillViewListener;
}
@Override
public void autofill(AutofillValue values) {
super.autofill(values);
if (mAutofillViewListener != null) {
mAutofillViewListener.onAutofill(this);
}
}
// ...
}
Summary
Nested classes | |
---|---|
interface |
GuidedActionAutofillSupport.OnAutofillListener
Listener for autofill event. |
Public methods | |
---|---|
abstract
void
|
setOnAutofillListener(GuidedActionAutofillSupport.OnAutofillListener listener)
Sets AutofillListener on the custom view. |
Public methods
setOnAutofillListener
public abstract void setOnAutofillListener (GuidedActionAutofillSupport.OnAutofillListener listener)
Sets AutofillListener on the custom view.
Parameters | |
---|---|
listener |
GuidedActionAutofillSupport.OnAutofillListener |
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.