Reputation: 2585
I've extended ViewGroup to achieve something like a FlowLayout. I put my custom ViewGroup into a ScrollView, dynamically add a bunch of content and it doesn't scroll. The content that flows off the screen is not viewable.
What am I missing, how can I allow my ViewGroup to be compatible with ScrollView?
Upvotes: 2
Views: 1523
Reputation: 98501
Your ViewGroup should have its height set to wrap_content to work properly. This also means you need to implement onMeasure() properly to give your ViewGroup an appropriate height.
Upvotes: 1