title: webview inside fragment android opening outside of the app in a browser
body: <p>I got a webview in my app and it opens outside of it, while I want it to open inside... I've read all examples on stackoverflow and still don't know why it's like this</p>
  
  <p>NewsFragment.java</p>
  
  <pre><code>import android.os.Bundle;
  import android.support.v4.app.Fragment;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.webkit.WebView;
  
  public class NewsFragment extends Fragment {
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
  
          View rootView = inflater.inflate(R.layout.news, container, false);
  
          WebView webView = (WebView)rootView.findViewById(R.id.webView);
  
          webView.setInitialScale(1);
          webView.getSettings().setJavaScriptEnabled(true);
          webView.getSettings().setLoadWithOverviewMode(true);
          webView.getSettings().setUseWideViewPort(true);
          webView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
          webView.setScrollbarFadingEnabled(false);
  
          webView.loadUrl("https://www.google.com");
  
          return rootView;
      }
  }
  </code></pre>
  
  <p>XML file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
  
      &lt;WebView
          android:id="@+id/webView"
          android:layout_width="match_parent"
          android:layout_height="match_parent" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>