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

Skip to content
Commit 9e7c7d7b authored by Chet Haase's avatar Chet Haase
Browse files

ListView transient state fix

ListView child views with transientState (setHasTransientState(true)) are not
handled correctly when the data set changes, such as when an item is added
or removed. The problem is that the transient views are cached by their
position, but this position is out of sync between the ListView and the adapter
until the ListView layout process is complete.

A better way, which unfortunately only works on ListViews with stable IDs, is
to cache the views by their itemID instead, and to use that ID to determine when
and where to reuse/retrieve a transient view during the ListView layout.

Issue #8254775 View.setHasTransient state has side-effects when deleting content in ListView

Change-Id: Ic3b1669ed79dd6cf9e4c1c6c26f9d75ccf074b3e
parent 6eeb41cf
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