Make sure all list items know they are in a window.
Bug #2476671

If you had a ListView with a layout_height equals to WRAP_CONTENT, you would
get list children with a parent but not attached to the window. This was caused
by the onMeasure() code: that code was obtaining views from the adapter to
measure them and putting them in the recyler for later reuse. Unfortunately
the recycler assumes that views have been attached to the window but detached
from the parent, thus causing much grief. The fix simply forces measured views
to be added to the window the first time they come out of the recycler.

ListView, bow before me for I am your master!
3 files changed