PopupWindowCompat

public final class PopupWindowCompat


Helper for accessing features in PopupWindow.

Summary

Public constructors

Public methods

static boolean

Returns whether the popup window should overlap its anchor view when displayed as a drop-down.

static int

Returns the layout type for this window.

static void
setOverlapAnchor(@NonNull PopupWindow popupWindow, boolean overlapAnchor)

Sets whether the popup window should overlap its anchor view when displayed as a drop-down.

static void
setWindowLayoutType(@NonNull PopupWindow popupWindow, int layoutType)

Set the layout type for this window.

static void
showAsDropDown(
    @NonNull PopupWindow popup,
    @NonNull View anchor,
    int xoff,
    int yoff,
    int gravity
)

Display the content view in a popup window anchored to the bottom-left corner of the anchor view offset by the specified x and y coordinates.

Public constructors

PopupWindowCompat

public final PopupWindowCompat()

Public methods

getOverlapAnchor

public static boolean getOverlapAnchor(@NonNull PopupWindow popupWindow)

Returns whether the popup window should overlap its anchor view when displayed as a drop-down.

Returns
boolean

Whether the popup should overlap its anchor.

getWindowLayoutType

public static int getWindowLayoutType(@NonNull PopupWindow popupWindow)

Returns the layout type for this window.

setOverlapAnchor

public static void setOverlapAnchor(@NonNull PopupWindow popupWindow, boolean overlapAnchor)

Sets whether the popup window should overlap its anchor view when displayed as a drop-down.

Parameters
boolean overlapAnchor

Whether the popup should overlap its anchor.

setWindowLayoutType

public static void setWindowLayoutType(@NonNull PopupWindow popupWindow, int