title: PreferenceActivity display/edit the values of a domain object
body: <p>Given this code, how do I get the values from the checkbox- and textpreference and store them in the domain object?</p>
  
  <pre><code>public class MonitorPreferences extends PreferenceActivity {
      private PersistenceManager pm;
      private Monitor monitor;
      private boolean mActive;
      private String mName;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          pm = new PersistenceManager(getApplicationContext());
          addPreferencesFromResource(R.xml.monitors_pref);
  
          fetchDomainObject();
      }
  
      private void fetchDomainObject() {  
          monitor =  pm.fetchMonitor(getIntent().getLongExtra(SuperListActivity.EXTRA_KEY_MONITOR_ID, -1));
      }
  
      private void persistDomainObject(Monitor monitor) {
          pm.persist(monitor);
      }
  }
  </code></pre>
  
  <hr>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  
      &lt;PreferenceCategory android:title="General"&gt;
          &lt;CheckBoxPreference
              android:key="active_chkbox"
              android:title="Active"
              android:defaultValue="true"
              android:persistent="false"/&gt;
          &lt;EditTextPreference
              android:key="name_txt"
              android:dependency="active_chkbox"
              android:title="Name"
              android:summary="Enter a name"
              android:dialogTitle="Enter a name"
              android:dialogMessage="Enter a name"
              android:defaultValue="John Doe"
              android:persistent="false"/&gt;
      &lt;/PreferenceCategory&gt;
  &lt;/PreferenceScreen&gt;
  </code></pre>
  
  <p><em><strong>Original question: Creating a normal Activity with the look and feel of a PreferenceActivity</em></strong>
  My goal is to edit the variables of a domain object from an Activity with the look and feel of stock android preferences. What's the easiest way of accomplishing this?</p>
  
  <p>Would it be possible to create a a PreferenceActivity and somehow modify it to display/edit the values of a domain object instead of the values from SharedPreferences?</p>