Most examples out there specify exactly the width and the height of the 
popup window. I want them to be WRAP_CONTENT - since the content is 
dinamically determined- so in the constructor I set -2 for both width and 
height and show it via showAsDropDown(View anchor)

Doing this, the popup is always drawn below the anchor view, which means it 
can be drawn offscreen. The following snippet demonstrates the problem. Try 
clicking on the last TextView and you won't see any PopupWindow, since it's 
shown outside of the windows bounds. Why doesn't it work? I remark that 
specifying dimension explicitly (for example 200, 100) doesn't trigger the 
problem. Try it yourself

http://pastebin.com/iz4p2419

(Line 17, set -2 -2 to see the problem)

-- 
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]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to