我正面临类似的问题,在下面的链接中解释。但解决方案没有公布。请帮忙解决这个问题。
Android M ClassCastException: FrameLayout$LayoutParams cannot be cast to WindowManager$LayoutParams
发布于 2016-04-06 11:40:35
不需要使用DialogActivity。只需再添加一个getParent()来访问容器。
if (android.os.Build.VERSION.SDK_INT > 22) {
container = (View) pwindow.getContentView().getParent().getParent();
}else{
container = (View) pwindow.getContentView().getParent();
}https://stackoverflow.com/questions/36448832
复制相似问题