title: Programmatically open fullscreen webView on click
body: <p>I want to create like plugin for applications. When the specific button is clicked the webview should be opened on top of the app(activity). The whole logic for this webview should be in .jar library. It should not open new activity, because then I need to copy new layout(.xml file) in to project but I do not want to do this, because adding this new library (plugin) should be as simple as possible. I also should not change the existing layout.</p>
  
  <p>Is any way to open this webview by just adding some lines of code to program and then control everything from library vithout making changes in layouts (.xml).</p>
  
  <p><strong>Update solution:</strong>
  I solve this by calling new activity from library but this activity does not load .xml layout but webView.</p>
  
  <p>Project activity:</p>
  
  <pre><code>public void onClick(View v) {
  startActivity(new Intent(MainActivity.this, LibraryActivity.class));
  }
  </code></pre>
  
  <p>Library activity:</p>
  
  <pre><code>WebView web;
  web= new WebView(this);
  web.loadUrl("http://www.google.com");
  web.setWebViewClient(new WebViewClient());      
  setContentView(web);
  </code></pre>