How to display Preferences in a View

Posted by Sybiam on Stack Overflow See other posts from Stack Overflow or by Sybiam
Published on 2011-01-10T00:49:12Z Indexed on 2011/01/10 0:53 UTC
Read the original article Hit count: 231

Filed under:
|

I'm building some sort of wizard to create user accounts in Sync and Manage account. I use a ViewFlipper my activity has to be an AccountAuthenticatorActivity. That said it also means I can't inherit PreferenceActivity.

So I looked up in the code of PreferenceActivity and I believe it should be possible to have a PreferenceView that inherit from ListView. The Activity part of PreferenceActivity isn't really needed as far as I know.

Though the PreferenceManager is what really blocks me.

private PreferenceManager onCreatePreferenceManager() {
    PreferenceManager preferenceManager = new PreferenceManager(this, FIRST_REQUEST_CODE);
    preferenceManager.setOnPreferenceTreeClickListener(this);
    return preferenceManager;
}

This function imply that we can instatiate PreferenceManager using the operator new. Apparently, the sdk hide the constructor of the PreferenceManager. I'm kind of confused.

Is there a way to inflate my preferences and display them without PreferenceActivity?

© Stack Overflow or respective owner

Related posts about android

Related posts about preferences