This piece of code works seems to work in android api 16 - 22 but does not work in api 23. I\'m simply trying to display a popupwindow with options in it and dim the backgro
Just add one more .getParent() to access the container.
if (android.os.Build.VERSION.SDK_INT > 22) { container = (View) pwindow.getContentView().getParent().getParent(); }else{ container = (View) pwindow.getContentView().getParent(); }