GuidedActionAutofillSupport

interface GuidedActionAutofillSupport
androidx.leanback.widget.GuidedActionAutofillSupport

Interface for a custom EditText subclass to support autofill in androidx.leanback.app.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 androidx.leanback.app.GuidedStepSupportFragment. This ensures autofill event happened within custom EditText is propagated to GuidedStepSupportFragment. e.g.

<code>
  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);
          }
      }
      // ...
  }
  </code>

Summary

Nested classes

abstract

Listener for autofill event.

Public methods

abstract Unit

Sets AutofillListener on the custom view.

Public methods

setOnAutofillListener

abstract fun setOnAutofillListener(listener: GuidedActionAutofillSupport.OnAutofillListener!): Unit

Sets AutofillListener on the custom view.