Tabla de botones fisicos del dispositivo Android
A continuación muestro una tabla con 3 columnas, la primera es el nombre del botón, ya sea del emulador o del dispositivo, la segunda es la tecla rápida a introducir con el teclado del ordenador para el acceso a la función como si se pulsara en el dispositivo virtual, mientras que la tercera nos vale para referenciarla en la programación Java,normalmente en el método onOptionsItemSelected (ej: switch (item.getItemId()) { case android.R.id.home return true;)
Emulated Device Key | Keyboard Key | KeyEvent |
Home | HOME | KeyEvent.KEYCODE_HOME |
Menu (left softkey) | F2 or Page-up button | KeyEvent.KEYCODE_MENU |
Star (right softkey) | Shift-F2 or Page Down | |
Back | ESC | KeyEvent.KEYCODE_BACK |
Call/dial button | F3 | |
Hangup/end call button | F4 | |
Search | F5 | KeyEvent.KEYCODE_SEARCH |
Power button | F7 | KeyEvent.KEYCODE_POWER |
Audio volume up button | KEYPAD_PLUS, Ctrl-F5 | KeyEvent.KEYCODE_VOLUMEN_UP |
Audio volume down button | KEYPAD_MINUS, Ctrl-F6 | KEYCODE_VOLUMEN_DOWN |
Camera button | Ctrl-KEYPAD_5, Ctrl-F3 | KeyEvent.KEYCODE_CAMERA |
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/off | F8 | |
Toggle code profiling | F9 (only with -trace startup option) |
|
Toggle fullscreen mode | Alt-Enter | |
Toggle trackball mode | F6 | |
Enter trackball mode temporarily (while key is pressed) |
Delete | |
DPad left/up/right/down | KEYPAD_4/8/6/2 | KeyEvent.KEYCODE_DPAD_UP, KeyEvent.KEYCODE_DPAD_DOWN, KeyEvent.KEYCODE_DPAD_LEFT, KeyEvent.KEYCODE_DPAD_RIGHT |
DPad center click | KEYPAD_5 | KeyEvent.KEYCODE_DPAD_CENTER |
Onion alpha increase/decrease | KEYPAD_MULTIPLY(*) / KEYPAD_DIVIDE(/) | |
Teclado Numérico | KeyEvent. – KEYCODE_0, KEYCODE_1, KEYCODE_2, … , KEYCODE_9 , KEYCODE_A, … , KEYCODE_Z | |
Botón de medios | KEYCODE_HEADSETHOOK |
0 comentarios:
Publicar un comentario