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.

On Fri, Mar 6, 2009 at 1:20 PM, Rohit <[email protected]> wrote:

>
> Make sure that the activity you are calling has the theme attribute
> set to Theme.Dialog in the Android Manifest as follows:
>
> android:theme="@android:style/Theme.Dialog"
>
> Rohit
>
>
> On Feb 11, 7:52 am, Colin <[email protected]> wrote:
> > Im also interested in learning how to do this... any ideas?
> >
> > On Dec 21 2008, 7:25 pm, Ralf <[email protected]> wrote:
> >
> > > I'm trying to use a PreferenceActivity with prefs inflated from XML
> > > and at the same time I'd like the window toblurwhatever was behind
> > > (i.e. my previous activity where I invoked the settings from.) I tried
> > > something like this below but thebackgroundis always black (or
> > > whatever color I select) without anyblur/transparency.
> >
> > > Is it possible? what am I doing wrong?
> >
> > > public class PrefsActivity extends PreferenceActivity {
> >
> > >     @Override
> > >         protected void onCreate(Bundle savedInstanceState) {
> > >         // Have the systemblurany windows behind this one.
> > >
> getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND,
> > >                 WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
> >
> > >                 super.onCreate(savedInstanceState);
> >
> > >                 setTitle(R.string.prefs_title);
> > >                 addPreferencesFromResource(R.xml.prefs);
> >
> > >             View content = findViewById(android.R.id.content);
> > >             content.setBackgroundColor(0x7F000000);
> >
> > >             getListView().setBackgroundColor(0x7F000000);
> > >             getListView().setCacheColorHint(0x7F000000);
> > >         }
> >
> > > }
> >
> > > R/
> >
> >
> >
>


-- 
Dianne Hackborn
Android framework engineer
[email protected]

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.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to