I have the screen where I need to open the dialog in full screen but it should be above the bottom tab bar.
The code used to make the dialog appear in whole screen is as follows:
WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
lp.copyFrom(dialog.getWindow().getAttributes());
lp.width = WindowManager.LayoutParams.MATCH_PARENT;
lp.height = WindowManager.LayoutParams.MATCH_PARENT;
dialog.show();
dialog.getWindow().setAttributes(lp);
But this code provides me the dialog in the whole screen hiding the bottom tab bar. Can please anyone help me on this?
As shown in cropped image, I want dialog above the bottom tab bar in full screen.
Try this,
In onCreate use [this will give you screen height]:-
In onResume use [this will give you tab bar height]
Now for our dialog height use [create class variable for screenHeight and tabBarHeight]:-