Skip to content Skip to sidebar Skip to footer

Expandablelistview With Viewpager As Child-elements Executes Getchildview Twice

I want to create an expandable list with viewpagers as subviews. The problem is now that with my code it calls the getChildView method twice and thus creates my viewpager twice. I

Solution 1:

In the sub_list.xml the layout_height is "wrap_content". Change it to a fixed height (some dp) or match_parent and it will work.

Reason: wrap_content has to calculate the height of the layout content it has to match thus reloading the layout afterwards -> creating the list more than once.

Post a Comment for "Expandablelistview With Viewpager As Child-elements Executes Getchildview Twice"