Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit bfdeda96 authored by Tony Wickham's avatar Tony Wickham
Browse files

Properly prevent All Apps relayouts by avoiding scrollToPosition

Calling scrollToPosition on RecyclerView internally calls
requestLayout() (to cacluate where to scroll and then go there).
Therefore, we should avoid calling that whenever possible, especially
during transitions. In particular, we can optimize scrollToTop() to not
scrollToPosition() if we are already at the top.

This makes some other workarounds unnecessary, namely setting All Apps
to GONE during system gestures.

Test: Open an app, swipe up, ensure AllAppsRecyclerView doesn't get
onLayout().  If we had scrolled to an app first, we get one layout
in prepareRecentsUi(), but not during the transition.

Bug: 140308849
Change-Id: I62ee341bf5893c121cfc013cc6542559f79d2a42
parent c40872b9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment