string[] items = { "Apples", "Bananas", "Oranges" }; var adapter = new global::org.xmlvm._nArrayAdapter(this, items); listView.Adapter = adapter;
Java.Lang.Object[] items = { new Java.Lang.Double(3.14), new Java.Lang.Integer(42), new Java.Lang.String("Hello") }; var adapter = new global::org.xmlvm._nArrayAdapterIn this example, we create an array of Java.Lang.Objects, which can hold any type of object. We create an adapter using this array, and set the ListView's adapter to this adapter. This will display the three objects in the ListView: a Double, an Integer, and a String. Overall, the global::org.xmlvm._nArrayAdapter is a useful tool for displaying arrays from Java or Objective-C code in C# or .NET, and is part of the XMLVM library package.(this, items); listView.Adapter = adapter;