I have a Custom View, that is extend ViewGroup
. It is quite logical that I must implement onLayout method. I've try to look this and this answers, but actually can not understand what I need to do exactly.
Some provisional information :
I have a ViewGroup
and all data passed to this ViewGroup
pass via Adapter
. It very similar to ListView & Adapter
communication mechanism.
My case is the same
When I looked answers for the questions above, I've mentioned that ViewGroup before layouting knows, what the count of children he has.
final int childCount = getChildCount();
In my case I doesn't have any idea how to told ViewGroup
"Hey you have <value>
children!".
So I need probably more explanation of onLayout
implementation manual.