[mono-android] What´s wrong with this piece of code?

Morten Nilsen mortenn at hapro.no
Fri Mar 11 09:22:01 EST 2011


In that case, try this;

List<IDictionary<string, object>> groupData = new List<IDictionary<string, object>>();
List<IList<IDictionary<string, object>>> childData = new List<IList<IDictionary<string, object>>>();
…
Dictionary<string, object> curGroupMap = new Dictionary<string, object>();
…
groupData.Add(curGroupMap);
…
new SimpleExpandableListAdapter(this, groupData, …)
…

This is what I meant when I said you had to make your list agree with using interfaces.

  -- Cheers, Morten


From: monodroid-bounces at lists.ximian.com [mailto:monodroid-bounces at lists.ximian.com] On Behalf Of Carlo Bolz
Sent: Friday, March 11, 2011 2:39 PM
To: monodroid at lists.ximian.com
Subject: Re: [mono-android] What´s wrong with this piece of code?

Hm,

I am not really sure what to do.
I just want to port this example http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/ExpandableList3.html to monodroid.

The problem is that the SimpleExpandableListAdapter want the interfaces for the „groupData“ and „childData“ lists.

            // Now the app dies here
SimpleExpandableListAdapter expListAdapter =
                new SimpleExpandableListAdapter(
                    this, groupData as IList<IDictionary<string, object>>,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/mailman/private/monodroid/attachments/20110311/d4c1a20c/attachment.html 


More information about the Monodroid mailing list