title: How does one declare the type of an Android preference?
body: <p>I have a preferences.xml that looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;PreferenceScreen
    xmlns:android="http://schemas.android.com/apk/res/android"&gt;
   &lt;EditTextPreference
    android:name="Sample"
    android:enabled="true"
    android:persistent="true"
    android:summary="Sample"
    android:defaultValue="3.0"
    android:title="Sample"
    android:key="sample" /&gt;
  &lt;/PreferenceScreen&gt;
  </code></pre>
  
  <p>When I do sp.getString("sample", "3.0"), it works fine and returns a string, but it shouldn't be a string, it should be a float.  Running sp.getFloat("sample", 3.0f) throws a ClassCastException because it is a string.</p>
  
  <p>What should I put in the XML so that the preference is stored as a float?</p>