code: protected void onPreTransform(View view, float position) {
          final float width = view.getWidth();
  
          ViewHelper.setRotationX(view,0);
          ViewHelper.setRotationY(view,0);
          ViewHelper.setRotation(view,0);
          ViewHelper.setScaleX(view,1);
          ViewHelper.setScaleY(view,1);
          ViewHelper.setPivotX(view,0);
          ViewHelper.setPivotY(view,0);
          ViewHelper.setTranslationY(view,0);
          ViewHelper.setTranslationX(view,isPagingEnabled() ? 0f : -width * position);
  
          if (hideOffscreenPages()) {
              ViewHelper.setAlpha(view,position <= -1f || position >= 1f ? 0f : 1f);
          } else {
              ViewHelper.setAlpha(view,1f);
          }
          if(mCustomAnimationInterface != null){
              if(h.containsKey(view) == false || h.get(view).size() == 1){
                  if(position > -1 && position < 1){
                      if(h.get(view) == null){
                          h.put(view,new ArrayList<Float>());
                      }
                      h.get(view).add(position);
                      if(h.get(view).size() == 2){
                          float zero = h.get(view).get(0);
                          float cha = h.get(view).get(1) - h.get(view).get(0);
                          if(zero > 0){
                              if(cha > -1 && cha < 0){
                                  //in
                                  mCustomAnimationInterface.onPrepareNextItemShowInScreen(view);
                              }else{
                                  //out
                                  mCustomAnimationInterface.onPrepareCurrentItemLeaveScreen(view);
                              }
                          }else{
                              if(cha > -1 && cha < 0){
                                  //out
                                  mCustomAnimationInterface.onPrepareCurrentItemLeaveScreen(view);
                              }else{
                                  //in
                                  mCustomAnimationInterface.onPrepareNextItemShowInScreen(view);
                              }
                          }
                      }
                  }
              }
          }
      }
docs: Called each {@link #transformPage(View, float)} before {{@link #onTransform(View, float)} is called.
  
  @param view
  @param position