views:

17

answers:

1

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?

A: 

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.

Romain Guy