Query about a DatePicker program in android
<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;

&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
   android:orientation="vertical" &gt;

   &lt;TextView
        android:id="@+id/textview1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        /&gt;
    &lt;Button

        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="click here for change"/&gt;
 &lt;/LinearLayout&gt;
</code></pre>

<p>//////////////////////////////////////////////////</p>

<pre><code>package date_program.day_program;

   import java.util.Calendar;
   import android.app.Activity;
   import android.app.DatePickerDialog;
   import android.app.Dialog;
   import android.os.Bundle;
   import android.view.View;
   import android.view.View.OnClickListener;
   import android.widget.Button;
   import android.widget.DatePicker;
   import android.widget.TextView;

   public class SampleActivity extends Activity {
    /** Called when the activity is first created. */

    private int year,month,day;
    private TextView tvdisplay;
        private Button btpress;
        static final int DATE_DIALOG_ID=999;

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        tvdisplay=(TextView)findViewById(R.id.textview1);
        btpress=(Button)findViewById(R.id.button1);
    tpress.setOnClickListener(new View.OnClickListener() {

       public void onClick(View arg0) {
       // TODO Auto-generated method stub

           showDialog(DATE_DIALOG_ID);  

           }
});
        final Calendar c=Calendar.getInstance();
            year=c.get(Calendar.YEAR);
            month=c.get(Calendar.MONTH);
            day=c.get(Calendar.DAY_OF_MONTH);
            Updatedisplay();
}

    protected Dialog OnCreateDialog(int Id)  {
    switch(Id) {    
    case DATE_DIALOG_ID:
    return new DatePickerDialog(this,datepicking,year,month,day);   
    }

     return null;
  }

      private DatePickerDialog.OnDateSetListener datepicking =new 

      DatePickerDialog.OnDateSetListener(){

            public void onDateSet(DatePicker arg0, int arg1, int arg2, int arg3) {

        // TODO Auto-generated method stub
                    year=arg1;
                    month=arg2;
                    day=arg3;
                        Updatedisplay();}
 };

  private void Updatedisplay() {
tvdisplay.setText(new StringBuilder().append("Date-").
   append(month+1).append("/").append(day).append("/").append(year));   
 }
 } 
</code></pre>

<p>In android why I can't change the current date using this program i.e after clicking on the button no dialog box is appeared,is there any wrong in this program please explain in details.Thank you for your time and consideration.</p>
