Skip to content

Most visited

Recently visited

navigation

AutofillManager.AutofillCallback

public static abstract class AutofillManager.AutofillCallback
extends Object

java.lang.Object
   ↳ android.view.autofill.AutofillManager.AutofillCallback


Callback for autofill related events.

Typically used for applications that display their own "auto-complete" views, so they can enable / disable such views when the autofill UI affordance is shown / hidden.

Summary

Constants

int EVENT_INPUT_HIDDEN

The autofill input UI affordance associated with the view was hidden.

int EVENT_INPUT_SHOWN

The autofill input UI affordance associated with the view was shown.

int EVENT_INPUT_UNAVAILABLE

The autofill input UI affordance associated with the view isn't shown because autofill is not available.

Public constructors

AutofillManager.AutofillCallback()

Public methods

void onAutofillEvent(View view, int virtualId, int event)

Called after a change in the autofill state associated with a virtual view.

void onAutofillEvent(View view, int event)

Called after a change in the autofill state associated with a view.

Inherited methods

From class java.lang.Object

Constants

EVENT_INPUT_HIDDEN

added in API level 26
int EVENT_INPUT_HIDDEN

The autofill input UI affordance associated with the view was hidden.

If the view provides its own auto-complete UI affordance that was hidden upon a EVENT_INPUT_SHOWN event, it could be shown again now.

Constant Value: 2 (0x00000002)

EVENT_INPUT_SHOWN

added in API level 26
int EVENT_INPUT_SHOWN

The autofill input UI affordance associated with the view was shown.

If the view provides its own auto-complete UI affordance and its currently shown, it should be hidden upon receiving this event.

Constant Value: 1 (0x00000001)

EVENT_INPUT_UNAVAILABLE

added in API level 26
int EVENT_INPUT_UNAVAILABLE

The autofill input UI affordance associated with the view isn't shown because autofill is not available.

If the view provides its own auto-complete UI affordance but was not displaying it to avoid flickering, it could shown it upon receiving this event.

Constant Value: 3 (0x00000003)

Public constructors

AutofillManager.AutofillCallback

added in API level 26
AutofillManager.AutofillCallback ()

Public methods

onAutofillEvent

added in API level 26
void onAutofillEvent (View view, 
                int virtualId, 
                int event)

Called after a change in the autofill state associated with a virtual view.

Parameters
view View: parent view associated with the change.

This value must never be null.

virtualId int: id identifying the virtual child inside the parent view.

event int: currently either EVENT_INPUT_SHOWN or EVENT_INPUT_HIDDEN.

onAutofillEvent

added in API level 26
void onAutofillEvent (View view, 
                int event)

Called after a change in the autofill state associated with a view.

Parameters
view View: view associated with the change.

This value must never be null.

event int: currently either EVENT_INPUT_SHOWN or EVENT_INPUT_HIDDEN.

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)