code: private static float computeTranslation(float viewSize, float drawableSize, float currentTranslation, float delta) {
  		final float sideFreeSpace = (viewSize - drawableSize) / 2F;
  
  		if(sideFreeSpace > 0) {
  			return sideFreeSpace - currentTranslation;
  		} else if(currentTranslation + delta > 0) {
  			return -currentTranslation;
  		} else if(currentTranslation + delta < viewSize - drawableSize) {
  			return viewSize - drawableSize - currentTranslation;
  		}
  
  		return delta;
  	}
docs: The translation values must be in [0, viewSize - drawableSize], except if we have free space. In that case we will translate to half of the free space