Button button = new Button(this); // create new button button.Text = "Click me"; // set button text linearLayout.AddView(button); // add button to linear layout
ImageView imageView = new ImageView(this); // create new image view imageView.SetImageResource(Resource.Drawable.my_image); // set image resource linearLayout.AddView(imageView); // add image view to linear layoutThe package library for this function is Android.Widget.