I have a webview that I'm creating in an Activity which is a child of an Activity Group. The issue I'm having is that when I load an external weblink, the webview crashes when I click a link that would bring up a dialog:
03-28 12:06:24.189: E/AndroidRuntime(629):
android.view.WindowManager$BadTokenException:
Unable to add window -- token
android.app.LocalActivityManager$LocalActivityRecord@44ef7060 is not valid;
is your activity running?
So basically the issue I'm having, I think, is very similar to this question:
Webview crashes on select box or any Dialog
And the answer probably will work for me, the difference is that I'm declaring my webview from an xml file:
this.mainWebView = (WebView) findViewById(R.id.proxSearchWebView);
I'm still very new to Android Dev, so I'm assuming that declaring my webview in this way is setting the context to "this" , is there a way to set the context to getParent() while still using XML?
So basically, is there a way to make this work while still defining the webview through XML or do I have to programmatically create the webview entirely?