UiVersions

@RequiresApi(api = Build.VERSION_CODES.R)
class UiVersions


Defines the inline suggestion UI version constants.

Summary

Nested types

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

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

const String!
INLINE_UI_VERSION_1 = "androidx.autofill.inline.ui.version:v1"

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

Public functions

java-static (Mutable)List<String!>
getVersions(versionedBundle: Bundle)

The versionedBundle is expected to be generated either by build or getSupportedInlineUiVersionsAsBundle.

java-static UiVersions.StylesBuilder

Returns a new styles builder.

Constants

INLINE_UI_VERSION_1

Added in 1.1.0
const val INLINE_UI_VERSION_1 = "androidx.autofill.inline.ui.version:v1": String!

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

Public functions

getVersions

Added in 1.1.0
java-static fun getVersions(versionedBundle: Bundle): (Mutable)List<String!>

The versionedBundle is expected to be generated either by build or getSupportedInlineUiVersionsAsBundle.

Parameters
versionedBundle: Bundle

the bundle that encodes the versions information.

Returns
(Mutable)List<String!>

the list of versions that are both specified in the versionedBundle and supported by the current library.

newStylesBuilder

Added in 1.1.0
java-static fun newStylesBuilder(): UiVersions.StylesBuilder

Returns a new styles builder.

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