I'm trying to recreate ListView (and AbsListView) logic, with view recycling. I need this but we can say it's only for understand Android logic.

Suppose my children items are the same (same layout), using fixed height RelativeLayout.

During scrolling, I'm reusing ghost children view and set properties for current item. It's working fine, since I'm using View.offsetTopAndBottom() and invalidate() instead of requesting layout during scroll for optimization.

My problem is updating the children (RelativeLayout).

Depends of item, I want to hide or show ImageView on this item. For that, I'm just using iconImage.setVisibility( GONE ) and iconImage.setVisibility( VISIBLE ).

Since I'm blocking requestLayout, it seems to be setVisibility() does not work properly.

If I use requestLayout, all the tree will measure and layout itself, and it's not a good way for a scrolling user experience.

Is there a way for only request layout on recycle child item ?

Edit
Report