[mono-android] another Java versus C# how to

wanting wantinghuang_17 at hotmail.com
Tue Jan 31 01:21:36 UTC 2012


Hi

i need some help, I am trying to convert this code to mono/c#

listview.SetOnChildClickListener(new
ExpandableListView.IOnChildClickListener() 
        { 
            public override bool OnChildClick (ExpandableListView parent,
View v, int groupPosition, int childPosition, long id) 
            { 
                return base.OnChildClick(parent, v, groupPosition,
childPosition, id);
            } 
        }); 



the code below is my c# code:

listview.SetOnChildClickListener(new MyListener(this));


        public class MyListener : Java.Lang.Object,
ExpandableListView.IOnChildClickListener
        {
            private ExpandListActivity expandListActivity;

            public MyListener(ExpandListActivity expandListActivity)
            {

                this.expandListActivity = expandListActivity;
            }
            public override bool OnChildClick(ExpandableListView parent,
View v, int groupPosition, int childPosition, long id)
            {
                   return base.OnChildClick(parent, v, groupPosition,
childPosition, id);
              
            }
        } 

Then i got this errors
Error	1   MyListener.OnChildClick(Android.Widget.ExpandableListView,
Android.Views.View, int, int, long)': no suitable method found to override



--
View this message in context: http://mono-for-android.1047100.n5.nabble.com/another-Java-versus-C-how-to-tp4332736p5443334.html
Sent from the Mono for Android mailing list archive at Nabble.com.


More information about the Monodroid mailing list