String,

Where did you find the documentation to do this?

I would like to add my own XML attributes to my derived preference and
would like to know how do it.

I considered your's and Kostya's suggestions elsewhere in this thread
and decided to implement a derived PreferenceGroup with an
onPrepareAddPreference method to reset the key.  As it turns out, since
not all of my Preferences are widget-specific (e.g., the "Debug Enabled"
preference is global) I would like to derive my own Preference type and
add an XML attribute to indicate whether it is widget-specific.
Expanding on this technique I can then ask the widget whether it needs
to have its key modified.

...Jake


>>>>> "S" == String  <sterling.ud...@googlemail.com> writes:

   S> In your XML settings-definition file, here's what you need. Just
   S> use: <com.my.package.PrefSubclass

   S>         android:key="pref_key"
   S>         ...
   S>         />

   S> where "com.my.package" is your package name, and PrefSubclass is
   S> the class name of your Preference subclass. Use this instead of:

   S> <EditTextPreference
   S>         android:key="pref_key"
   S>         ...
   S>         />

   S> or whatever Preference class you're basing it off of.

   S> String

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

-- 
Jake Colman -- Android Tinkerer

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