[mono-android] [***SPAM*** Score/Req: 05.5/5.0] Re: What´s wrong with this piece of code?

Carlo Bolz cb at dm-edv.de
Fri Mar 11 10:23:51 EST 2011


Thank you Morton, that does nearly the job. But now the application closes with „Sorry, the application closes unexpected“.

 

Regards,

Carlo

 

Von: monodroid-bounces at lists.ximian.com [mailto:monodroid-bounces at lists.ximian.com] Im Auftrag von Morten Nilsen
Gesendet: Freitag, 11. März 2011 15:22
An: 'monodroid at lists.ximian.com'
Betreff: [***SPAM*** Score/Req: 05.5/5.0] Re: [mono-android] What´s wrong with this piece of code?

 

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/e0b8555a/attachment-0001.html 


More information about the Monodroid mailing list