views:

203

answers:

1

I would like to be able to either blur or dim the background when I show my popupwindow using popup.showAtLocation, and unblur/dim the background when popup.dismiss is called.

I have tried applying layout params FLAG_BLUR_BEHIND and FLAG_DIM_BEHIND to my activity, and this appears to just blur and dim the background as soon my app is started.

Any suggestions?

A: 

You can use android:theme="@android:style/Theme.Dialog" to do that. Create an activity and in your AndroidManifest.xml define the activity as:

    <activity android:name=".activities.YourActivity"
              android:label="@string/your_activity_label"
              android:theme="@android:style/Theme.Dialog">
Macarse
This doesn't seem to do the trick. I applied to this to my only activity, which is in the background when I show a popup window which is just an inflated layout I have, and not a separate activity.How do I apply FLAG_BLUR_BEHIND to a PopupWindow?
k_day