Fix blank tabs during scrolling in Android horizontal tab switcher
In the Android horizontal tab switcher, we determine which tab thumbnails to render based on the index of the currently-centered tab, as determined by NonOverlappingStack#computeReferenceIndex() (this is a virtual method called by Stack since the logic for updating visibility is shared between the overlapping and non-overlapping tab switchers). We currently have a bug where the tab thumbnails are becoming blank during quick scrolling. This is because the current implementation of this method uses mScrollTarget instead of mScrollOffset to determine the centered tab (basically, mScrollTarget is where we're going and mScrollOffset is where we are, and is actually used for rendering). This CL fixes this bug by updating this method's implementation to use the value returned from getCenteredTabIndex(), which uses mScrollOffset instead of mScrollTarget. Bug: 853879,831359 Change-Id: I129c03ca80297c15b670d223bfc6630b6d8de68c Reviewed-on: https://chromium-review.googlesource.com/1105021Reviewed-by:Matthew Jones <mdjones@chromium.org> Commit-Queue: Ryan Landay <rlanday@chromium.org> Cr-Commit-Position: refs/heads/master@{#568203}
Showing
Please register or sign in to comment