List of usage examples for android.view KeyEvent KEYCODE_BUTTON_L2
int KEYCODE_BUTTON_L2
To view the source code for android.view KeyEvent KEYCODE_BUTTON_L2.
Click Source Link
From source file:com.aengbee.android.leanback.ui.PlaybackOverlayActivity.java
@Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BUTTON_R1) { getMediaController().getTransportControls().skipToNext(); return true; } else if (keyCode == KeyEvent.KEYCODE_BUTTON_L1) { getMediaController().getTransportControls().skipToPrevious(); return true; } else if (keyCode == KeyEvent.KEYCODE_BUTTON_L2) { getMediaController().getTransportControls().rewind(); } else if (keyCode == KeyEvent.KEYCODE_BUTTON_R2) { getMediaController().getTransportControls().fastForward(); }/*w w w . j a va 2 s.c om*/ return super.onKeyDown(keyCode, event); }