commit | 1bf0f75c1a34121eeda65dd83e38357cb2dc7e72 | [log] [tgz] |
---|---|---|
author | Jinsuk Kim <jinsukkim@chromium.org> | Fri Jan 18 00:05:30 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Jan 18 00:05:30 2019 |
tree | 3964d8a92b34f8aa9fc360d69bec3c3134684d35 | |
parent | 2f9e29edea64e2ca098523131bfcaea72e453e74 [diff] |
Implement gesture navigation on Android This CL enables side-wise overscroll gesture to trigger history navigation. Main UI implementation resides in chrome/browser/gesturenav/. They are based on swiperefresh package (org.chromium.third_party .android.swiperefresh), modified to support arrow widget for side gesture, instead of pull-to-refresh with spinning ring. Among the new classes, |SideSlideLayout| is the main FrameLayout that hosts all the UI, and turns the gesture into triggering action. This is used directly by SwipeRefreshHandler which now expands to support side navigation as well as pull-to-refresh action for WebContents. SideSlideLayout is also used by HistoryNavigationLayout. It is inherited by several layout classes for native pages like ntp to support side-wise history navigation under chrome/browser/ntp. chrome/browser/suggestions/SuggestionsRecyclerView was updated for these native pages to support the gesture as intended. The native pages based on HistoryNavigationLayout is supposed to handle TouchEvents that are not processed by its children to do its job, but it does not have chances to process them since the RecyclerView always claims to have handled them. As a workaround, RecyclerView provides an API indicating if it consumed the horizontal gesture or not. This is utilized by HistoryNavigationLayout to respond (or ignore) user gesture to initiate its UI. chrome/browser/feed/FeeNewTabPage also needs to know the similar info from its view hierarchy. This requires a corresponding change https://chromium-review.googlesource.com/c/feed/+/1395377 (WIP) from feed library. Bug: 865567 Binary-Size: Increase needed to implement a feature. Change-Id: Iad92a1105c9888f0d8937c7d45abfe0be542f504 Reviewed-on: https://chromium-review.googlesource.com/c/1249530 Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Reviewed-by: Ted Choc <tedchoc@chromium.org> Reviewed-by: Theresa <twellington@chromium.org> Cr-Commit-Position: refs/heads/master@{#623921}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .