Esempio n. 1
0
 private void applyZoomLevel() {
   if (image != null && image.canZoom()) {
     switch (zoomLevel) {
       case 0:
         image.setScale(image.getMinimumScale(), true);
         break;
       case 1:
         image.setScale(image.getMediumScale(), true);
         break;
       case 2:
         image.setScale(image.getMaximumScale(), true);
         break;
     }
   }
 }
  public void animationExit(ObjectAnimator backgroundAnimator) {

    if (Math.abs(photoView.getScale() - 1.0f) > 0.1f) {
      photoView.setScale(1, true);
      return;
    }

    getActivity().overridePendingTransition(0, 0);
    animateClose(backgroundAnimator);
  }