title: Android, reload or refresh current fragment after click "ok" in DIALOG
body: <p>This is my dialog inside fragment it works fine, now I want that when i click "ok" button it reload the current fragment. the dialog is show when the method showDialog is called:
  mi fragment is  android.support.v4.app.Fragment</p>
  
  <pre><code>void showDialog() {
      LayoutInflater layoutInflater = LayoutInflater.from(getContext());
      View promptView = layoutInflater.inflate(R.layout.dialog_fragment_agenda, null);
      TextView txtNombre = (TextView)promptView.findViewById(R.id.txtdialog1);
      txtNombre.setText("ADD THIS STUFF?");
      AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getContext());
      alertDialogBuilder.setView(promptView);
  
      alertDialogBuilder.setPositiveButton("Ok",new DialogInterface.OnClickListener() {
          public void onClick(DialogInterface dialog, int id) {
              sendSomeStuff();
              //HERE TODO RELOAD OR REFRESH THE FRAGMENT
  
  
          }
      });
      alertDialogBuilder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
          public void onClick(DialogInterface dialog, int which) {
  
          } });
      AlertDialog alert = alertDialogBuilder.create();
      alert.show();
  }
  </code></pre>
  
  <p><strong>update</strong>
  this is the fragment. Iwant to recall the onCreateView methos of the fragment</p>
  
  <pre><code>public class FragmentOne extends Fragment {
  //...some variables
     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
  
      rootView = inflater.inflate(R.layout.fragment_one, container, false);
      showDialog()//HERE I CALL MY CUSTOM DIALOG
  
      return rootView;
  }
  }
  </code></pre>
  
  <p><strong>The Simple Solution</strong></p>
  
  <p>Tested using viewpager, and FragmentPagerAdapter</p>
  
  <pre><code>FragmentTransaction ft = getFragmentManager().beginTransaction();
  
  ft.detach(FragmentOne.this).attach(FragmentOne.this).commit();
  </code></pre>