I am trying to create my own Custom Adapter.
The goal is to call the adapter like this:
List<String> itemLIST = new List<String>(); itemLIST.Add("Hello World");
Adapter1 adapter1 = new Adapter1(context, Android.Resource.Layout.SimpleListItem1, itemLIST);
I now wonder how to construct the: "public Adapter1(....)" I beleive I miss something out in my attempt. The below code is just an extract of the whole adapter.
How do I complete this code correctly?
class Adapter1 : BaseAdapter
{
Context context;
int item = Android.Resource.Layout.SimpleListItem1;
List<String> list1 = new List<String>();
public Adapter1(Context context, int resource, List<String> itemArray)
{
list1 = itemArray;
item = resource;
this.context = context;
}
}