Handling Android preferences without magic strings
<p>Im using Androids <a href="http://developer.android.com/reference/android/preference/PreferenceScreen.html" rel="nofollow">built in way</a> of handling preferences which works by writing all settings in an xml file. It's really nice but I can't find any good way of doing it without using magic strings in the xml and Java code.</p>

<p>The only way I could think of is to save the preference key as String but that doesn't feels right either. Anyone got a good way of solving this?</p>
