Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 94cc29a1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add PageDown, PageUp, End, Home key handler to ScrollView"

parents 6d041675 72716ed6
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -547,6 +547,18 @@ public class ScrollView extends FrameLayout {
                        handled = fullScroll(View.FOCUS_DOWN);
                    }
                    break;
                case KeyEvent.KEYCODE_MOVE_HOME:
                    handled = fullScroll(View.FOCUS_UP);
                    break;
                case KeyEvent.KEYCODE_MOVE_END:
                    handled = fullScroll(View.FOCUS_DOWN);
                    break;
                case KeyEvent.KEYCODE_PAGE_UP:
                    handled = pageScroll(View.FOCUS_UP);
                    break;
                case KeyEvent.KEYCODE_PAGE_DOWN:
                    handled = pageScroll(View.FOCUS_DOWN);
                    break;
                case KeyEvent.KEYCODE_SPACE:
                    pageScroll(event.isShiftPressed() ? View.FOCUS_UP : View.FOCUS_DOWN);
                    break;