Example usage for android.widget PopupWindow setAttachedInDecor

List of usage examples for android.widget PopupWindow setAttachedInDecor

Introduction

In this page you can find the example usage for android.widget PopupWindow setAttachedInDecor.

Prototype

public void setAttachedInDecor(boolean enabled) 

Source Link

Document

This will attach the popup window to the decor frame of the parent window to avoid overlaping with screen decorations like the navigation bar.

Usage

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*/
}