Skip to content

Commit 4280b9a

Browse files
committed
Merge branch 'handle_page_up-down_key_events'
2 parents 4a88174 + cef7f1c commit 4280b9a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

app/src/main/java/fr/gaulupeau/apps/Poche/ui/ReadArticleActivity.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,16 @@ public boolean onOptionsItemSelected(MenuItem item) {
322322

323323
@Override
324324
public boolean dispatchKeyEvent(KeyEvent event) {
325+
switch(event.getKeyCode()) {
326+
case KeyEvent.KEYCODE_PAGE_UP:
327+
scroll(true, screenScrollingPercent, smoothScrolling);
328+
return true;
329+
330+
case KeyEvent.KEYCODE_PAGE_DOWN:
331+
scroll(false, screenScrollingPercent, smoothScrolling);
332+
return true;
333+
}
334+
325335
if(volumeButtonsScrolling) {
326336
switch(event.getKeyCode()) {
327337
case KeyEvent.KEYCODE_VOLUME_UP:

0 commit comments

Comments
 (0)