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

UiVersions

@RequiresApi(30) class UiVersions
kotlin.Any
   ↳ androidx.autofill.inline.UiVersions

Defines the inline suggestion UI version constants.

Summary

Nested classes
abstract

Represents the UI content that can be converted into a Slice to be read to render a UI in a remote process.

abstract

Represents a UI style specification that contains the version information and can be converted into a Bundle to be read to render a UI in a remote process.

A builder responsible for providing a Bundle with encoded UI style specifications for one or more versions of UI templates.

Constants
static String

The ID for the version 1 implementation of the inline UI library.

Public methods
static MutableList<String!>
getVersions(@NonNull versionedBundle: Bundle)

The versionedBundle is expected to be generated either by StylesBuilder#build() or Renderer#getSupportedInlineUiVersionsAsBundle().

static UiVersions.StylesBuilder

Returns a new styles builder.

Constants

INLINE_UI_VERSION_1

static val INLINE_UI_VERSION_1: String

The ID for the version 1 implementation of the inline UI library.

Value: "androidx.autofill.inline.ui.version:v1"

Public methods

getVersions

@NonNull static fun getVersions(@NonNull versionedBundle: Bundle): MutableList<String!>

The versionedBundle is expected to be generated either by StylesBuilder#build() or Renderer#getSupportedInlineUiVersionsAsBundle().

Parameters
versionedBundle Bundle: the bundle that encodes the versions information.
Return
MutableList<String!> the list of versions that are both specified in the versionedBundle and supported by the current library.

newStylesBuilder

@NonNull static fun newStylesBuilder(): UiVersions.StylesBuilder

Returns a new styles builder.

See androidx.autofill.inline.v1.InlineSuggestionUi for example usage.