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 {

    @Override
        protected void onCreate(Bundle savedInstanceState) {
        // Have the system blur any 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/

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

Reply via email to