import android.widget.ImageView.ScaleType; import java.lang.ref.WeakReference; public class PhotoViewAttacher implements IPhotoView, View.OnTouchListener, VersionedGestureDetector.OnGestureListener, GestureDetector.OnDoubleTapListener, ViewTreeObserver.OnGlobalLayoutListener { static final String LOG_TAG = "PhotoViewAttacher"; // let debug flag be dynamic, but still Proguard can be used to remove from release builds static final boolean DEBUG = Log.isLoggable(LOG_TAG, Log.DEBUG); static final int EDGE_NONE = -1; static final int EDGE_LEFT = 0; static final int EDGE_RIGHT = 1; static final int EDGE_BOTH = 2; public static final float DEFAULT_MAX_SCALE = 3.0f; public static final float DEFAULT_MID_SCALE = 1.75f; public static final float DEFAULT_MIN_SCALE = 1.0f;