I have a preferences.xml that looks like this:
As mbaird pointed out you can't force to store as Float.
But you can change the EditTextPreference
to a plain Preference
view, and implement the click
event for it. This way you will be able to create and show your own Dialog, for edit the value, and thus you can restrict the format and save as Float to the preference file.