O Google tem o compromisso de promover a igualdade racial para as comunidades negras. Saiba como.

LinkifyCompat

class LinkifyCompat
kotlin.Any
   ↳ androidx.core.text.util.LinkifyCompat

LinkifyCompat brings in Linkify improvements for URLs and email addresses to older API levels.

Summary

Public methods
static Boolean
addLinks(@NonNull text: Spannable, mask: Int)

Scans the text of the provided Spannable and turns all occurrences of the link types indicated in the mask into clickable links.

static Boolean
addLinks(@NonNull text: TextView, mask: Int)

Scans the text of the provided TextView and turns all occurrences of the link types indicated in the mask into clickable links.

static Unit
addLinks(@NonNull text: TextView, @NonNull pattern: Pattern, @Nullable scheme: String?)

Applies a regex to the text of a TextView turning the matches into links.

static Unit
addLinks(@NonNull text: TextView, @NonNull pattern: Pattern, @Nullable scheme: String?, @Nullable matchFilter: MatchFilter?, @Nullable transformFilter: TransformFilter?)

Applies a regex to the text of a TextView turning the matches into links.

static Unit
addLinks(@NonNull text: TextView, @NonNull pattern: Pattern, @Nullable defaultScheme: String?, @Nullable schemes: Array<String!>?, @Nullable matchFilter: MatchFilter?, @Nullable transformFilter: TransformFilter?)

Applies a regex to the text of a TextView turning the matches into links.

static Boolean
addLinks(@NonNull text: Spannable, @NonNull pattern: Pattern, @Nullable scheme: String?)

Applies a regex to a Spannable turning the matches into links.

static Boolean
addLinks(@NonNull spannable: Spannable, @NonNull pattern: Pattern, @Nullable scheme: String?, @Nullable matchFilter: MatchFilter?, @Nullable transformFilter: TransformFilter?)

Applies a regex to a Spannable turning the matches into links.

static Boolean
addLinks(@NonNull spannable: Spannable, @NonNull pattern: Pattern, @Nullable defaultScheme: String?, @Nullable schemes: Array<String!>?, @Nullable matchFilter: MatchFilter?, @Nullable transformFilter: TransformFilter?)

Applies a regex to a Spannable turning the matches into links.

Public methods

static fun addLinks(
    @NonNull text: Spannable,
    mask: Int
): Boolean

Scans the text of the provided Spannable and turns all occurrences of the link types indicated in the mask into clickable links. If the mask is nonzero, it also removes any existing URLSpans attached to the Spannable, to avoid problems if you call it repeatedly on the same text.

Parameters
text Spannable: Spannable whose text is to be marked-up with links
mask Int: Mask to define which kinds of links will be searched.
Return