FENIX wrote: > Hello guys! I really need your help here.. > > I want to include one button inside each row in a ListActivity. When > pressing one of these buttons it will be disabled and will perform a > heavy task in the background (in a different thread to avoid screen > blocking). After the action is completed the button will be enabled > again and the row updated with some results obtained from that "heavy > operation". > > Im filling my List with a custom SimpleCursorAdapter, its getView > method calls super.getView and in the view (row) returned I access its > button through findViewById and set my clicklistener (to disable it, > and launch the heavy task in the background). Once this heavy task is > finished I need a reference to this row view to find the button and re- > enable it.
Since you already know the Button at the time you start the "heavy task", pass the Button along to the task, or otherwise arrange to know it at the time you want to disable the button. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---