Sorry, yes EditTextPreference is what I was thinking. That and
ListPreference is what was hanging me up.
I ended up doing as you and others have mentioned and stored the values
as strings.
> Can you point to where you saw that? The doc for Preferences says:
> "It is up to the subclass to deci
On Thu, Sep 16, 2010 at 2:43 PM, Chris Greenman wrote:
> I believe I remember reading somewhere that Preferences can only be saved
> as a String.
>
Can you point to where you saw that? The doc for Preferences says:
"It is up to the subclass to decide how to store the value."
and, for example, Ch
I believe I remember reading somewhere that Preferences can only be
saved as a String. I ran into this myself and just saved it as a
string and parsed the value out I needed. Also I believe the "numeric"
attribute is deprecated in favor of inputType.
On Thu, 2010-09-16 at 09:49 -0700, Laimona
On Thu, Sep 16, 2010 at 11:49 AM, Laimonas wrote:
> later trying to getInt("SomeKey") on preferences object I always get
> java.lang.ClassCastException:
> java.lang.String.
>
Why don't you just getString() then Integer.parse() it?
---
Hi,
Is there a way how I can tell the Preference Activity that value
should be saved as integer? So far my all values are saved as
strings... I can limit input to integers via XML easy:
but it is still saved as string and later trying to getInt("SomeKey")
on preferences object I always get java
5 matches
Mail list logo