On Aug 2, 2011, at 1:23 PM, BarryJohnston wrote:
> I have an activity derived from ListActivity and a delegate click handler 
> defined for the List.  It appears the the click handler is being called three 
> times.

I'm not able to reproduce this:

 1. Run: git clone g...@github.com:mono/monodroid-samples.git
 2. Open ApiDemo/ApiDemo.sln
 3. Apply this patch to ApiDemo.cs:

diff --git a/ApiDemo/ApiDemo.cs b/ApiDemo/ApiDemo.cs
index d737f36..519658b 100644
--- a/ApiDemo/ApiDemo.cs
+++ b/ApiDemo/ApiDemo.cs
@@ -49,7 +49,9 @@ namespace MonoDroid.ApiDemo
                                new int[] { Android.Resource.Id.Text1 });
                        ListView.TextFilterEnabled = true;
 
+                       int count = 0;
                        ListView.ItemClick += delegate (object sender, 
ItemEventArgs args) {
+                               Toast.MakeText(Application, 
((TextView)args.View).Text + " " + (count++).ToString(), 
ToastLength.Short).Show();
                                IDictionary<string, object> map = 
(IDictionary<string, object>) (sender as ListView).GetItemAtPosition 
(args.Position);
                                Intent intent = (Intent)map ["intent"];
                                intent.SetFlags (ActivityFlags.NewTask);

 4. Build, install, Run.

As per the Toast messages, each click on the ListView only results in one Toast 
message.

 - Jon

_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

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

Reply via email to