I find that View.getWindowToken() always returns null, even when
invoked from the main Activity during onCreate.  For example:

TextView tv = new TextView(this);
tv.setText("Hello, Android");
setContentView(tv);
tv.getWindowToken(); // will equal null

Manually adding it to the window manager (addView) doesn't help
either.

When does a View have a window token?  How do I get a valid window
token?

TIA.

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