title: DialogFragment findFragmentByTag return null
body: <p>I use <code>DialogFragment</code> contain a <code>webview</code>. After show the <code>DialogFragment</code> , when pressed back button, the app will return to the activity view. If pressed show DialogFragment button, the webview load the init url again. But my requirement is that if second time open the DialogFragment , i want the webview show page last time loaded. How can i achieve this?</p>
  
  <p>My current thought is keep the DialogFragment instance, when push the show button then check if activity already has the DialogFragment. But in my code, the <code>findFragmentByTag</code> always return null ,what's the problem? Or I should do some work in the DialogFragment?</p>
  
  <p>main activity code:</p>
  
  <pre><code>mcWebViewDialog m_webviewDialog = null;
  
  public void showWebviewDialog()
  {
  
      FragmentManager fragmentManager=getFragmentManager();
      FragmentTransaction fragmentTransaction=fragmentManager.beginTransaction();
      Fragment prev=fragmentManager.findFragmentByTag("mcWebDialog");
  
      if(prev!=null)
      {
          Log.v("seayoung","m_webviewDialog not null");
          fragmentTransaction.show(prev);
      }
      else
      {
          Log.v("seayoung","m_webviewDialog null");
          m_webviewDialog=mcWebViewDialog.newInstance();
          m_webviewDialog.set_loadurl("file:///android_asset/input.html");
          m_webviewDialog.show(fragmentManager,"mcWebDialog");
      }
  }
  </code></pre>
  
  <p>WebViewDialog code:</p>
  
  <pre><code>@Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState)
      {
  
           //other code 
           m_webView.loadUrl(m_loadurl);
  
          return m_webView;
      }
  </code></pre>