getPreferenceManager() looks like it will return null if you are using
preference headers. My guess is that you are supposed to use the
PreferenceManager from your PreferenceFragments.

On Tue, Jan 31, 2012 at 9:22 AM, Dirk Vranckaert
<[email protected]> wrote:
> I'm trying to implement a fragemented preferences activity.
>
> This is only the first part of my activity where it already fails:
>
> public class PreferencesICSActivity extends PreferenceActivity {
>    @Override
>    protected void onCreate(Bundle savedInstanceState) {
>        super.onCreate(savedInstanceState);
>        PreferenceManager preferenceManager =
> PreferencesICSActivity.this.getPreferenceManager();
>
> preferenceManager.setSharedPreferencesName(Constants.Preferences.PREFERENCES_NAME);
>    }
> ...
> }
>
> I used to do the same in sdk version 7, there it worked. Now however
> the getPreferenceManager() is null...
> What am I doing wrong?
>
> Kr,
>
> Dirk Vranckaert
>
> --
> 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



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

-- 
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