@Override public void onValueSelected(int pickerIndex,int newValue,boolean autoAdvance){
switch (pickerIndex) {
case HOUR_INDEX:
    if (mAllowAutoAdvance && autoAdvance) {
      updateHeaderHour(newValue,false);
      setCurrentItemShowing(MINUTE_INDEX,true,false);
      announceForAccessibility(newValue + ". " + mSelectMinutes);
    }
 else {
      updateHeaderHour(newValue,true);
    }
  break;
case MINUTE_INDEX:
updateHeaderMinute(newValue,true);
break;
case AMPM_INDEX:
updateAmPmLabelStates(newValue);
break;
case ENABLE_PICKER_INDEX:
if (!isTypedTimeFullyLegal()) {
mTypedTimes.clear();
}
finishKbMode();
break;
}
if (mOnTimeChangedListener != null) {
mOnTimeChangedListener.onTimeChanged(this,getCurrentHour(),getCurrentMinute());
}
}

@ Override public void onValueSelected ( int pickerIndex , int newValue , boolean autoAdvance ) { switch ( pickerIndex ) { case HOUR_INDEX : if ( mAllowAutoAdvance && autoAdvance ) { updateHeaderHour ( newValue , false ) ; setCurrentItemShowing ( MINUTE_INDEX , true , false ) ; announceForAccessibility ( newValue + ". " + mSelectMinutes ) ; } else { updateHeaderHour ( newValue , true ) ; } break ; case MINUTE_INDEX : updateHeaderMinute ( newValue , true ) ; break ; case AMPM_INDEX : updateAmPmLabelStates ( newValue ) ; break ; case ENABLE_PICKER_INDEX : if ( ! isTypedTimeFullyLegal ( ) ) { mTypedTimes . clear ( ) ; } finishKbMode ( ) ; break ; } if ( mOnTimeChangedListener != null ) { mOnTimeChangedListener . onTimeChanged ( this , getCurrentHour ( ) , getCurrentMinute ( ) ) ; } }
called by the picker for updating the header display .
