I have an ExpandableListView where the children can be of variable height. My problem is that all of the children take on the height of the longest child that has been viewed.
pic1(Sorry. New user so can’t embed images)
In the above pic; child 1 displays fine first time. Then I view child 2 (which is longer). Now when I view child 1 again it has taken on the longer height of child 2. This will continue with all of the children taking on the height of the longest child viewed.
All heights are set to wrap_content, I’ve also tried fiddling with some of the cache attributes on the ExpandableListView to no avail. If there’s a specific part of the code anyone wants me to post then just shout.
Update I’ve discerned that the problem lies with the webview in the child view. For some reason its height won’t refresh. I’ve tried calling invalidate() on the webview in the ExpandableListAdapter’s getChildView() but to no effect.
This problem is caused by the webview contained in the child view. WebView automatically expands when loaded with longer content, but it doesn’t contract when the content is made shorter.
There is a bug logged against this http://code.google.com/p/android/issues/detail?id=18726