I have the following code but the PopupWindow does not appear.  I want
it to appear in the center of the screen. I'm not clear about what
"parent" in the last line is supposed to be... Does anybody see what
is wrong here?

PopupWindow popup = new PopupWindow(context);
TextView contentView = new TextView(context);
popup.setContentView(contentView);
contentView.setLayoutParams(
    new LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT));
contentView.setText(text);
popup.showAtLocation(parent, Gravity.CENTER, 0, 0);

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