List of usage examples for android.view KeyEvent KEYCODE_BUTTON_R2
int KEYCODE_BUTTON_R2
To view the source code for android.view KeyEvent KEYCODE_BUTTON_R2.
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(); }/*from w w w . ja v a2 s . c o m*/ return super.onKeyDown(keyCode, event); }