On Apr 7, 10:54 pm, Rui Martins <[EMAIL PROTECTED]> wrote: > Another Example: > How do we call our activity finish method, from our activity view > class ?
You can either hand the activity to the view for it to make calls on to, or have a callback interface from the view that the activity implements and does what it wants (such as call finish()) when the callback executes. > Inside a view, apparently we can't get a reference to the Activity > that contains us (the view), and even if there is a way to get the > reference, we can't probably call it directly, due to UI threading > issues. There are no UI threading issues, unless you have created your own thread (with its own event loop and instantiated a view hierarchy and window there) then all of these objects are running on the same thread, the main thread of the process. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

