title: Load and external Url and Maintain the WebView hidden
body: <p>have an Android Activity with a Vertical LinearLayout. The first screen component is a simple TextView and right below a WebView with visiblity gone.</p>
  
  <p>The web page has javascript code to communicate with the server, there is no visual components. So I need to maintain it with visibility gone, that is hidden, no space occupied in the activity screen.</p>
  
  <p>Then problem is that when I execute webView.loadUrl. it opens the device browser. In the emulator it switches to a another activity with the webview occupping all screen.</p>
  
  <p>How can I make it work ? How can I load and maintain webView completely hidden</p>
  
  <p>Thanks in advance</p>
  
  <p>My layout is like that:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                android:orientation="vertical"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:background="#ffe3d0"&gt;
      &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Demo: WebView"
              android:layout_gravity="center" style="@style/MainLabel" android:autoText="false" android:id="@id/mainLabel"
              android:textColor="#3c3f41"/&gt;
      &lt;WebView
              android:layout_width="fill_parent"
              android:layout_height="30dp"
              android:id="@id/webView" android:visibility="gone"/&gt;
      &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="@string/secondTextView"
              android:id="@+id/textView" android:textColor="#1635ff" android:layout_gravity="center"/&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>My Activity code is like that:</p>
  
  <pre><code>@Override
  
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
      WebView webview = (WebView) findViewById(R.id.webView);
  
      WebSettings webSettings = webview.getSettings();
      webSettings.setJavaScriptEnabled(true);
  
      webview.loadUrl("http://google.com/");
  }
  </code></pre>