Rabu, 23 Februari 2011

Android Emulator Keyboard Shortcuts


Android Emulator Keyboard Shortcuts


The table below shows android emulator device key and keyboard shortcut key
Android Device KeyKeyboard Shortcut Key
HomeHOME
Menu (left softkey)F2 or Page-up button
Star (right softkey)Shift-F2 or Page Down
BackESC
Call/dial buttonF3
Hangup/end call buttonF4
SearchF5
Power buttonF7
Audio volume up buttonKEYPAD_PLUS, Ctrl-5
Audio volume down buttonKEYPAD_MINUS, Ctrl-F6
Camera buttonCtrl-KEYPAD_5, Ctrl-F3
Switch to previous layout orientation (for example, portrait, landscape)KEYPAD_7, Ctrl-F11
Switch to next layout orientation (for example, portrait, landscape)KEYPAD_9, Ctrl-F12
Toggle cell networking on/offF8
Toggle code profilingF9 (only with -trace startup option)
Toggle fullscreen modeAlt-Enter
Toggle trackball modeF6
Enter trackball mode temporarily (while key is pressed)Delete
DPad left/up/right/downKEYPAD_4/8/6/2
DPad center clickKEYPAD_5
Onion alpha increase/decreaseKEYPAD_MULTIPLY(*) / KEYPAD_DIVIDE(/)
when using keypad key just disable your NumLock and then used it.


Android EditorInfo Go, Search, Done, Next Example


There is always necessity to add extra keys apart from default keys available in virtualQWERTY keyboard. For instance we may need a direct search key by the side of edit text boxin order to have direct triggering of Search actions.
For Instance to add a Search key we need to add this code, so that It may appear in the QWERTY board.
EditTextSample.setImeOptions(EditorInfo.IME_ACTION_SEARCH);

Android Hide Virtual Keyboard through code :

In most situation we are in need to force close the keyboard by pressing the back button. But this can also be done using the following code.

InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(myEditTextName.getWindowToken(), 0);




Tidak ada komentar:

Posting Komentar