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

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

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

Sets AutofillListener on the custom view.

Parameters
listener GuidedActionAutofillSupport.OnAutofillListener