Done!
Although there's no INT type Preference. Here's the way to make sure that
the input for EditTextPreference is a number.

EditText etText =
(EditText)((EditTextPreference)findPreference("NUM_TEXT")).getEditText();
etText.setKeyListener(DigitsKeyListener.getInstance());



On Sat, Nov 7, 2009 at 10:23 PM, Bob Cai <caibo...@gmail.com> wrote:

> I am experiencing the same issue. My app. requires an INT number returned
> from EditTextPreference, any way to make sure that the input for
> EditTextPreference is an INT before it returns to app.?
>
>
> On Fri, Nov 6, 2009 at 8:07 AM, Pierre <pierredur...@gmail.com> wrote:
>
>> With CheckBoxPreference and EditTextPreference, there are only boolean
>> and String preferences.
>> EditTextPreference support input filter, but always save as String.
>> I think we need other save type like : int, float, double, etc ...
>>
>> A native DialogPreference with slide-bar could be great too.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
>> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to