private static void sendPostCreateMessage(WebView view, Message postCreateMessage) {
   WebView.WebViewTransport transport = (WebView.WebViewTransport) postCreateMessage.obj;
   if (transport != null) {
     transport.setWebView(view);
   }
   postCreateMessage.sendToTarget();
 }
Beispiel #2
0
    @Override
    public boolean onCreateWindow(
        WebView view, boolean dialog, boolean userGesture, Message resultMsg) {
      childView = new WebView(News.this);
      childView.getSettings().setJavaScriptEnabled(true);
      childView.getSettings().setSupportZoom(true);
      childView.getSettings().setBuiltInZoomControls(true);
      childView.setWebViewClient(new FaceBookClient());
      childView.setWebChromeClient(this);
      childView.setLayoutParams(
          new LinearLayout.LayoutParams(
              LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.FILL_PARENT));

      parentLayout.addView(childView);

      childView.requestFocus();
      txtcon.setVisibility(View.GONE);

      /*I think this is the main part which handles all the log in session*/
      WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj;
      transport.setWebView(childView);
      resultMsg.sendToTarget();
      return true;
    }