On Apr 25, 1:53 pm, TreKing <[email protected]> wrote:
> On Mon, Apr 25, 2011 at 2:36 PM, jotobjects <[email protected]> wrote:
> > I'm not clear about what "parent" in the last line is supposed to be...
>
> How is this compiling?
>
context == activity. text=="foobar and merry christmas".
I've tried a couple of different things for parent. Here is the full
method -
public void onClick(View v)
{
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);
//View window = ((Activity)context).getWindow().getDecorView();
popup.showAtLocation(v, Gravity.CENTER, 0, 0);
}
It does compile and tracing it with the debugger it executes without
error.
--
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