June 24, 2011

How to Remove Dull Background on Active Android Application

While running progress dialog the screen becomes dull. In order to avoid that blur the following code will helpful.

Here i am applying properties to our progress dialog. In this example "lp.dimAmount:" is the attribute to set the dim amount .

pdlg = ProgressDialog.show(getParent(), "", "Loading..");
//Setting the properties
WindowManager.LayoutParams lp = pdlg.getWindow().getAttributes();
lp.dimAmount=0.0f;
//Applying to the screen
pdlg.getWindow().setAttributes(lp);

No comments:

Post a Comment