PreferenceActivity with blur behind?

by Ralf » Mon, 22 Dec 2008 09:26:05 GMT

Sponsored Links
 I'm trying to use a PreferenceActivity with prefs inflated from XML
and at the same time I'd like the window to blur whatever was behind
(i.e. my previous activity where I invoked the settings from.) I tried
something like this below but the background is always black (or
whatever color I select) without any blur/transparency.

Is it possible? what am I doing wrong?

public class PrefsActivity extends PreferenceActivity {

        protected void onCreate(Bundle savedInstanceState) {
        // Have the system blur any windows behind this one.


            View content = findViewById(;



PreferenceActivity with blur behind?

by Colin » Thu, 12 Feb 2009 03:02:58 GMT

 Im also interested in learning how to do this... any ideas?


Sponsored Links

PreferenceActivity with blur behind?

by Rohit » Sat, 07 Mar 2009 05:20:26 GMT

 Make sure that the activity you are calling has the theme attribute
set to Theme.Dialog in the Android Manifest as follows:




PreferenceActivity with blur behind?

by Dianne Hackborn » Sat, 07 Mar 2009 05:25:38 GMT

 Or Theme.Translucent.

There is an API demo showing how to do this with an activity in general,
which should be no different than a preference activity.

Dianne Hackborn
Android framework engineer

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.


Other Threads

1. different layout XML files in one application


how to use ( or just is it possible at all ) to use
layout definitions in separate XML files in one application ?

i.e => dynamicly create Views from different XML files as


2. How to connect to a server that runs on a localhost with the same eclipse program as the emulator?

within the emulator, address is a special alias that connects
directly to your development machine's localhost (i.e. you r own


3. Customize look of Menus

4. Expanded and Icon Menu styling

5. TimePicker in a dialog?

6. How to make rows smaller in ListView?

7. CursorTreeAdapter ?