Java Code Examples for android.view.KeyEvent#KEYCODE_DPAD_UP_LEFT

The following examples show how to use android.view.KeyEvent#KEYCODE_DPAD_UP_LEFT . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CustomizePlayerView.java    From bcm-android with GNU General Public License v3.0 5 votes vote down vote up
@SuppressLint("InlinedApi")
private boolean isDpadKey(int keyCode) {
    return keyCode == KeyEvent.KEYCODE_DPAD_UP
            || keyCode == KeyEvent.KEYCODE_DPAD_UP_RIGHT
            || keyCode == KeyEvent.KEYCODE_DPAD_RIGHT
            || keyCode == KeyEvent.KEYCODE_DPAD_DOWN_RIGHT
            || keyCode == KeyEvent.KEYCODE_DPAD_DOWN
            || keyCode == KeyEvent.KEYCODE_DPAD_DOWN_LEFT
            || keyCode == KeyEvent.KEYCODE_DPAD_LEFT
            || keyCode == KeyEvent.KEYCODE_DPAD_UP_LEFT
            || keyCode == KeyEvent.KEYCODE_DPAD_CENTER;
}
 
Example 2
Source File: ExoVideoView.java    From ExoVideoView with Apache License 2.0 5 votes vote down vote up
@SuppressLint("InlinedApi")
private boolean isDpadKey(int keyCode) {
    return keyCode == KeyEvent.KEYCODE_DPAD_UP || keyCode == KeyEvent.KEYCODE_DPAD_UP_RIGHT
            || keyCode == KeyEvent.KEYCODE_DPAD_RIGHT || keyCode == KeyEvent.KEYCODE_DPAD_DOWN_RIGHT
            || keyCode == KeyEvent.KEYCODE_DPAD_DOWN || keyCode == KeyEvent.KEYCODE_DPAD_DOWN_LEFT
            || keyCode == KeyEvent.KEYCODE_DPAD_LEFT || keyCode == KeyEvent.KEYCODE_DPAD_UP_LEFT
            || keyCode == KeyEvent.KEYCODE_DPAD_CENTER;
}