I do manage to hack my way out using java reflection. here's my code:
    PreferenceScreen createPreferencesHierarchy(PreferenceManager pm){

        try{
            Class c = Class.forName(pm.getClass().getName());
            Class partype[]=new Class[3];
            partype[0]=Context.class;
            partype[1]=Integer.TYPE;
            partype[2]=PreferenceScreen.class;
            Method m =
c.getDeclaredMethod("inflateFromResource",partype );
            m.setAccessible(true);
            Object arglist[] = new Object[3];
            arglist[0]=this;
            arglist[1]=R.xml.preferences;
            arglist[2]=null;
            Object retobj = m.invoke(pm, arglist);
            return (PreferenceScreen)retobj;
            } catch(Throwable e){
                 Log.e(TAG,e.toString());
                 return null;
         }
     }

Bruce Xia
Founder of Mobisoft Technologies Ltd
www.mobisoft.ca
Easy Call -- Have fun with incoming calls:
https://market.android.com/details?id=com.mobisoft.easycall&feature=search_result
Drivie Talkie -- keep your driving safe and enjoyable
https://market.android.com/details?id=com.mobisoft.CallControl&feature=more_from_developer

On Mar 19, 4:41 am, Mark Murphy <mmur...@commonsware.com> wrote:
> You don't, unless you are building your own firmware, in which case
> you are on the wrong list.
>
>
>
>
>
>
>
>
>
> On Sat, Mar 19, 2011 at 3:01 AM, Bruce Xia <xia...@gmail.com> wrote:
> > hi,
> > I want to use PreferenceManager.inflateFromResource() in my
> > application. It's only available in the full build:
> > framework_intermediates-classes-full-debug.jar
>
> > How can I can use it?
>
> > Thanks,
> > Bruce
>
> > --
> > 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
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Training in Oslo:http://bit.ly/fjBo24

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