Can anyone tell me what is wrong with this? Im trying to do this for the first time so I suppose it must be something unbelievably stupid.. :D Thanks for any help ;)
XML: ScrollView xmlns:p1="http://schemas.android.com/apk/res/android" p1:minWidth="25px" p1:minHeight="25px" p1:layout_width="match_parent" p1:layout_height="match_parent" p1:id="@+id/scrollView1"> ListView p1:minWidth="25px" p1:minHeight="25px" p1:layout_width="match_parent" p1:layout_height="match_parent" p1:id="@+id/listAbsence" /ScrollView
Code:
string[] items = new string[] { "Option 1", "Option 2", "Option 3", "Option 4", "Option 5" };
ArrayAdapter lol = new ArrayAdapter (this, Android.Resource.Layout.SimpleListItemMultipleChoice, items);
ListView lv = FindViewById(Resource.Id.listAbsence);
lv.ChoiceMode = Android.Widget.ChoiceMode.Multiple; lv.Adapter = lol;
It throws Instance of the object-error at Choice mode setting..