Just installed the android sdk on my macbook pro. I created a virtual device, allotted 50mb worth of memory in android 3.0. I ran the emulator, and Android_ displays on the left, but the keyboard interface does not display on the right. I have hw.keyboard.lid enabled. Not sure if that has anything to do with it.
Android provides no direct way to determine if the keyboard is open, so we have to get a little creative. The View class has a handy method called getWindowVisibleDisplayFrame from which we can retrieve a rectangle which contains the portion of the view visible to the user.
To be able to open it anywhere, you go into the settings for the keyboard and check the box for 'permanent notification'. It will then keep an entry in the notifications which you can tap to bring up the keyboard at any point.
This is how to make emulator to show soft keyboard:
Device settings > Language and Input > Default > Hardware (Physical Keyboard) > set to Off
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With