protected override void OnLayout(bool changed, int l, int t, int r, int b)
{
int childLeft = 0;
int count = this.ChildCount;
for (int i = 0; i < count; i++)
{
View child = GetChildAt(i);
if (child.Visibility != ViewStates.Gone)
{
int childWidth = child.MeasuredWidth;
child.Layout(childLeft, 0, childLeft + childWidth, child.MeasuredHeight);
childLeft += childWidth;
}
}
}