title: issue with dialogfragment.show()
body: <p>I'm having a dialog fragment in my application, that i'm calling like- </p>
  
  <pre><code>    dialog=new
       FragmentActivity.dfragment(this);
  
      getFragmentManager().findFragmentById(R.id.fragment3).getView()
              .findViewById(R.id.btn1)
              .setOnClickListener(new OnClickListener() {
  
                  @Override
                  public void onClick(View v) {
                      // TODO Auto-generated method stub
  
                                               dialog.show(getFragmentManager(), "Dialog");
                                               System.out.println(getFragmentManager().findFragmentByTag("Dialog").getTag());
                       // gives null pointer exception
                  }
              });
  </code></pre>
  
  <p>//                      The Dialog frag class. </p>
  
  <pre><code>public static class dfragment extends DialogFragment {
      public dfragment(DialogDisplayed dd) {
          super();
          this.dd = dd;
          Bundle b = new Bundle();
          b.putBoolean("Value", true);
          setArguments(b);
      }
  
      DialogDisplayed dd;
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
              Bundle savedInstanceState) {
          // TODO Auto-generated method stub
          getDialog().setTitle("DIALOG FRAGMENT");
          View v = inflater.inflate(R.layout.dialog_layout, container);
          v.findViewById(R.id.diss).setOnClickListener(new OnClickListener() {
  
              @Override
              public void onClick(View v) {
                  // TODO Auto-generated method stub
                  Toast.makeText(getActivity(), "Setting the bundle",
                          Toast.LENGTH_SHORT).show();
  
                  dismiss();
                  dd.onDialogClicked();
              }
          });
          return v;
      }
  
  }
  </code></pre>
  
  <p>I believe it's not able to find the fragment by tag "Dialog" even though the doc says it adds it to the FragManager.
   I'm wonderin why it's giving an exception
  thanks</p>