I am trying to make ImageView dynamically and add it into a LinearLayout. But I can hardly get it working.. Here is my code:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/layoutBase">
</LinearLayout>
LinearLayout linearLayout = activity.FindViewById<LinearLayout> (Resource.Id.layoutBase);
ImageView image = new ImageView (); // what should I put in as an input?
linearLayout.AddView(image);
image.Width = "fill_parent"; // read only error
image.Height = "fill_parent"; // read only error
image.SetX (10);
image.SetY (10);
image.Visibility = false; // read only error
What should I put in to ImageView constructor as an input? And how can I set its width and height as "fill_parent" and zero visivility?