{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

DialogProperties

public final class DialogProperties


Properties used to customize the behavior of a Dialog.

Summary

Public constructors

DialogProperties(
    boolean dismissOnBackPress,
    boolean dismissOnClickOutside,
    @NonNull SecureFlagPolicy securePolicy
)
DialogProperties(
    boolean dismissOnBackPress,
    boolean dismissOnClickOutside,
    @NonNull SecureFlagPolicy securePolicy,
    boolean usePlatformDefaultWidth,
    boolean decorFitsSystemWindows
)

Public methods

boolean
equals(Object other)
final boolean

Sets WindowCompat.setDecorFitsSystemWindows value.

final boolean

whether the dialog can be dismissed by pressing the back button.

final boolean

whether the dialog can be dismissed by clicking outside the dialog's bounds.

final @NonNull SecureFlagPolicy

Policy for setting WindowManager.LayoutParams.FLAG_SECURE on the dialog's window.

final boolean

Whether the width of the dialog's content should be limited to the platform default, which is smaller than the screen width.

int

Public constructors

DialogProperties

public DialogProperties(
    boolean dismissOnBackPress,
    boolean dismissOnClickOutside,
    @NonNull SecureFlagPolicy securePolicy
)

DialogProperties

public DialogProperties(
    boolean dismissOnBackPress,
    boolean dismissOnClickOutside,
    @NonNull SecureFlagPolicy securePolicy,
    boolean usePlatformDefaultWidth,
    boolean decorFitsSystemWindows
)

Public methods

equals

public boolean equals(Object other)

getDecorFitsSystemWindows

public final boolean getDecorFitsSystemWindows()

Sets WindowCompat.setDecorFitsSystemWindows value. Set to false to use WindowInsets. If false, the soft input mode will be changed to WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE and android:windowIsFloating is set to false for Android R and earlier.

getDismissOnBackPress

public final boolean getDismissOnBackPress()

whether the dialog can be dismissed by pressing the back button. If true, pressing the back button will call onDismissRequest.

getDismissOnClickOutside

public final boolean getDismissOnClickOutside()

whether the dialog can be dismissed by clicking outside the dialog's bounds. If true, clicking outside the dialog will call onDismissRequest.

getSecurePolicy

public final @NonNull SecureFlagPolicy getSecurePolicy()

Policy for setting WindowManager.LayoutParams.FLAG_SECURE on the dialog's window.

getUsePlatformDefaultWidth

public final boolean getUsePlatformDefaultWidth()

Whether the width of the dialog's content should be limited to the platform default, which is smaller than the screen width.

hashCode

public int hashCode()