I have been unsuccessful in getting the input from my EditText object inside my custom dialog.

```
 public class SetCityDialog extends DialogFragment {

    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        LayoutInflater factory = LayoutInflater.from(MainActivity.this);
        final View view = factory.inflate(R.layout.city_dialog, null);

        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());

        // Get the layout inflater
        LayoutInflater inflater = getActivity().getLayoutInflater();
        builder.setView(inflater.inflate(R.layout.city_dialog, null))
                // Add action buttons
                .setPositiveButton("OK",
                        new DialogInterface.OnClickListener() {
                            @Override
                            public void onClick(DialogInterface dialog,
                                    int id) {

                                //This is the input I can't get text from
                                EditText inputTemp = (EditText) view.findViewById(R.id.search_input_text);
                                //query is of the String type
                                query = inputTemp.getText().toString();
                                newQuery();
                                getJSON newData = new getJSON();
                                newData.execute("Test");
                            }
                        })
                .setNegativeButton("Cancel",
                        new DialogInterface.OnClickListener() {
                            public void onClick(DialogInterface dialog,
                                    int id) {
                                SetCityDialog.this.getDialog().cancel();
                            }
                        });
        return builder.create();
    }
}

```

I don't get any exceptions, but the variable query is set to an empty string.
Any help would be fantastic.