void SetupUserInterface() { mainLayout = new RelativeLayout(Context); //RelativeLayout.LayoutParams mainLayoutParams = new RelativeLayout.LayoutParams( // RelativeLayout.LayoutParams.MatchParent, // RelativeLayout.LayoutParams.MatchParent); //mainLayout.LayoutParameters = mainLayoutParams; liveView = new TextureView(Context); RelativeLayout.LayoutParams liveViewParams = new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.MatchParent, RelativeLayout.LayoutParams.MatchParent); liveView.LayoutParameters = liveViewParams; mainLayout.AddView(liveView); capturePhotoButton = new PaintCodeButton(Context); RelativeLayout.LayoutParams captureButtonParams = new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.WrapContent, RelativeLayout.LayoutParams.WrapContent); captureButtonParams.Height = 120; captureButtonParams.Width = 120; capturePhotoButton.LayoutParameters = captureButtonParams; mainLayout.AddView(capturePhotoButton); AddView(mainLayout); }
private void SetupUserInterface() { _mainLayout = new RelativeLayout(Context); _liveView = new TextureView(Context); var liveViewParams = new RelativeLayout.LayoutParams(LayoutParams.MatchParent, LayoutParams.MatchParent); _liveView.LayoutParameters = liveViewParams; _mainLayout.AddView(_liveView); _capturePhotoButton = new PaintCodeButton(Context); var captureButtonParams = new RelativeLayout.LayoutParams(LayoutParams.WrapContent, LayoutParams.WrapContent) { Height = 120, Width = 120 }; _capturePhotoButton.LayoutParameters = captureButtonParams; _mainLayout.AddView(_capturePhotoButton); AddView(_mainLayout); }