title: WebView not showing content
body: <p>all.</p>
  
  <p>I'm having some trouble displaying a url content gotten from a EditText field, on a WebView on Android.</p>
  
  <p>I just want to add a String inserted into an EditText field, to open a url on another activity, where a webView opens with the Google search url, searching for the given text in EditText.</p>
  
  <p>This is my MainActivity:</p>
  
  <pre><code>package com.hbt.activities;
  
  import android.os.Bundle;
  import android.app.Activity;
  import android.content.Intent;
  import android.view.View;
  import android.webkit.WebView;
  import android.widget.EditText;
  
  public class MainActivity extends Activity {
  
      EditText term;
      String query;
      WebView intview;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      term = (EditText) findViewById(R.id.searchtext);
      query = term.getText().toString();
  
      intview = (WebView) findViewById(R.id.webView1);
      intview.getSettings().setBuiltInZoomControls(true);
      intview.getSettings().setJavaScriptEnabled(true);
      intview.getSettings().setDomStorageEnabled(true);
  }
  
  public void openWikipedia(View intview){
  
       Intent intent = new Intent(this, Wikipedia.class);
       intent.putExtra("query", query);
       startActivity(intent);
      }
  
  public void openGoogle(View view){
  
       Intent intent = new Intent(this, Google.class);
       intent.putExtra("query", query);
       startActivity(intent);
      }
  }
  </code></pre>
  
  <p>This is my Google.java:</p>
  
  <pre><code>package com.hbt.activities;
  
  import android.os.Bundle;
  import android.app.Activity;
  import android.view.KeyEvent;
  import android.view.View; 
  import android.webkit.WebView;
  import android.widget.Toast;
  
  public class Google extends Activity {
  String query;
  WebView intview;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_google);
  }
  
  public void opengoogle (View webView1){
      intview = (WebView) findViewById(R.id.webView1);
      intview.getSettings().setBuiltInZoomControls(true);
      intview.getSettings().setJavaScriptEnabled(true);
      intview.getSettings().setDomStorageEnabled(true);
      intview.loadUrl("https://www.google.pt");
  
      String query = "";
  
      Bundle bundle = getIntent().getExtras();
      if (bundle == null){
          Toast.makeText(getApplicationContext(), "Insert a search item.",Toast.LENGTH_LONG).show();
      }
      if (bundle != null) {
          query = bundle.getString("query");
      }
  
  
  }
  
  @Override
  public boolean onKeyDown(int keyCode, KeyEvent event) { 
      if (keyCode == KeyEvent.KEYCODE_BACK){
          onBackPressed();
          return true;
      }
      else{
          return super.onKeyDown(keyCode, event);
      }
  }
  }
  </code></pre>
  
  <p>And finally, the Wikipedia.java:</p>
  
  <pre><code>package com.hbt.activities;
  
  import android.app.Activity;
  import android.content.Intent;
  import android.net.Uri;
  import android.os.Bundle;
  import android.view.KeyEvent;
  import android.view.View;
  import android.webkit.WebView;
  import android.widget.Toast;
  
  public class Wikipedia extends Activity {
  
      String query;
  WebView intview;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_wikipedia);
  }
  
   public void openWikipedia (View view){
       intview = (WebView) findViewById(R.id.webView1);
       intview.getSettings().setBuiltInZoomControls(true);
       intview.getSettings().setJavaScriptEnabled(true);
       intview.getSettings().setDomStorageEnabled(true);
  
       String query = "";
       Bundle bundle = getIntent().getExtras();
       if (bundle == null){
          Toast.makeText(getApplicationContext(), "Insert a search item.",Toast.LENGTH_LONG).show();
       }
       if (bundle != null) {
           query = bundle.getString("query");
       }
  
       String url = "en.wikipedia.org/wiki/Special:Search?search="+ query;
       Intent i = new Intent(Intent.ACTION_VIEW);
       i.setData(Uri.parse(url));
       startActivity(i);
  
  }   
  
      @Override
  public boolean onKeyDown(int keyCode, KeyEvent event) { 
      if (keyCode == KeyEvent.KEYCODE_BACK){
           onBackPressed();
           return true;
       }
       else{
          return super.onKeyDown(keyCode, event);
       }
  }
  }
  </code></pre>
  
  <p>I really can't understand why the WebView doesn't show the content. Any help would be extremely appreciated. Thanks in advance.</p>
  
  <p>As asked, here goes the Layout XML:</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:paddingBottom="@dimen/activity_vertical_margin"
  android:paddingLeft="@dimen/activity_horizontal_margin"
  android:paddingRight="@dimen/activity_horizontal_margin"
  android:paddingTop="@dimen/activity_vertical_margin"
  tools:context=".MainActivity" &gt;
  
  
  
  &lt;Button
      android:id="@+id/Wikipedia"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_above="@+id/Google"
      android:layout_alignLeft="@+id/Google"
      android:layout_alignRight="@+id/Google"
      android:minEms="6"
      android:onClick="openWikipedia"
      android:text="@string/wikipedia" /&gt;
  
  &lt;Button
      android:id="@+id/Google"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:layout_alignParentLeft="true"
      android:layout_alignParentRight="true"
      android:onClick="openGoogle"
      android:text="@string/google" /&gt;
  
  &lt;EditText
      android:id="@+id/searchtext"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_above="@+id/Wikipedia"
      android:layout_alignLeft="@+id/Wikipedia"
      android:layout_alignRight="@+id/Google"
      android:layout_marginBottom="18dp"
      android:layout_marginTop="12dp"
      android:hint="@string/text_to_search_" /&gt;
  
  &lt;WebView
      android:id="@+id/webView1"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_above="@+id/searchtext"
      android:layout_alignLeft="@+id/searchtext"
      android:layout_alignParentTop="true" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Next the Wikipedia layout XML:</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:paddingBottom="@dimen/activity_vertical_margin"
  android:paddingLeft="@dimen/activity_horizontal_margin"
  android:paddingRight="@dimen/activity_horizontal_margin"
  android:paddingTop="@dimen/activity_vertical_margin"
  tools:context=".MainActivity" &gt;
  
  &lt;WebView
      android:id="@+id/webView2"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentTop="true" 
      /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>and the Google XML:</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:paddingBottom="@dimen/activity_vertical_margin"
  android:paddingLeft="@dimen/activity_horizontal_margin"
  android:paddingRight="@dimen/activity_horizontal_margin"
  android:paddingTop="@dimen/activity_vertical_margin"
  tools:context=".MainActivity" &gt;
  
  &lt;WebView
      android:id="@+id/webView1"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_alignParentTop="true" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>They are different because I was trying to approach the matter form several fronts.</p>