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

PopupProperties


Properties used to customize the behavior of a Popup.

Summary

Public constructors

PopupProperties(
    focusable: Boolean,
    dismissOnBackPress: Boolean,
    dismissOnClickOutside: Boolean,
    securePolicy: SecureFlagPolicy,
    excludeFromSystemGesture: Boolean,
    clippingEnabled: Boolean
)
android
@ExperimentalComposeUiApi
PopupProperties(
    focusable: Boolean,
    dismissOnBackPress: Boolean,
    dismissOnClickOutside: Boolean,
    securePolicy: SecureFlagPolicy,
    excludeFromSystemGesture: Boolean,
    clippingEnabled: Boolean,
    usePlatformDefaultWidth: Boolean
)
android

Public functions

open operator Boolean
equals(other: Any?)
android
open Int
android

Public properties

Boolean

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

android
Boolean

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

android
Boolean

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

android
Boolean

A flag to check whether to set the systemGestureExclusionRects.

android
Boolean

Whether the popup is focusable.

android
SecureFlagPolicy

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

android
Boolean

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

android

Public constructors

PopupProperties

PopupProperties(
    focusable: Boolean = false,
    dismissOnBackPress: Boolean = true,
    dismissOnClickOutside: Boolean = true,
    securePolicy: SecureFlagPolicy = SecureFlagPolicy.Inherit,
    excludeFromSystemGesture: Boolean = true,
    clippingEnabled: Boolean = true
)

PopupProperties

@ExperimentalComposeUiApi
PopupProperties(
    focusable: Boolean = false,
    dismissOnBackPress: Boolean = true,
    dismissOnClickOutside: Boolean = true,
    securePolicy: SecureFlagPolicy = SecureFlagPolicy.Inherit,
    excludeFromSystemGesture: Boolean = true,
    clippingEnabled: Boolean = true,
    usePlatformDefaultWidth: Boolean = false
)

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

Public properties

clippingEnabled

val clippingEnabledBoolean

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.

dismissOnBackPress

val dismissOnBackPressBoolean

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.

dismissOnClickOutside

val dismissOnClickOutsideBoolean

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

excludeFromSystemGesture

val excludeFromSystemGestureBoolean

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

focusable

val focusableBoolean

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

securePolicy

val securePolicySecureFlagPolicy

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

usePlatformDefaultWidth

val usePlatformDefaultWidthBoolean

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