[android-developers] Re: Possible IMF issue for existing applications
Hi Tom, that works ok mPin.setKeyListener(DigitsKeyListener.getInstance(0123456789)); but I need ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ; it even works with the command above, but it starts the softkeyboard with the Numeric Field.(even i can choose to go to the alphabetic keyboad) How can i make my keylistener to my needs OR just say the softkeyboard should show the alphabetic Keyboard first! Thanks Chris --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Possible IMF issue for existing applications
The problem is that android:inputType was introduced in 1.5 and is off-limits for application that need to retain compatibility with 1.1 during transition in the existing user base. My workaround was to attach the digits listener in code and not through the XML, like so: mPin.setKeyListener(new DigitsKeyListener.getInstance()); These also work: mPin.setKeyListener(DigitsKeyListener.getInstance(0123456789)); mPin.setKeyListener(new DigitsKeyListener(false, false)); whereas this does not: android:digits=0123456789 I didn't have time when I first posted, but I just read the source code and the cause of the bug is probably related to work done in the TextView constructor, in particular the suspicious looking second line below: mInput = DigitsKeyListener.getInstance(digits.toString()); mInputType = inputType; comparing that to the work done when you explicitly set a KeyListener it looks like something's missing. Tom. 2009/4/30 Simon simon.drab...@gmail.com Pretty sure adding android:inputType=number will fix your issue. You may also need to add: android:windowSoftInputMode=stateVisible|adjustResize as an attribute of the activity section of AndroidManifest.xml -- Simon On Apr 27, 11:37 pm, Tom Gibara m...@tomgibara.com wrote: I just tried this in the 1.5 r1 release and it remains non-functional, so I'm assuming it's a bug: http://code.google.com/p/android/issues/detail?id=2525 Tom. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Possible IMF issue for existing applications
I achieved backward compatibility with the following attribute: android:numeric=integer The soft keyboard opens just fine, with the digits in the top row. Peli www.openintents.org On Apr 30, 12:47 pm, Tom Gibara m...@tomgibara.com wrote: The problem is that android:inputType was introduced in 1.5 and is off-limits for application that need to retain compatibility with 1.1 during transition in the existing user base. My workaround was to attach the digits listener in code and not through the XML, like so: mPin.setKeyListener(new DigitsKeyListener.getInstance()); These also work: mPin.setKeyListener(DigitsKeyListener.getInstance(0123456789)); mPin.setKeyListener(new DigitsKeyListener(false, false)); whereas this does not: android:digits=0123456789 I didn't have time when I first posted, but I just read the source code and the cause of the bug is probably related to work done in the TextView constructor, in particular the suspicious looking second line below: mInput = DigitsKeyListener.getInstance(digits.toString()); mInputType = inputType; comparing that to the work done when you explicitly set a KeyListener it looks like something's missing. Tom. 2009/4/30 Simon simon.drab...@gmail.com Pretty sure adding android:inputType=number will fix your issue. You may also need to add: android:windowSoftInputMode=stateVisible|adjustResize as an attribute of the activity section of AndroidManifest.xml -- Simon On Apr 27, 11:37 pm, Tom Gibara m...@tomgibara.com wrote: I just tried this in the 1.5 r1 release and it remains non-functional, so I'm assuming it's a bug: http://code.google.com/p/android/issues/detail?id=2525 Tom. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Possible IMF issue for existing applications
Thanks for that tip, the android:numeric attribute must have just passed me by. I much prefer defining input constraints declaratively where I can. Tom. 2009/4/30 Peli peli0...@googlemail.com I achieved backward compatibility with the following attribute: android:numeric=integer The soft keyboard opens just fine, with the digits in the top row. Peli www.openintents.org On Apr 30, 12:47 pm, Tom Gibara m...@tomgibara.com wrote: The problem is that android:inputType was introduced in 1.5 and is off-limits for application that need to retain compatibility with 1.1 during transition in the existing user base. My workaround was to attach the digits listener in code and not through the XML, like so: mPin.setKeyListener(new DigitsKeyListener.getInstance()); These also work: mPin.setKeyListener(DigitsKeyListener.getInstance(0123456789)); mPin.setKeyListener(new DigitsKeyListener(false, false)); whereas this does not: android:digits=0123456789 I didn't have time when I first posted, but I just read the source code and the cause of the bug is probably related to work done in the TextView constructor, in particular the suspicious looking second line below: mInput = DigitsKeyListener.getInstance(digits.toString()); mInputType = inputType; comparing that to the work done when you explicitly set a KeyListener it looks like something's missing. Tom. 2009/4/30 Simon simon.drab...@gmail.com Pretty sure adding android:inputType=number will fix your issue. You may also need to add: android:windowSoftInputMode=stateVisible|adjustResize as an attribute of the activity section of AndroidManifest.xml -- Simon On Apr 27, 11:37 pm, Tom Gibara m...@tomgibara.com wrote: I just tried this in the 1.5 r1 release and it remains non-functional, so I'm assuming it's a bug: http://code.google.com/p/android/issues/detail?id=2525 Tom. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Possible IMF issue for existing applications
Pretty sure adding android:inputType=number will fix your issue. You may also need to add: android:windowSoftInputMode=stateVisible|adjustResize as an attribute of the activity section of AndroidManifest.xml -- Simon On Apr 27, 11:37 pm, Tom Gibara m...@tomgibara.com wrote: I just tried this in the 1.5 r1 release and it remains non-functional, so I'm assuming it's a bug:http://code.google.com/p/android/issues/detail?id=2525 Tom. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Possible IMF issue for existing applications
I just tried this in the 1.5 r1 release and it remains non-functional, so I'm assuming it's a bug: http://code.google.com/p/android/issues/detail?id=2525 Tom. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---