Udostępnij za pośrednictwem


UserData.Builder(String, String, String) Constructor

Definition

Creates a new builder for the user data used for field classification.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", "", ApiSince=28)]
public Builder (string id, string value, string categoryId);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", "", ApiSince=28)>]
new Android.Service.Autofill.UserData.Builder : string * string * string -> Android.Service.Autofill.UserData.Builder

Parameters

id
String

id used to identify the whole UserData object. This id is also returned by AutofillManager#getUserDataId(), which can be used to check if the UserData is up-to-date without fetching the whole object (through AutofillManager#getUserData()).

value
String

value of the user data.

categoryId
String

autofill field category.

Attributes

Remarks

Creates a new builder for the user data used for field classification.

The user data must contain at least one pair of value -> categoryId, and more pairs can be added through the #add(String, String) method. For example:

new UserData.Builder("v1", "Bart Simpson", "name")
              .add("bart.simpson@example.com", "email")
              .add("el_barto@example.com", "email")
              .build();

Java documentation for android.service.autofill.UserData.Builder.UserData$Builder(java.lang.String, java.lang.String, java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to