title: cannot resolve symbol R Android DialogFragment
body: <p>I would like create an AlertDialog with a custom XML layout, but in my class I can't found R variable, why ?</p>
  
  <p>This is my class :</p>
  
  <pre><code>public class NewTestDialogFragment extends DialogFragment {
  
      public NewTestDialogFragment(){
          super();
      }
  
      @Override
      public Dialog onCreateDialog(Bundle savedInstanceState) {
          AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
          LayoutInflater inflater = getActivity().getLayoutInflater();
          builder.setView(inflater.inflate(R.layout.name_dialog, null));
  
          builder.setTitle("Test");
  
          builder.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
              @Override
              public void onClick(DialogInterface dialogInterface, int i) {
              }
          });
  
          builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
              @Override
              public void onClick(DialogInterface dialogInterface, int i) {
                  dismiss();
              }
          });
  
          return builder.create();
      }
  }
  </code></pre>
  
  <p>R is not found. If I import R, the application crash..</p>