title: WebView inside Fragment - Back button?
body: <p>I created a small Android 4 application with fragments. 
  In all these fragments I have some webviews and if I click a different fragment I want a different website to load.</p>
  
  <p>I have right now <code>TabOne.java</code> ; <code>TabTwo.java</code> ; <code>TabThree.java</code> and so on. </p>
  
  <p>I was also wondering : Can I make this application without needing a <code>TabOne.java</code>, <code>TabTwo.java</code> and so on; only from <code>MainActivity.java</code>? I mean, to have a single <code>WebView</code>, and when clicking different Tabs, this <code>WebView</code> to load different Url (according to the selected Tab).
  If this is not possible, can you tell me what is wrong here (<code>TabOne.java</code>) :</p>
  
  <pre><code>@Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
          Bundle savedInstanceState)
  {
      View view = inflater.inflate(R.layout.tabone, container, false);
      myWebView = (WebView) view.findViewById(R.id.webview);
      myWebView.getSettings().setPluginsEnabled(true);
      myWebView.loadUrl("http://m.stirileprotv.ro");
      myWebView = new WebView(getActivity());
      myWebView.setOnKeyListener(new OnKeyListener(){
              @Override
              public boolean onKey(View v, int keyCode, KeyEvent event) {
                    if ((keyCode == KeyEvent.KEYCODE_BACK) &amp;&amp; myWebView.canGoBack())                              
              {
                          myWebView.goBack();
                          return true;
                      }
                      return false;
              }
      });
      myWebView.setWebViewClient(new WebViewClient() {
      @Override public boolean shouldOverrideUrlLoading(WebView view, String url) {
              if (Uri.parse(url).getHost().equals("m.stirileprotv.ro")) {
                  myWebView.loadUrl(url);
                  return true;
              }
              else
              {
                  return false;
              }
           }
      });
      return view;
  }
  </code></pre>