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

Builder

class Builder
kotlin.Any
   ↳ androidx.window.DisplayFeature.Builder

Builder for DisplayFeature objects.

Summary

Public constructors

Creates an initially empty builder.

Public methods

open DisplayFeature

Creates a DisplayFeature instance with the specified fields.

open DisplayFeature.Builder
setBounds(@NonNull bounds: Rect)

Set the bounds for the DisplayFeature instance.

open DisplayFeature.Builder
setType(type: Int)

Set the type for the DisplayFeature instance.

Public constructors

<init>

Builder()

Creates an initially empty builder.

Public methods

build

@NonNull open fun build(): DisplayFeature

Creates a DisplayFeature instance with the specified fields.

Return
DisplayFeature A DisplayFeature instance.

setBounds

@NonNull open fun setBounds(@NonNull bounds: Rect): DisplayFeature.Builder

Set the bounds for the DisplayFeature instance.

setType

@NonNull open fun setType(type: Int): DisplayFeature.Builder

Set the type for the DisplayFeature instance.