@Override public boolean performAccessibilityAction(int action,Bundle arguments){
  if (action != AccessibilityNodeInfo.ACTION_SCROLL_FORWARD && action != AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD) {
    return super.performAccessibilityAction(action,arguments);
  }
  final int firstVisiblePosition=getFirstVisiblePosition();
  final int month=firstVisiblePosition % 12;
  final int year=firstVisiblePosition / 12 + mMinDate.get(Calendar.YEAR);
  final Calendar day=Calendar.getInstance();
  day.set(year,month,1);
  if (action == AccessibilityNodeInfo.ACTION_SCROLL_FORWARD) {
    day.add(Calendar.MONTH,1);
    if (day.get(Calendar.MONTH) == 12) {
      day.set(Calendar.MONTH,0);
      day.add(Calendar.YEAR,1);
    }
  }
 else   if (action == AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD) {
    View firstVisibleView=getChildAt(0);
    if (firstVisibleView != null && firstVisibleView.getTop() >= -1) {
      day.add(Calendar.MONTH,-1);
      if (day.get(Calendar.MONTH) == -1) {
        day.set(Calendar.MONTH,11);
        day.add(Calendar.YEAR,-1);
      }
    }
  }
  announceForAccessibility(getMonthAndYearString(day));
  goTo(day.getTimeInMillis(),true,false,true);
  mPerformingScroll=true;
  return true;
}

@ Override public boolean performAccessibilityAction ( int action , Bundle arguments ) { if ( action != AccessibilityNodeInfo . ACTION_SCROLL_FORWARD && action != AccessibilityNodeInfo . ACTION_SCROLL_BACKWARD ) { return super . performAccessibilityAction ( action , arguments ) ; } final int firstVisiblePosition = getFirstVisiblePosition ( ) ; final int month = firstVisiblePosition % 12 ; final int year = firstVisiblePosition / 12 + mMinDate . get ( Calendar . YEAR ) ; final Calendar day = Calendar . getInstance ( ) ; day . set ( year , month , 1 ) ; if ( action == AccessibilityNodeInfo . ACTION_SCROLL_FORWARD ) { day . add ( Calendar . MONTH , 1 ) ; if ( day . get ( Calendar . MONTH ) == 12 ) { day . set ( Calendar . MONTH , 0 ) ; day . add ( Calendar . YEAR , 1 ) ; } } else if ( action == AccessibilityNodeInfo . ACTION_SCROLL_BACKWARD ) { View firstVisibleView = getChildAt ( 0 ) ; if ( firstVisibleView != null && firstVisibleView . getTop ( ) >= - 1 ) { day . add ( Calendar . MONTH , - 1 ) ; if ( day . get ( Calendar . MONTH ) == - 1 ) { day . set ( Calendar . MONTH , 11 ) ; day . add ( Calendar . YEAR , - 1 ) ; } } } announceForAccessibility ( getMonthAndYearString ( day ) ) ; goTo ( day . getTimeInMillis ( ) , true , false , true ) ; mPerformingScroll = true ; return true ; }
when scroll forward / backward events are received , announce the newly scrolled - to month .
