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

DisplayFeature.Builder

public static class DisplayFeature.Builder
extends Object

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


Builder for DisplayFeature objects.

Summary

Public constructors

DisplayFeature.Builder()

Creates an initially empty builder.

Public methods

DisplayFeature build()

Creates a DisplayFeature instance with the specified fields.

DisplayFeature.Builder setBounds(Rect bounds)

Set the bounds for the DisplayFeature instance.

DisplayFeature.Builder setType(int type)

Set the type for the DisplayFeature instance.

Inherited methods

Public constructors

DisplayFeature.Builder

public DisplayFeature.Builder ()

Creates an initially empty builder.

Public methods

build

public DisplayFeature build ()

Creates a DisplayFeature instance with the specified fields.

Returns
DisplayFeature A DisplayFeature instance.

setBounds

public DisplayFeature.Builder setBounds (Rect bounds)

Set the bounds for the DisplayFeature instance.

Parameters
bounds Rect

Returns
DisplayFeature.Builder

setType

public DisplayFeature.Builder setType (int type)

Set the type for the DisplayFeature instance.

Parameters
type int

Returns
DisplayFeature.Builder