title: Implement date picker in button click and store in edit text
body: <p>I am beginner to Android and trying to implement a date picker dialog in Android. </p>
  
  <p>For that purpose I am studying this link: <a href="http://developer.android.com/guide/topics/ui/controls/pickers.html" rel="nofollow noreferrer">Date Picker - Developers Android</a>.</p>
  
  <p>So far I have understood but my requirement is when I click a <code>button</code> I need to get the date picker dialog and when I set the date picker I need to set the value in a <code>Edit Text</code>.</p>
  
  <p>According to the link we need to extend <code>DialogFragment</code> and implement <code>DatePickerDialog.OnDateSetListener</code>.</p>
  
  <p>Now my understanding to follow below process to achieve this:    </p>
  
  <ol>
  <li>Create a new XML with only date picker.</li>
  <li>Create a Java file and implement the date picker code.</li>
  <li>In parent class button click call the <code>Intent</code> to the <code>datepicker</code> class</li>
  <li>Pass the value to the parent class <code>Edit Text</code></li>
  </ol>
  
  <p>Is this the correct approach?</p>