Builder
class Builder
kotlin.Any | |
↳ | androidx.core.view.ContentInfoCompat.Builder |
Builder for ContentInfoCompat
.
Summary
Public constructors | |
---|---|
<init>(@NonNull other: ContentInfoCompat) Creates a new builder initialized with the data from the given builder. |
|
Creates a new builder. |
Public methods | |
---|---|
ContentInfoCompat |
build() |
ContentInfoCompat.Builder |
Sets the data to be inserted. |
ContentInfoCompat.Builder |
Sets additional metadata. |
ContentInfoCompat.Builder |
Sets flags that control content insertion behavior. |
ContentInfoCompat.Builder |
setLinkUri(@Nullable linkUri: Uri?) Sets the http/https URI for the content. |
ContentInfoCompat.Builder |
Sets the source of the operation. |
Public constructors
<init>
Builder(@NonNull other: ContentInfoCompat)
Creates a new builder initialized with the data from the given builder.
<init>
Builder(
@NonNull clip: ClipData,
source: Int)
Creates a new builder.
Parameters | |
---|---|
clip |
ClipData: The data to insert. |
source |
Int: The source of the operation. See SOURCE_ constants. |
Public methods
build
@NonNull fun build(): ContentInfoCompat
Return | |
---|---|
ContentInfoCompat |
A new ContentInfoCompat instance with the data from this builder. |
setClip
@NonNull fun setClip(@NonNull clip: ClipData): ContentInfoCompat.Builder
Sets the data to be inserted.
Parameters | |
---|---|
clip |
ClipData: The data to insert. |
Return | |
---|---|
ContentInfoCompat.Builder |
this builder |
setExtras
@NonNull fun setExtras(@Nullable extras: Bundle?): ContentInfoCompat.Builder
Sets additional metadata.
Parameters | |
---|---|
extras |
Bundle?: Optional bundle with additional metadata. |
Return | |
---|---|
ContentInfoCompat.Builder |
this builder |
setFlags
@NonNull fun setFlags(flags: Int): ContentInfoCompat.Builder
Sets flags that control content insertion behavior.
Parameters | |
---|---|
flags |
Int: Optional flags to configure the insertion behavior. Use 0 for default behavior. See FLAG_ constants. |
Return | |
---|---|
ContentInfoCompat.Builder |
this builder |
setLinkUri
@NonNull fun setLinkUri(@Nullable linkUri: Uri?): ContentInfoCompat.Builder
Sets the http/https URI for the content. See android.view.inputmethod.InputContentInfo#getLinkUri
for more info.
Parameters | |
---|---|
linkUri |
Uri?: Optional http/https URI for the content. |
Return | |
---|---|
ContentInfoCompat.Builder |
this builder |
setSource
@NonNull fun setSource(source: Int): ContentInfoCompat.Builder
Sets the source of the operation.
Parameters | |
---|---|
source |
Int: The source of the operation. See SOURCE_ constants. |
Return | |
---|---|
ContentInfoCompat.Builder |
this builder |