title: Create AttributeSet programmatically
body: <p>I want to create programmatically Preferences from Xml attributes (the xml generated programmatically too)</p>
  
  <p>For example</p>
  
  <pre><code>pref=new CheckBoxPreference(Context context, AttributeSet attrs)
  </code></pre>
  
  <p>Seems that would do it but I don't see how to construct the AttributeSet from some arbitrary xml text. Is that possible?</p>