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

UiVersions

public final class UiVersions
extends Object

java.lang.Object
   ↳ androidx.autofill.inline.UiVersions


Defines the inline suggestion UI version constants.

Summary

Nested classes

interface UiVersions.Content

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

interface UiVersions.Style

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. 

class UiVersions.StylesBuilder

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

Constants

String INLINE_UI_VERSION_1

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

Public methods

static List<String> getVersions(Bundle versionedBundle)

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

static UiVersions.StylesBuilder newStylesBuilder()

Returns a new styles builder.

Inherited methods

Constants

INLINE_UI_VERSION_1

public static final String INLINE_UI_VERSION_1

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

See also:

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

Public methods

getVersions

public static List<String> getVersions (Bundle versionedBundle)

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

Parameters
versionedBundle Bundle: the bundle that encodes the versions information.

Returns
List<String> the list of versions that are both specified in the versionedBundle and supported by the current library.

newStylesBuilder

public static UiVersions.StylesBuilder newStylesBuilder ()

Returns a new styles builder.

See InlineSuggestionUi for example usage.

Returns
UiVersions.StylesBuilder