title: Where to store Android preference keys?
body: <p>When I create preference activity I define all preferences in xml file. Every preference has a key defined in this xml. But when I access preference I write: </p>
  
  <pre><code>SharedPreferences appPreferences = PreferenceManager.getDefaultSharedPreferences(this);
  boolean foo_value = appPreferences.getBoolean("foo_key_defined_in_xml", false);
  </code></pre>
  
  <p>Is there any way to avoid referencing "foo_key_defined_in_xml" in hard-coded way?
  Maybe there is a possibility to reference it in R style way (not to refer to string)?</p>