title: How to show dialog from dialog in Android?
body: <p>My application show save or cancel dialog . When user click save , a new dialog will apperars with edit text , date button  and save button . When user click date button Date dialog will appear . But I click date button I get InvocationTargetException . How can I solve this ?</p>
  
  <pre><code>Dialog d = new Dialog(CameraView.this, R.style.Dialog);             
                           d.requestWindowFeature(Window.FEATURE_NO_TITLE);
                           d.setContentView(R.layout.img_info);
                           loadDate();
                           d.setCancelable(true);
  </code></pre>
  
  <p>LoadDate Method like this</p>
  
  <pre><code>private void loadDate(){
          // capture our View elements
          mDateDisplay = (TextView) findViewById(R.id.dateDisplay);
          mPickDate = (Button) findViewById(R.id.pickDate);
  
          // add a click listener to the button
          mPickDate.setOnClickListener(new View.OnClickListener() {
              public void onClick(View v) {
                  showDialog(DATE_DIALOG_ID);
              }
          });
  
          // get the current date
          final Calendar c = Calendar.getInstance();
          mYear = c.get(Calendar.YEAR);
          mMonth = c.get(Calendar.MONTH);
          mDay = c.get(Calendar.DAY_OF_MONTH);
  
          // display the current date (this method is below)
          updateDisplay();
  
      }
      private void updateDisplay() {
          mDateDisplay.setText(
              new StringBuilder()
                      // Month is 0 based so add 1
                      .append(mMonth + 1).append("-")
                      .append(mDay).append("-")
                      .append(mYear).append(" "));
      }
  
      private DatePickerDialog.OnDateSetListener mDateSetListener =
          new DatePickerDialog.OnDateSetListener() {
  
              public void onDateSet(DatePicker view, int year, 
                                    int monthOfYear, int dayOfMonth) {
                  mYear = year;
                  mMonth = monthOfYear;
                  mDay = dayOfMonth;
                  updateDisplay();
              }
          };
  
      @Override
      protected Dialog onCreateDialog(int id) {
          switch (id) {
          case DATE_DIALOG_ID:
              return new DatePickerDialog(this,
                          mDateSetListener,
                          mYear, mMonth, mDay);
          }
          return null;
      }
  </code></pre>