How do i darken/dim the current screen on click of a button. PLease help me.
WindowManager.LayoutParams lparams = getWindow().getAttributes();
lparams.dimAmount=1.0f;
dialog.getWindow().setAttributes(lparams);
The dim amount 0 means no dimming, and the dim amount 1.0f means complete dimming. Any value in between is the corresponding percentage of dim.
Just add this code to the button you want.