Simplifying fast scroller logic

> Using a separate view for drawing the popup. This allows us to use elevation
  property instead of drawing the shadow as bitmap.
> During the thumb animation, invalidating the full track width, instead of
  invalidating the track and thumb separately.
> The thumb path is calculated at 0,0 and drawn using canvas.translate().
   This avoids recalculating the path on every scroll.

Change-Id: I48741e5b4432df0d939016db284d7aaf52cc2aa6
This commit is contained in:
Sunny Goyal
2016-10-08 17:43:48 -07:00
parent 631ffbda64
commit 5d9fb0e92f
10 changed files with 203 additions and 368 deletions

View File

@@ -272,7 +272,7 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
// IF scroller is at the very top OR there is no scroll bar because there is probably not
// enough items to scroll, THEN it's okay for the container to be pulled down.
if (mAppsRecyclerView.getScrollBar().getThumbOffset().y <= 0) {
if (mAppsRecyclerView.getScrollBar().getThumbOffsetY() <= 0) {
return true;
}
return false;