Builder
class Builder
| kotlin.Any | |
| ↳ | android.service.autofill.ImageTransformation.Builder | 
Builder for ImageTransformation objects.
Summary
| Public constructors | |
|---|---|
| Builder(id: AutofillId, regex: Pattern, resId: Int)Creates a new builder for a autofill id and add a first option. | |
| Builder(id: AutofillId, regex: Pattern, resId: Int, contentDescription: CharSequence)Creates a new builder for a autofill id and add a first option. | |
| Public methods | |
|---|---|
| open ImageTransformation.Builder! | Adds an option to replace the child view with a different image when the regex matches. | 
| open ImageTransformation.Builder! | addOption(regex: Pattern, resId: Int, contentDescription: CharSequence)Adds an option to replace the child view with a different image and content description when the regex matches. | 
| open ImageTransformation! | build()Creates a new  | 
Public constructors
Builder
Builder(
id: AutofillId,
regex: Pattern,
resId: Int)
Deprecated: use Builder(android.view.autofill.AutofillId,java.util.regex.Pattern,int,java.lang.CharSequence) instead.
Creates a new builder for a autofill id and add a first option.
| Parameters | |
|---|---|
| id | AutofillId: id of the screen field that will be used to evaluate whether the image should be used. This value cannot be null. | 
| regex | Pattern: regular expression defining what should be matched to use this image. This value cannot be null. | 
| resId | Int: resource id of the image (in the autofill service's package). The presentationmust contain aImageViewchild with that id. | 
Builder
Builder(
id: AutofillId,
regex: Pattern,
resId: Int,
contentDescription: CharSequence)
Creates a new builder for a autofill id and add a first option.
| Parameters | |
|---|---|
| id | AutofillId: id of the screen field that will be used to evaluate whether the image should be used. This value cannot be null. | 
| regex | Pattern: regular expression defining what should be matched to use this image. This value cannot be null. | 
| resId | Int: resource id of the image (in the autofill service's package). The presentationmust contain aImageViewchild with that id. | 
| contentDescription | CharSequence: content description to be applied in the child view. This value cannot be null. | 
Public methods
addOption
open funaddOption(
regex: Pattern,
resId: Int
): ImageTransformation.Builder!
Deprecated: use addOption(java.util.regex.Pattern,int,java.lang.CharSequence) instead.
Adds an option to replace the child view with a different image when the regex matches.
| Parameters | |
|---|---|
| regex | Pattern: regular expression defining what should be matched to use this image. This value cannot be null. | 
| resId | Int: resource id of the image (in the autofill service's package). The presentationmust contain aImageViewchild with that id. | 
| Return | |
|---|---|
| ImageTransformation.Builder! | this build | 
addOption
open fun addOption(
regex: Pattern,
resId: Int,
contentDescription: CharSequence
): ImageTransformation.Builder!
Adds an option to replace the child view with a different image and content description when the regex matches.
| Parameters | |
|---|---|
| regex | Pattern: regular expression defining what should be matched to use this image. This value cannot be null. | 
| resId | Int: resource id of the image (in the autofill service's package). The presentationmust contain aImageViewchild with that id. | 
| contentDescription | CharSequence: content description to be applied in the child view. This value cannot be null. | 
| Return | |
|---|---|
| ImageTransformation.Builder! | this build | 
build
open fun build(): ImageTransformation!
Creates a new ImageTransformation instance.
