view -> parent activity

by Andrei » Thu, 22 Apr 2010 13:17:03 GMT


Sponsored Links
 If I have reference to a view that is on activity
How do I get reference to the activity from view reference?
Thanks

--



view -> parent activity

by ~ TreKing » Thu, 22 Apr 2010 22:05:19 GMT


 



You don't - at least not without maintaining your own mapping or holding a
reference somewhere yourself.
I guess you COULD put the Activity reference in the view's tag ... but that
seems dirty.
Why do you need an Activity? Most everything you need is usually available
from Context, which a view has.

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
 http://sites.google.com/site/rezmobileapps/treking 

--


Sponsored Links


Other Threads

1. sim cards and g1

I just bought a g1 phone and it says that the wireless (as in wifi) signal
that I'm getting is very poor, but I'm connected to it with my laptop. is a
sim card required to do anything more than wirelessly connect to satellites?

-- 

2. How to tell if we were force killed for memory, in onCreate()?



Correct. In a true "force kill" scenario, Android needs RAM quickly and
cannot rely upon you to do something quickly.

> 

3. back button pressed while in an application and go back to the home screen

4. Loading Object Hierarchy

5. How to tell if we were force killed for memory, in onCreate()?

6. Am I using startManagingCursor correctly?

7. HTC Hero, missing applications from Market after firmware update