First, in your AndroidManifest.xml file, add:
- Code: Select all
Next, add these lines (or similar) to wherever you're displaying this:
Using java Syntax Highlighting
WindowManager.LayoutParams lp = getWindow().getAttributes();
lp.alpha = 0.8f; // 80% alpha
lp.dimAmount = 0.5f; // Dim by 50%
Parsed in 0.030 seconds, using GeSHi
There is also "FLAG_BLUR_BEHIND", which blurs everything behind it, rather than dimming it.
EDIT: It's probably possible to do these things with a full screen application, like is shown there, but it's not done exactly like that, but hopefully this can point you in the right direction!
EDIT2: Just change "@android:style/Theme.Dialog" to "@android:style/Theme. Translucent" and it will work for full screen.
You might want to add a "requestWindowFeature(Window.FEATURE_NO_TITLE);" in there as well. (Just remember to do so before
setting it as the content view)