Add page down/page up hardware detection (#1212)
* Added page down and page up key event. Have it always on since page down and page up buttons are only on readers or keyboards * moved code to different method * added spaces back to comments
This commit is contained in:
parent
aff51f8af1
commit
80996ea63e
1 changed files with 2 additions and 0 deletions
|
@ -218,6 +218,8 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>() {
|
||||||
KeyEvent.KEYCODE_DPAD_LEFT -> viewer?.moveLeft()
|
KeyEvent.KEYCODE_DPAD_LEFT -> viewer?.moveLeft()
|
||||||
KeyEvent.KEYCODE_DPAD_DOWN -> viewer?.moveDown()
|
KeyEvent.KEYCODE_DPAD_DOWN -> viewer?.moveDown()
|
||||||
KeyEvent.KEYCODE_DPAD_UP -> viewer?.moveUp()
|
KeyEvent.KEYCODE_DPAD_UP -> viewer?.moveUp()
|
||||||
|
KeyEvent.KEYCODE_PAGE_DOWN -> viewer?.moveDown()
|
||||||
|
KeyEvent.KEYCODE_PAGE_UP -> viewer?.moveUp()
|
||||||
KeyEvent.KEYCODE_MENU -> toggleMenu()
|
KeyEvent.KEYCODE_MENU -> toggleMenu()
|
||||||
else -> return super.onKeyUp(keyCode, event)
|
else -> return super.onKeyUp(keyCode, event)
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue