Physical Keyboard Not Working Well With EditText

Liquidkourage

Member
Licensed User
Longtime User
I've got an application in development where at various points in the life cycle, edittext views will show on screen. Using the virtual keyboard on my various test devices all works as expected (I focus the edittext programmatically and use IME to show the keyboard), but when I test using an attached USB keyboard, I get odd results. The edittext still appears focused (highlighted, blinking cursor) and the virtual keyboard doesn't display (which is expected), but when I try to type in the edittext view, nothing appears.

I've found that if I use the Tab key or the down arrow, the edittext "focuses" and the keyboard begins to work properly. Odder still, if I start with text in the edittext, the backspace and delete keys work as expected, but even after I use them, I still can't type text into the view. Also, tapping the edittext to manually assign it focus doesn't alleviate the problem. I'd chalk it up to some other view getting focus, but as I said, the edittext appears to be focused, and I've written test code that indeed confirms that the view's requestfocus method returns True when it's supposed to.

I've tried requesting focus at various points on the edittext, disabling IME, but nothing seems to get around this issue. I've tried 2 different USB keyboards on two different devices, with the same results.

Does anyone have any suggestions on how to get a physical keyboard to play nicely with my views?
 

Liquidkourage

Member
Licensed User
Longtime User
I'm testing on two different 7" tablets running ICS. One is an Archos Arnova, the other is so off-brand I honestly have no idea who the manufacturer is. I'm testing both a Microsoft Arc wireless USB keyboard and a USB keyboard that came with a tablet case I bought online for very little.

I wrote a test app today, containing nothing but a designer-created edittext view, and the wireless keyboard works properly with that app. There must be something going on with my original app's code that I'm not seeing.

Basically, it's a client app for a pub trivia event. A participant will fire up the app, which connects to my server program running on a laptop, and they communicate through TCP sockets. The app will show a loading screen while the connection is being made; once the connection is confirmed, a panel with an edittext and a button appear, which allows the participant to sign in. I wonder if my keyboard issues have anything to do with the constant data being fed to the app through the socket...

Any initial thoughts, or should I try to post some code?
 
Upvote 0
Top