TextAttributeCompat


public final class TextAttributeCompat


Helper for accessing features in android.view.inputmethod.TextAttribute in a backwards compatible fashion.

Summary

Nested types

public final class TextAttributeCompat.Builder

Builder for creating a TextAttributeCompat.

Public methods

@NonNull PersistableBundle

Get the extras data.

@NonNull List<String>

Get the list of text conversion suggestions.

boolean

Get whether the text is undergoing a text candidate selection.

@Nullable Object

Gets the underlying framework android.view.inputmethod.TextAttribute object.

static @Nullable TextAttributeCompat
wrap(@Nullable Object textAttribute)

Creates an instance from a framework android.view.inputmethod.TextAttribute object.

Public methods

getExtras

public @NonNull PersistableBundle getExtras()

Get the extras data.

getTextConversionSuggestions

public @NonNull List<StringgetTextConversionSuggestions()

Get the list of text conversion suggestions.

isTextSuggestionSelected

public boolean isTextSuggestionSelected()

Get whether the text is undergoing a text candidate selection.

unwrap

public @Nullable Object unwrap()

Gets the underlying framework android.view.inputmethod.TextAttribute object.

Returns
@Nullable Object

an equivalent android.view.inputmethod.TextAttribute object, or null if not supported.

wrap

public static @Nullable TextAttributeCompat wrap(@Nullable Object textAttribute)

Creates an instance from a framework android.view.inputmethod.TextAttribute object.

Parameters
@Nullable Object textAttribute

an android.view.inputmethod.TextAttribute object, or null.

Returns
@Nullable TextAttributeCompat

an equivalent TextAttributeCompat object, or null if not supported.