Fix issue that expanding only search result led to weird scroll
This piece of code was making list scroll for last item, which doesn't really resolve problem or help for expanding items at end of visible list. As such scrolling only to get last time into visible area doesn't benefit anything (but creates inconsistency). Bug: 371508727 Test: With talkback & screenshot tests Flag: EXEMPT BUGFIX Change-Id: I7ca519edfbb3a18c10fa518e28183da365f740e4
This commit is contained in:
@@ -396,15 +396,6 @@ public class WidgetsListAdapter extends Adapter<ViewHolder> implements OnHeaderC
|
||||
LinearLayoutManager layoutManager = (LinearLayoutManager) mRecyclerView.getLayoutManager();
|
||||
if (layoutManager == null) return;
|
||||
|
||||
if (position == mVisibleEntries.size() - 2
|
||||
&& mVisibleEntries.get(mVisibleEntries.size() - 1)
|
||||
instanceof WidgetsListContentEntry) {
|
||||
// If the selected header is in the last position and its content is showing, then
|
||||
// scroll to the final position so the last list of widgets will show.
|
||||
layoutManager.scrollToPosition(mVisibleEntries.size() - 1);
|
||||
return;
|
||||
}
|
||||
|
||||
// Scroll to the header view's current offset, accounting for the recycler view's padding.
|
||||
// If the header view couldn't be found, then it will appear at the top of the list.
|
||||
layoutManager.scrollToPositionWithOffset(
|
||||
|
||||
Reference in New Issue
Block a user