title: Date Picker In Android (ShowDialog () error)
body: <p>I have searched in many sites for date picker in android, but all sites are providing code which contains <code>showdialog()</code>, and eclipse is mentioning that <code>showDialog</code> is deprecated. So anyone please help me with basic date picker. I'm new to android developing, so please be tolerant. I tried from every sites.</p>
  
  <p>Need to place the basic date picker in one xml. (I don't want to include time and all, date alone will do).
  Thanks in Advance</p>
  
  <p>this is my class file</p>
  
  <p>public class PremiumCurator extends  FragmentActivity {</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      //setContentView(R.layout.activity_main);
      setContentView(R.layout.premiumcurator);    
  
      Button btnDate = (Button)findViewById(R.id.btnDate);
  
       btnDate.setOnClickListener(new OnClickListener()
       {
          @SuppressLint("NewApi")
              public void onClick(View v) 
              {
              daatepopup();
  
  
      }
       });    
  
   }
  
   public void daatepopup()
   {
      Calendar c = Calendar.getInstance();
      int mYear = c.get(Calendar.YEAR);
      int mMonth = c.get(Calendar.MONTH);
      int mDay = c.get(Calendar.DAY_OF_MONTH);
  
      OnDateSetListener mDateSetListener = null;
          //updateDisplay();
    DatePickerDialog d = new DatePickerDialog(this, mDateSetListener,mYear,  mMonth, mDay);
    d.show();
  
  
  
  
   }
  
  
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.main, menu);
      return true;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>from the reference of yours above is my code, date picker is populated i can able to choose the date. But whenever i give set i need to save my date values. How to fire the event when i click the set button of the date picker ? please see my code and help me out where to add.</p>