custom ViewGroup example?
I think the simplest example to look at is the source for AbsoluteLayout.java
https://github.com/android/platform_frameworks_base/blob/master/core/java/android/widget/AbsoluteLayout.java
You need to override onMeasure to measure the children and onLayout to position them.
I have strikingly more complicated ViewGroup code I can share as well if you want.