@Override
 public void setPrimaryItem(ViewGroup container, int position, Object object) {
   super.setPrimaryItem(container, position, object);
   currentMonth = (CalendarFragment) object;
   if (currentMonth.getGridAdapter() != null) {
     currentMonth.getGridAdapter().updateContent();
   }
 }
 @Override
 public void setPrimaryItem(ViewGroup container, int position, Object object) {
   super.setPrimaryItem(container, position, object);
   // Hack to allow the non-primary fragments to start properly
   if (object != null) {
     ((Fragment) object).setUserVisibleHint(false);
   }
 }
 @Override
 public void setPrimaryItem(ViewGroup container, int position, Object object) {
   super.setPrimaryItem(container, position, object);
   if (object != primaryFragment) {
     primaryFragment = object;
     setCurrentFragment(primaryFragment);
   }
 }