public static void showTextDialog(FragmentManager fm, String title, String body) {
    FragmentTransaction ft = CalcApp.removePrevDialog(fm);

    // Create and show the dialog.
    DialogFragment newFragment = TextDialogFragment.newInstance(title, body);
    newFragment.show(ft, "dialog");
  }
 public static void showListDialog(FragmentManager fm, int callerId, String title, String[] body) {
   FragmentTransaction ft = CalcApp.removePrevDialog(fm);
   DialogFragment newFragment = ListDialogFragment.newInstance(callerId, title, body);
   newFragment.show(ft, "dialog");
 }