• Andrew Xu's avatar
    Provide feedback for pinning app - part 1 · aec33eab
    Andrew Xu authored
    To solve the issue 1012772, we need to implement an interface to
    scroll the shelf view to show the icon for a given app id. This CL
    provides the following helper functions:
    (1) Calculates the offset distance of scrolling Shelf to the
    previous/next page.
    (2) Calculates the layout strategy for the given scroll distance.
    (3) Calculates the first/last tappable app indices for the given
    layout strategy and scroll offset.
    
    No UI changes should be introduced by this CL.
    
    Bug: 1012772
    Change-Id: I3aa27d0fa035f9a9a3186bbe9963065afe465f89
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1762558Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
    Commit-Queue: Andrew Xu <andrewxu@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#715870}
    aec33eab
scrollable_shelf_view.cc 63.1 KB