Why not just cast it to an integer after you get the value.
Integer.valueOf(YourString); From: [email protected] [mailto:[email protected]] On Behalf Of John Lussmyer Sent: Wednesday, January 05, 2011 2:26 PM To: [email protected] Subject: [android-developers] Preference data types Is there any way to have a Preference be an Integer? I'm using an EditTextPreference, with android:inputType="number", and as far as I can tell, it's still saving the preference value as a String. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

