I have a code like below.
....
PopupWindow popupWindow = new PopupWindow(someView);
final WindowManager.LayoutParams layoutParams = (WindowManager.LayoutParams) popupWindow.getContentView().getLayoutParams();
....
The problem is popupWindow.getContentView (). getLayoutParams returns differnt classes, as shown below, due to which my type does not work
Before Marshamallow: android.View.WindowManager.LayoutParams
For Marshmallow: android.widget.FrameLayout.layoutParams
Has anyone encountered a problem before or any resolutions?
source
share