Add swipe detection to views based lock screen note action button |
||
Issue descriptionSwiping the note action button in the lock screen UI is supposed to launch a lock screen note taking app. This works fine in web ui based lock screen, but is still unimplemented in the views based lock screen. For views base lock screen, the note action is implemented as an image button, which, as a view has OnGestureEvent method that gets called when gestures are detected in that view. There are two problems, though: 1. The note action is located in top right corner, and swipe direction is expected to be bottom-left. Currently, gesture detector used by views only detects swipe gestures in one of the following directions: [top, right, bottom, left]. This means that gestures the note action button is interested in go unnoticed. 2. Size of the note action button is such that only the starting swipe point is on top of it - the gesture will end outside the button bounds. Consequentially, the button will not receive the gesture event.
,
Oct 4 2017
OK, I think for 1. we could just use fling gesture to trigger the action (which is reported regardless of the gesture direction) instead of swipe.
,
Oct 4 2017
For 2, I was wrong - the button can receive gesture events - it just has to mark the scroll_begin event as handled (and thus become target for the rest of the current gesture events).
,
Oct 10 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/51c4bc1252170d459ed0f7122170850dc205cf09 commit 51c4bc1252170d459ed0f7122170850dc205cf09 Author: Toni Barzic <tbarzic@google.com> Date: Tue Oct 10 02:31:50 2017 Launch note taking app when the user flings from the button Adds fling gesture handling to note action launch button. BUG= 771400 Change-Id: I7c041be4e09176a8e5e43f8a3eaf579aa73ef2cc Reviewed-on: https://chromium-review.googlesource.com/701588 Commit-Queue: Toni Barzic <tbarzic@chromium.org> Reviewed-by: Jacob Dufault <jdufault@chromium.org> Cr-Commit-Position: refs/heads/master@{#507574} [modify] https://crrev.com/51c4bc1252170d459ed0f7122170850dc205cf09/ash/login/ui/note_action_launch_button.cc [modify] https://crrev.com/51c4bc1252170d459ed0f7122170850dc205cf09/ash/login/ui/note_action_launch_button_unittest.cc
,
Oct 10 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by tbuckley@google.com
, Oct 4 2017