Where your preference class needs to have the standard constructor, just
like with views:
public class MyPreferenceCategory extends PreferenceCategory {
public MyPreferenceCategory(Context context, AttributeSet attrs) {
super(context, attrs);
}
}
And here is another useful override:
http://developer.android.com/reference/android/preference/PreferenceGroup.html#onPrepareAddPreference(android.preference.Preference
)
onPrepareAddPreference
-- Kostya
2011/5/27 String <[email protected]>
> In your XML settings-definition file, here's what you need. Just use:
>
> <com.my.package.PrefSubclass
> android:key="pref_key"
> ...
> />
>
> where "com.my.package" is your package name, and PrefSubclass is the class
> name of your Preference subclass. Use this instead of:
>
> <EditTextPreference
> android:key="pref_key"
> ...
> />
>
> or whatever Preference class you're basing it off of.
>
> String
>
> --
> 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
>
--
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