Basically i am having a editText for entering a phone number. now i
want special characters like "(", ")" and "-" to be inserted in the
phone number also i want this characters to be insterted automatically
as the user types the numbers.So I am having a edittext and a
onKeyListener for it and in the public boolean onKey(View view, int
keyCode, KeyEvent event) method i comparing the keycodes i am getting
with KeyEvent.KEYCODE_0, KeyEvent.KEYCODE_1, ... to KeyEvent.KEYCODE_9
and having logic to insert characters like "(" depending on string
length but the problem is my code works fine for most of the devices
but it fails for devices like droid/cliq in landscape mode in this
devices i get the keycode of KeyEvent.KEYCODE_Q, KEYCODE_W, etc when i
type press on any numeric keys how do i fix it. How do i get the
correct key codes in this devices.

Plz help me with this.

Thanks,
Sagar

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