I was mainly following the advice here: http://stackoverflow.com/questions/3721358/preferenceactivity-save-value-as-integer

It really is kind of a hack, but it's the price we pay for using a ready-made EditTextPreference. I'll add a comment above those two methods.