Adding custom setting to PreferenceFragment

view story

http://stackoverflow.com – I have a PreferenceFragment and I need to put custom preferences in it. Now the problems are not the custom preferences themselves, I already extended some DialogPreferences creating my own preferences and I already dealt with saving/restoring data; the problem is how do I add these custom preferences to my PreferenceFragment? I can't declare them in XML (can I?), and I can't find any method to dynamically add them to my PreferenceFragment. (HowTos)