The second Android 11 Developer Preview is now available, test it out and share your feedback.

DeviceState.Builder

public static class DeviceState.Builder
extends Object

java.lang.Object
   ↳ androidx.window.DeviceState.Builder


Builder for DeviceState objects.

Summary

Public constructors

DeviceState.Builder()

Creates an initially empty builder.

Public methods

DeviceState build()

Creates a DeviceState instance with the specified fields.

DeviceState.Builder setPosture(int posture)

Set the posture for the DeviceState instance.

Inherited methods

Public constructors

DeviceState.Builder

public DeviceState.Builder ()

Creates an initially empty builder.

Public methods

build

public DeviceState build ()

Creates a DeviceState instance with the specified fields.

Returns
DeviceState A DeviceState instance.

setPosture

public DeviceState.Builder setPosture (int posture)

Set the posture for the DeviceState instance.

Parameters
posture int

Returns
DeviceState.Builder