List of usage examples for android.widget PopupWindow setAttachedInDecor
public void setAttachedInDecor(boolean enabled)
This will attach the popup window to the decor frame of the parent window to avoid overlaping with screen decorations like the navigation bar.
From source file:Main.java
@TargetApi(Build.VERSION_CODES.LOLLIPOP_MR1) public static void setPopupUnattachedToDecod(PopupWindow popupWindow) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1) { popupWindow.setAttachedInDecor(false); }/*from w w w .ja v a2 s.c om*/ }