Skip to content

Commit

Permalink
revert wip
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasKaminsky committed May 13, 2016
1 parent 140e923 commit a9fbec2
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/third_parties/michaelOrtiz/TouchImageViewCustom.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

package third_parties.michaelOrtiz;

import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.ui.preview.ImageViewCustom;

import android.annotation.TargetApi;
Expand All @@ -28,7 +27,6 @@
import android.os.Build.VERSION_CODES;
import android.os.Bundle;
import android.os.Parcelable;
import android.support.design.widget.Snackbar;
import android.util.AttributeSet;
import android.util.Log;
import android.view.GestureDetector;
Expand Down Expand Up @@ -101,8 +99,6 @@ private static enum State { NONE, DRAG, ZOOM, FLING, ANIMATE_ZOOM };
private OnTouchListener userTouchListener = null;
private OnTouchImageViewListener touchImageViewListener = null;

private Boolean showDownloadSnackbar = false;

public TouchImageViewCustom(Context context) {
super(context);
sharedConstructing(context);
Expand Down Expand Up @@ -898,22 +894,6 @@ public boolean onScaleBegin(ScaleGestureDetector detector) {
@Override
public boolean onScale(ScaleGestureDetector detector) {
scaleImage(detector.getScaleFactor(), detector.getFocusX(), detector.getFocusY(), true);
Log_OC.d("TouchImageView", "zoom: " + normalizedScale);

if (normalizedScale > 2 && !showDownloadSnackbar){
Snackbar snackbar = Snackbar
.make(getRootView(), "Automatically download full image", Snackbar.LENGTH_LONG)
.setAction("UNDO", new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar snackbar1 = Snackbar.make(getRootView(), "Message is restored!", Snackbar.LENGTH_SHORT);
snackbar1.show();
}
});

snackbar.show();
showDownloadSnackbar = true;
}

//
// OnTouchImageViewListener is set: TouchImageView pinch zoomed by user.
Expand Down

0 comments on commit a9fbec2

Please sign in to comment.