(I posted this on Stack Overflow but as of this writing I've received no 
response)

I'm writing code that starts with a View object in a layout hierarchy and 
iteratively walks up the tree to the view root, using *getParent()*, 
displaying information about each level as it goes. 

Everything is working fine except for PopupWindow, which is one of the 
classes I want to display. All the other ones in my layout are derived 
directly or indirectly from the View class, e.g., LinearLayout, 
RelativeLayout, Button etc. So I get the Parent View (vPar) and do a 

Object obj = (Object)vPar;

To test for, say, RelativeLayout I can then do a . . .

if (obj instanceof RelativeLayout ) {

...

But this doesn't work for PopupWindow. Even though PopupWindow is derived 
from Object, when it's in a layout it's shown as 
"PopupWindow$PopupViewContainer" in the debugger. And PopupViewContainer is 
not part of the public API, according to 
http://www.kiwidoc.com/java/l/x/android/android/5/p/android.widget/c/PopupWindow.PopupViewContainer.

So how do I test to see if I have a PopupWindow as I'm walking up the 
hierarchy?

Thanks in advance!!

-- 
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

Reply via email to