Updating the scroll calculation from recyclerView to avoid view inflation
> Updating the LayoutManager's scroll calculation instead of a separate implementation to better support recyclerView's calculations > Caching the view sizes during layout to avoid view-inflation for unknown types > Fixing scrollbar jump during scroll when widget list is expanded > Fixing scrollbar never reaching end when onboarding card is displayed in work tab Bug: 240343082 Test: Verified on device that new views are not inflated Change-Id: Ied11ccf65b053691c5c126c4bf8de306ec24786d
This commit is contained in:
1 parent
676d19c171
commit
20bbe95ddb
12 files changed
+212
-211
No files matched your search
@@ -119,7 +119,6 @@ public class RecyclerViewFastScroller extends View {
|
||||
// prevent jumping, this offset is applied as the user scrolls.
|
||||
protected int mTouchOffsetY;
|
||||
protected int mThumbOffsetY;
|
||||
protected int mRvOffsetY;
|
||||
|
||||
// Fast scroller popup
|
||||
private TextView mPopupView;
|
||||
@@ -207,16 +206,11 @@ public class RecyclerViewFastScroller extends View {
|
||||
|
||||
public void setThumbOffsetY(int y) {
|
||||
if (mThumbOffsetY == y) {
|
||||
int rvCurrentOffsetY = mRv.getCurrentScrollY();
|
||||
if (mRvOffsetY != rvCurrentOffsetY) {
|
||||
mRvOffsetY = mRv.getCurrentScrollY();
|
||||
}
|
||||
return;
|
||||
}
|
||||
updatePopupY(y);
|
||||
mThumbOffsetY = y;
|
||||
invalidate();
|
||||
mRvOffsetY = mRv.getCurrentScrollY();
|
||||
}
|
||||
|
||||
public int getThumbOffsetY() {
|
||||
|
||||
Reference in new issue
Block a user