On Oct 26, 2011, at 9:11 AM, bmellac wrote:
> I have  a custom ListView using ListViewItems containing two buttons.
> I'd like to catch click event on EACH of the buttons in the listview.
> 
> I've seen that I can define the handler in the list_item.axml, and implement
> it in the activity class.

You've unfortunately hit upon a leaky abstraction. You can in Java. You can't 
in C#, at least not until this bug is fixed:

        http://bugzilla.xamarin.com/show_bug.cgi?id=382

The problem is that Java only sees what is on the generated Android Callable 
Wrapper, not what's declared in your C# type:

        
http://docs.xamarin.com/android/advanced_topics/architecture/android_callable_wrappers

This is why you get the IllegalStateException that Onqte_minus_clicked can't be 
found.

In the meantime, you should subscribe to the Button.Click event:

        http://androidapi.xamarin.com/index.aspx?link=T%3aAndroid.Widget.Button

 - Jon

_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to