コード例 #1
0
        protected override void OnLayout(bool changed, int l, int t, int r, int b)
        {
            base.OnLayout(changed, l, t, r, b);

            if (MainLayout != null)
            {
                var width  = r - l;
                var height = b - t;
                var msw    = MeasureSpec.MakeMeasureSpec(width, MeasureSpecMode.Exactly);
                var msh    = MeasureSpec.MakeMeasureSpec(height, MeasureSpecMode.Exactly);

                MainLayout.Measure(msw, msh);
                MainLayout.Layout(0, 0, width, height);

                CameraSourcePreview.Layout(0, 0, width, height);

                //ControlsBox.Layout(0, 0, width, );
            }
            base.OnLayout(changed, l, t, r, b);
        }