Skip to content
Commit e28c03b6 authored by Phil Weaver's avatar Phil Weaver
Browse files

Use newest scrap view in ListView

When a ListView's contents change, it first measures, using a view at
position 0. It then scraps that view, and then scraps all of its
other views. Two scrap views thus exist for position 0. Since we were
retrieving the oldest scrap view, we would toggle between two
different views at position 0. This toggling confuses accessibility.

This change takes the newest view from the scap heap, so the view
that was recycled last (which is the one shown on the screen) is
re-used for the screen. The view used for measuring sticks around
and is available for measure again.

Bug: 33788047
Test: I verified that the switch state is announced correctly for
the cases found in the bug.

Change-Id: I936e5ad09c3594e33e80dc39236025bf8bc877b8
parent 4a5ea547
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