On Wed, Jan 5, 2011 at 2:25 PM, John Lussmyer <[email protected]> wrote:
> 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.

A Preference can be an integer. An EditTextPreference cannot.

Here is an example of a project implementing a ColorPreference that
stores its value as an integer:

https://github.com/commonsguy/cwac-colormixer

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
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

Reply via email to