Google is committed to advancing racial equity for Black communities. See how.

Builder

class Builder
kotlin.Any
   ↳ androidx.navigation.NavDeepLink.Builder

A builder for constructing NavDeepLink instances.

Summary

Public methods
NavDeepLink

Build the NavDeepLink specified by this builder.

static NavDeepLink.Builder
fromAction(@NonNull action: String)

Creates a NavDeepLink.Builder with a set action.

static NavDeepLink.Builder
fromMimeType(@NonNull mimeType: String)

Creates a NavDeepLink.Builder with a set mimeType.

static NavDeepLink.Builder
fromUriPattern(@NonNull uriPattern: String)

Creates a NavDeepLink.Builder with a set uri pattern.

NavDeepLink.Builder
setAction(@NonNull action: String)

Set the action for the NavDeepLink.

NavDeepLink.Builder
setMimeType(@NonNull mimeType: String)

Set the mimeType for the NavDeepLink.

NavDeepLink.Builder
setUriPattern(@NonNull uriPattern: String)

Set the uri pattern for the NavDeepLink.

Public methods

build

@NonNull fun build(): NavDeepLink

Build the NavDeepLink specified by this builder.

Return
NavDeepLink the newly constructed NavDeepLink.

fromAction

@NonNull static fun fromAction(@NonNull action: String): NavDeepLink.Builder

Creates a NavDeepLink.Builder with a set action.

Parameters
action String: the intent action for the NavDeepLink
Return
NavDeepLink.Builder a Builder instance
Exceptions
IllegalArgumentException if the action is empty.

fromMimeType

@NonNull static fun fromMimeType(@NonNull mimeType: String): NavDeepLink.Builder

Creates a NavDeepLink.Builder with a set mimeType.

Parameters
mimeType String: the mimeType for the NavDeepLink
Return
NavDeepLink.Builder a Builder instance

fromUriPattern

@NonNull static fun fromUriPattern(@NonNull uriPattern: String): NavDeepLink.Builder

Creates a NavDeepLink.Builder with a set uri pattern.

Parameters
uriPattern String: The uri pattern to add to the NavDeepLink
Return
NavDeepLink.Builder a Builder instance

setAction

@NonNull fun setAction(@NonNull action: String): NavDeepLink.Builder

Set the action for the NavDeepLink.

Parameters
action String: the intent action for the NavDeepLink
Return
NavDeepLink.Builder This builder.
Exceptions
IllegalArgumentException if the action is empty.

setMimeType

@NonNull fun setMimeType(@NonNull mimeType: String): NavDeepLink.Builder

Set the mimeType for the NavDeepLink.

Parameters
mimeType String: the mimeType for the NavDeepLink
Return
NavDeepLink.Builder This builder.

setUriPattern

@NonNull fun setUriPattern(@NonNull uriPattern: String): NavDeepLink.Builder

Set the uri pattern for the NavDeepLink.

Parameters
uriPattern String: The uri pattern to add to the NavDeepLink
Return
NavDeepLink.Builder This builder.