package ca.antonious.habittracker;

import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import android.widget.EditText;

/**
 * Created by George on 2016-09-03.
 */
public class EditTextFragment extends DialogFragment {
    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        super.onCreateDialog(savedInstanceState);

        AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getActivity());
        alertDialogBuilder.setTitle("Name");
        alertDialogBuilder.setView(new EditText(getActivity()));
        alertDialogBuilder.setPositiveButton("ok", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {

            }
        });


        return alertDialogBuilder.show();
    }

}

@@ -29,16 +29,48 @@
 acker;%0A%0A
+import android.app.AlertDialog;%0A
 import a
@@ -204,51 +204,8 @@
 nt;%0A
-import android.support.v7.app.AlertDialog;%0A
 impo
@@ -332,16 +332,48 @@
 gment %7B%0A
+    private EditText editText;%0A%0A
     @Ove
@@ -576,24 +576,25 @@
 ctivity());%0A
+%0A
         aler
@@ -624,17 +624,16 @@
 (%22Name%22)
-;
 %0A       
@@ -633,34 +633,34 @@
         
-alertDialogBuilder
+                  
 .setView
@@ -688,17 +688,16 @@
 vity()))
-;
 %0A       
@@ -697,34 +697,318 @@
         
-alertDialogBuilder
+                  .setNegativeButton(%22Cancel%22, new DialogInterface.OnClickListener() %7B%0A                              @Override%0A                              public void onClick(DialogInterface dialog, int which) %7B%0A%0A                              %7D%0A                          %7D)%0A                          
 .setPosi
@@ -1023,10 +1023,11 @@
 on(%22
-ok
+Set
 %22, n
@@ -1073,34 +1073,74 @@
             
+         
-@Override%0A
+           @Override%0A                    
             
@@ -1201,34 +1201,72 @@
  %7B%0A%0A            
-%7D%0A
+                    %7D%0A                  
         %7D);%0A%0A%0A  
@@ -1312,10 +1312,176 @@
 %0A    %7D%0A%0A
+    private EditText ensureEditText() %7B%0A        if (editText == null) %7B%0A            editText = new EditText(getActivity());%0A        %7D%0A        return editText;%0A    %7D%0A%0A
 %7D%0A

Change alert dialog import so it uses theme