title: Android Drum picker activity
body: <p>I found a <code>DatedrumPicker</code> from <a href="http://www.appbrain.com/app/drumpicker-demo/jp.dip.sys1.android.drumpicker" rel="nofollow">this link</a></p>
  
  <p>I've integrated it with my application, it works very good as I open it for the first time, but when I open it for the second time, it doesn't show the current date in the picker.</p>
  
  <p>Found that in <code>DrumPickerActivity.java</code>, in the first time opening it enters <code>onDateChangedListener</code>, but it doesn't in the second time.</p>
  
  <p>I didn't understand How does this listener works?<br></p>
  
  <p>This is the code of the activity </p>
  
  <pre><code>public class DrumPickerActivity extends Activity {
  
  String pday; 
  Calendar calendar = Calendar.getInstance();
  public static Context con;
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
      setContentView(R.layout.dateconversion);
      final TextView date = (TextView) findViewById(R.id.date);
   final String DATE_FORMAT = "%04d"
          +getString(R.string.year)
          +"%02d"
          +getString(R.string.month)
          +"%02d"
          +getString(R.string.day)
          ;
       Resources res= this.getResources();
  
  
      final String[] HijrimonthName = res.getStringArray(R.array.Month_ar);
  
  
      final int year = calendar.get(Calendar.YEAR);
      final int month = calendar.get(Calendar.MONTH);
      final int day = calendar.get(Calendar.DAY_OF_MONTH);
  
      final DateDrumPicker dPicker = (DateDrumPicker)    findViewById(R.id.datepicker);
  
  dPicker.setOnDateChangedListener(new OnDateChangedListener() {
   @Override
  public void onDateChanged(DatePicker view, int year,
                  int monthOfYear, int dayOfMonth) {
  
   date.setText(String.format(DATE_FORMAT, year, monthOfYear,
                      dayOfMonth));
          }//end onDateChanged
  
      });
   }
  </code></pre>
  
  <p>Thanks</p>