Android Question hoe to get AnyView.Parent?

Cableguy

Expert
Licensed User
Longtime User
Hi guys

I guess this is simple for the reflection gurus, but I am a newbie disguised as an expert...
How can I get AnyView.Parent??
thanks in advance
 

Cableguy

Expert
Licensed User
Longtime User
sorry Klaus, I didn't found this one when I search for my keyword 'panel.parent'..
still I was hopping for Your help... and you came to the rescue.. many thanks
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Sitill... another issue... I am not sure what kind of view this will return,,, either a panel or an activity... how to declare my call?
I try to use getParent(Button1) wich I know it is on a Panel... but if I use this sub as a 'generic' sub, how can I distinguish the type of view to declare? (Activity vs Panel)
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
The parent view can be only a Panel or the ifActivity.
Try to check getParent and getRootView if they are equal it's the activity.
I haven't tested it but it should work.
 
Upvote 0
Top