Tweaking the apps list fast scroller.

- Making the view span the full width so that you can grab the scroller on the edge of the screen.
- Offsetting the fast-scoll popup so that you can see it as you scrub.

Change-Id: If1b1934bbeac0660d829cfc29c9e588df927c5e5
This commit is contained in:
Winson Chung
2015-03-16 12:39:05 -07:00
parent c13b994c04
commit aa2ab254ea
14 changed files with 114 additions and 30 deletions
@@ -37,6 +37,8 @@ import java.util.List;
public class AppsContainerRecyclerView extends RecyclerView
implements RecyclerView.OnItemTouchListener {
private static final float FAST_SCROLL_OVERLAY_Y_OFFSET_FACTOR = 1.5f;
private AlphabeticalAppsList mApps;
private int mNumAppsPerRow;
@@ -130,7 +132,7 @@ public class AppsContainerRecyclerView extends RecyclerView
} else {
x = getWidth() - getPaddingRight() - getScrollBarSize() - bgBounds.width();
}
int y = mLastY - bgBounds.height() / 2;
int y = mLastY - (int) (FAST_SCROLL_OVERLAY_Y_OFFSET_FACTOR * bgBounds.height());
y = Math.max(getPaddingTop(), Math.min(y, getHeight() - getPaddingBottom() -
bgBounds.height()));
canvas.translate(x, y);