Not able to get input from the custom fragment dialog
<p>i am displaying a custom dialog for user input on top of my list view activity layout. But when i try to refer the edit text in onCreateDialog() method, its always coming as blank. Below is my code, appreciate if someone can point out where i am doing wrong - </p>

<pre><code>public class QuestionDialog extends DialogFragment
{

     public Dialog onCreateDialog(Bundle savedInstanceState) 
     {

            AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
          // Get the layout inflater
            LayoutInflater inflater = getActivity().getLayoutInflater();
         // Inflate and set the layout for the dialog
            final View v =inflater.inflate(R.layout.ques_dialog,null);
            builder.setView(inflater.inflate(R.layout.ques_dialog, null))

            .setTitle("Title Message!")  
            .setCancelable(true)
            .setPositiveButton("GO", new DialogInterface.OnClickListener(){
                       public void onClick(DialogInterface dialog, int whichButton)
                        {

                          EditText et1 = (EditText)v.findViewById(R.id.et1);

                      // here not able to get the data from edit text 

                          String s1 = et1.getText().toString().trim();
                          Log.d("debug","data -"+s1+" and length"+s1.length());

                        .... rest code goes here 

                       })
                     .setNegativeButton("Cancel", new DialogInterface.OnClickListener(){
                       public void onClick(DialogInterface dialog, int whichButton)
                        {

                            ..rest code goes here

                         }

                       });              

        return builder.create();

     }


}
</code></pre>
