PopupWindow 无法覆盖状态栏和导航栏的问题解决

popupWindow.setClippingEnabled(false);
popupWindow.showAtLocation(getWindow().getDecorView(), Gravity.BOTTOM, 0, 0);
下边是源码

/**
     * 

Allows 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.

* *

If the popup is showing, calling this method will take effect only * the next time the popup is shown or through a manual call to one of * the {@link #update()} methods.

* * @param enabled false if the window should be allowed to extend outside of the screen 如果允许窗口延伸到屏幕外,则为false * @see #isShowing() * @see #isClippingEnabled() * @see #update() */ public void setClippingEnabled(boolean enabled) { mClippingEnabled = enabled; }

你可能感兴趣的:(PopupWindow 无法覆盖状态栏和导航栏的问题解决)