title: Webview in Activity Group crashing on dialogs
body: <p>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:</p>
  
  <pre><code>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?
  </code></pre>
  
  <p>So basically the issue I'm having, I think, is very similar to this question:</p>
  
  <p><a href="https://stackoverflow.com/questions/4755729/webview-crashes-on-select-box-or-any-dialog">Webview crashes on select box or any Dialog</a></p>
  
  <p>And the answer probably will work for me, the difference is that I'm declaring my webview from an xml file:</p>
  
  <pre><code>this.mainWebView = (WebView) findViewById(R.id.proxSearchWebView);
  </code></pre>
  
  <p>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?</p>
  
  <p>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?</p>