Skip to content

Commit

Permalink
[Carousel] Fixed explore by touch causeing list to scroll
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 506701246
  • Loading branch information
hunterstich authored and dsn5ft committed Feb 3, 2023
1 parent bdb6f5d commit 1a25706
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 68 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -121,18 +121,6 @@ public CarouselLayoutManager(
// TODO(b/238620200): Add and obtain carousel attrs set on RecyclerView
}

@Override
public void onAttachedToWindow(RecyclerView view) {
super.onAttachedToWindow(view);
view.setAccessibilityDelegateCompat(new CarouselAccessibilityDelegate(view));
}

@Override
public void onDetachedFromWindow(RecyclerView view, Recycler recycler) {
super.onDetachedFromWindow(view, recycler);
view.setAccessibilityDelegateCompat(null);
}

@Override
public LayoutParams generateDefaultLayoutParams() {
return new LayoutParams(
Expand Down Expand Up @@ -217,8 +205,11 @@ private void fill(Recycler recycler, State state) {
addViewsStart(recycler, firstPosition - 1);
addViewsEnd(recycler, state, lastPosition + 1);
}
}

// Update the primary fill position from the filled view state.
@Override
public void onLayoutCompleted(State state) {
super.onLayoutCompleted(state);
if (getChildCount() == 0) {
currentFillStartPosition = 0;
} else {
Expand Down

0 comments on commit 1a25706

Please sign in to comment.