android - Using support library v4 fragments in custom DialogPreference -


i'm trying implement custom dialogpreference, layout use fragments. app should support api 10 (which not natively support fragments).

in order work fragments need instance of android.support.v4.fragmentmanager (normally being received support fragmentactivity using getsupportfragmentmanager).

i have no idea how android.support.v4.fragmentmanager within dialogpreference. clue appreciated.

if calling dialog android.support.v4.app.fragmentactivity should able type cast in dialogpreference class, support-fragmentmanager:

(android.support.v4.app.fragmentactivity)getcontext()).getsupportfragmentmanager() 

... if that's not possible, solution launch activity looks dialog, , use fragments there. how open activity preferencescreen?


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -