I am fairly new to MonoDroid/Android Development and I was wondering if anyone can point me to a sample or explain how I would go about creating an AlertDialog with a custom ListView?
I need to have a list of names with images. I am able to create an AlertDialog with a list as follows:
List<string> sPeople = new List<string>();
for (int ndx = 0; ndx < od.PeopleAtLoc.Count; ndx++)
{
ObjectPeople d = od.PeopleAtLoc[ndx];
sPeople.Add (d.Name + "\n" + d.Type);
}
string[] stuff = sPeople.ToArray();
new AlertDialog.Builder(this)
.SetTitle("Choose a Person:")
.SetItems(stuff, (sender, args) =>
{
_bInDetails = true;
Intent intent = new Intent(this, typeof(FindAPersonDetailActivity));
intent.PutExtra("PERSON_ID", od.PeopleAtLoc[(int)args.Which].ID);
intent.PutExtra ("PERSON_CITY", od.PeopleAtLoc[(int)args.Which].City);
StartActivity(intent);
})
.Show();
But I really need to have an image associated with each item which is why I was hoping I could use an AlertDialog with a ListView.
Thanks for any help!!