title: Problem in Creating Dialog which contains both TimePicker and DatePicker?
body: <p>I am creating a Custom dialog where I want to use both DatePicker and TimePicker .Although I am able to use TimePicker as I want but for DatePicker I am short of ideas.
  Please Help Me.
  My Code is as follows     </p>
  
  <p>My XML Layout file is...</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical" android:layout_width="fill_parent"
  android:layout_height="fill_parent"&gt;
  &lt;TimePicker android:id="@+id/timePicker1"
      android:layout_width="wrap_content" android:layout_height="wrap_content"&gt;&lt;/TimePicker&gt;
  &lt;DatePicker android:id="@+id/datePicker1"
      android:layout_width="wrap_content" android:layout_height="wrap_content"&gt;&lt;/DatePicker&gt;
  &lt;Button android:id="@+id/buttondatetime" android:layout_width="wrap_content"
      android:layout_height="wrap_content" android:text="OK" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>And My Java Code for Creating Custom Dialog is </p>
  
  <pre><code>void dialogDateTime()
  {
      dialog = new Dialog(this);
      dialog.setContentView(R.layout.datetime);
      dialog.setCancelable(true);
      dialog.setTitle("This is Dialog 1");
      dialog.show();
  
      TimePicker time_picker = (TimePicker) dialog.findViewById(R.id.timePicker1);
      time_picker.setOnTimeChangedListener(new OnTimeChangedListener()
      {
          @Override
          public void onTimeChanged(TimePicker view, int hourOfDay, int minutes)
          {
              // TODO Auto-generated method stub
  
          }
      });
  
      DatePicker date_picker = (DatePicker) dialog.findViewById(R.id.datePicker1);
  
  
  
  
      Button btn_ok = (Button) dialog.findViewById(R.id.buttondatetime);
      btn_ok.setOnClickListener(new OnClickListener()
      {
  
          @Override
          public void onClick(View v)
          {
              // TODO Auto-generated method stub
              String text = "Time "+hours+":"+minute;
              tv_date_time.setText(text);
              dialog.cancel();
          }
      });
  
  }
  </code></pre>
  
  <p>@Override
      protected Dialog onCreateDialog(int id)
      {
          // TODO Auto-generated method stub</p>
  
  <pre><code>    switch (id) 
      {
      case DIALOG_1:
          dialogDateTime();
          break;
      case DIALOG_2:
          dialogTwo();
          break;
      default:
          break;
      }
      return super.onCreateDialog(id);
  }
  </code></pre>
  
  <p>I am not getting any method for DatePicker as in TimePicker So I am not able  to use DatePicker 
  Please Help</p>