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

PopupProperties

public final class PopupProperties


Properties used to customize the behavior of a Popup.

Summary

Public constructors

PopupProperties(
    boolean focusable,
    boolean dismissOnBackPress,
    boolean dismissOnClickOutside,
    @NonNull SecureFlagPolicy securePolicy,
    boolean excludeFromSystemGesture,
    boolean clippingEnabled
)
@ExperimentalComposeUiApi
PopupProperties(
    boolean focusable,
    boolean dismissOnBackPress,
    boolean dismissOnClickOutside,
    @NonNull SecureFlagPolicy securePolicy,
    boolean excludeFromSystemGesture,
    boolean clippingEnabled,
    boolean usePlatformDefaultWidth
)

Public methods

boolean
equals(Object other)
final boolean

Whether to allow the popup window to extend beyond the bounds of the screen.

final boolean

Whether the popup can be dismissed by pressing the back button.

final boolean

Whether the popup can be dismissed by clicking outside the popup's bounds.

final boolean

A flag to check whether to set the systemGestureExclusionRects.

final boolean

Whether the popup is focusable.

final @NonNull SecureFlagPolicy

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

final boolean

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

int

Public constructors

PopupProperties

public PopupProperties(
    boolean focusable,
    boolean dismissOnBackPress,
    boolean dismissOnClickOutside,
    @NonNull SecureFlagPolicy securePolicy,
    boolean excludeFromSystemGesture,
    boolean clippingEnabled
)

PopupProperties

@ExperimentalComposeUiApi
public PopupProperties(
    boolean focusable,
    boolean dismissOnBackPress,
    boolean dismissOnClickOutside,
    @NonNull SecureFlagPolicy securePolicy,
    boolean excludeFromSystemGesture,
    boolean clippingEnabled,
    boolean usePlatformDefaultWidth
)

Public methods

equals

public boolean equals(Object other)

getClippingEnabled

public final boolean getClippingEnabled()

Whether to allow the popup window to extend beyond the bounds of the screen. By default the window is clipped to the screen boundaries. Setting this to false will allow windows to be accurately positioned. The default value is true.

getDismissOnBackPress

public final boolean getDismissOnBackPress()

Whether the popup can be dismissed by pressing the back button. If true, pressing the back button will call onDismissRequest. Note that focusable must be set to true in order to receive key events such as the back button - if the popup is not focusable then this property does nothing.

getDismissOnClickOutside

public final boolean getDismissOnClickOutside()

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

getExcludeFromSystemGesture

public final boolean getExcludeFromSystemGesture()

A flag to check whether to set the systemGestureExclusionRects. The default is true.

getFocusable

public final boolean getFocusable()

Whether the popup is focusable. When true, the popup will receive IME events and key presses, such as when the back button is pressed.

getSecurePolicy

public final @NonNull SecureFlagPolicy getSecurePolicy()

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

getUsePlatformDefaultWidth

public final boolean getUsePlatformDefaultWidth()

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

hashCode

public int hashCode()