/** * Returns the layout type for this window. * * @see #setWindowLayoutType(PopupWindow popupWindow, int) */ public static int getWindowLayoutType(PopupWindow popupWindow) { return IMPL.getWindowLayoutType(popupWindow); }
/** * Set the layout type for this window. This value will be passed through to {@link * WindowManager.LayoutParams#type} therefore the value should match any value {@link * WindowManager.LayoutParams#type} accepts. * * @param layoutType Layout type for this window. * @see WindowManager.LayoutParams#type */ public static void setWindowLayoutType(PopupWindow popupWindow, int layoutType) { IMPL.setWindowLayoutType(popupWindow, layoutType); }
/** * Sets whether the popup window should overlap its anchor view when displayed as a drop-down. * * @param overlapAnchor Whether the popup should overlap its anchor. */ public static void setOverlapAnchor(PopupWindow popupWindow, boolean overlapAnchor) { IMPL.setOverlapAnchor(popupWindow, overlapAnchor); }
/** * Returns whether the popup window should overlap its anchor view when displayed as a drop-down. * * @return Whether the popup should overlap its anchor. */ public static boolean getOverlapAnchor(PopupWindow popupWindow) { return IMPL.getOverlapAnchor(popupWindow); }
/** * 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. If there is not enough room on screen to show * the popup in its entirety, this method tries to find a parent scroll view to scroll. If no * parent scroll view can be scrolled, the bottom-left corner of the popup is pinned at the top * left corner of the anchor view. * * <p>If the view later scrolls to move <code>anchor</code> to a different location, the popup * will be moved correspondingly. * * @param popup the PopupWindow to show * @param anchor the view on which to pin the popup window * @param xoff A horizontal offset from the anchor in pixels * @param yoff A vertical offset from the anchor in pixels * @param gravity Alignment of the popup relative to the anchor */ public static void showAsDropDown( PopupWindow popup, View anchor, int xoff, int yoff, int gravity) { IMPL.showAsDropDown(popup, anchor, xoff, yoff, gravity); }