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. scroll a layout in all direction (and zooming)

hello,

I want to make an app where i can scroll the layout/view in all
directions
(both horizontally and vertically at the same time, like in the
browser app).
Maybe with GestureListener?

I already managed to read and test tutorials about scrolling large
images but i want to scroll the whole layout made of many widgets like
buttons and textviews etc.

Is there any way to accomplish that with the build in classes? If not,
is there any open source classes which can do that? I dont want to
write a new ScrollView class...

What i already tried was to capsule a ScrollView in a HorizontalView,
but that does only one scroll direction at one time. So if I am
scrolling down(up), I cant scroll in other directions.

greets
JayhC

-- 

2. Map API Key in MAC

i using mac to develop android
NOw i need use google map
i want to know how to get the java keytool MD5 in the mac

-- 

3. MediaPlayer and HTTP authentication?

4. Failed to create a UDP Server on Android phone

5. Layout on emulator and phone

6. Programmatically check whether Market shows paid apps

7. Fwd: WTShare : DocsToGo Full Version