Your question is probably not so much how to populate a preference fragment from XML but more how to add an XML resource to a dot42 project and how to reference it.
You add an XML resource by adding an XML file to your Visual Studio (dot42) project as you would normally do; this is no different from adding an XML file to a non-dot42 project. Next, go to the properties of the file and set BuildAction to XmlResource.
Note that dot42 has no folder structure requirement (such as /res/xml/).
When you now compile again and type "R." you will see intellisence coming up with R.Xmls.
If you take a look at R.cs (under Properties), you will see it now includes R.Xmls with a generated member for your XML resource:
//------------------------------------------------------------------------------
// This file is automatically generated by dot42
//------------------------------------------------------------------------------
namespace PreferenceFragmentSample
{
using System;
public sealed class R
{
public sealed class Layouts
{
public const int MainLayout = 0x7f020000;
}
public sealed class Xmls
{
public const int preferences = 0x7f030000;
}
}
}