title: Android: Date pickers listeners from null to active
body: <p>I have two date pickers in the same activity and they are connected to each other, as when the user change one date the other date picker date is changed directly
  <strong>Here are the listeners</strong></p>
  
  <pre><code>  //initialize period date picker with current date and on date change listener 
          periodDatePicker.init(currentYear, currentMonth, currentDay, new OnDateChangedListener()
          {
              @Override
              public void onDateChanged(DatePicker periodDatePicker, int currentYear, int currentMonth,int currentDay) {
                  // TODO Auto-generated method stub
                  Number = 1;
              birthDayDatePicker.init(currentYear, currentMonth, currentDay, null);
                  birthDateCalculations();
  
              }
          });
  
          //initialize birth date picker with current date and on date change listener 
          birthDayDatePicker.init(currentYear, currentMonth, currentDay, new OnDateChangedListener () {
  
              @Override
              public void onDateChanged(DatePicker birthDayDatePicker, int currentYear, int currentMonth, int currentDay) {
                  // TODO Auto-generated method stub
                  Number = 2;
                  periodDatePicker.init(currentYear, currentMonth, currentDay, null);
                  periodDateCalculations();               
              }
          });
  </code></pre>
  
  <p>when one date picker listener is invoked , <strong>I turn the other listener to the second date picker to null , my question is, <em>how can I make the listener that I turned to null to be active again</em></strong> </p>