Skip to content
Commit b890523f authored by Daichi Hirono's avatar Daichi Hirono
Browse files

Check LayoutParam before clearing recycled state.

If header view / footer view is added to ListView before setting
adapter, the ListView regards the item count is zero even it has header
/ footer views.

Thus ListView invokes resetList(), and it invokes clearRecycledState() for
header / footer views. But in this method, there is no guarantee the
views has proper layout param.

The CL adds guard to check if the layout param is correct or not. If the
view does not have proepr layout param, it should do nothing because the
view has not been added to the ListView, and the LayoutParam will be
updated when ListView invokes obtainView for the view.

Bug: 65035699
Test: CTS ListViewTest
Change-Id: I4449d4bbcdba8e7cc10ec64d711f937a0f3375ca
parent 6916aad0
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