Cheesebaron.HorizontalPager.HorizontalPager.OnLayout C# (CSharp) Method

OnLayout() protected method

protected OnLayout ( bool changed, int l, int t, int r, int b ) : void
changed bool
l int
t int
r int
b int
return void
        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;
                }
            }
        }