Skip to content

Commit

Permalink
updata zoomable test
Browse files Browse the repository at this point in the history
  • Loading branch information
Bjelijah committed Jun 25, 2018
1 parent 8040f62 commit 1f87183
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
public class ZoomableTextureView extends GLESTextureView {

public interface OnTouchCb{
void onTouchCb(View view,MotionEvent motionEvent);
boolean onTouchCb(View view,MotionEvent motionEvent);
}
private static final String SUPERSTATE_KEY = "superState";
private static final String MIN_SCALE_KEY = "minScale";
Expand Down Expand Up @@ -119,7 +119,7 @@ public ZoomOnTouchListeners() {

@Override
public boolean onTouch(View view, MotionEvent motionEvent) {

boolean ret = true;
mScaleDetector.onTouchEvent(motionEvent);

matrix.getValues(m);
Expand All @@ -135,7 +135,7 @@ public boolean onTouch(View view, MotionEvent motionEvent) {
break;
case MotionEvent.ACTION_UP:
if (mCb!=null && mode != ZOOM){
mCb.onTouchCb(view,motionEvent);
ret = mCb.onTouchCb(view,motionEvent);
}
mode = NONE;
break;
Expand Down Expand Up @@ -167,7 +167,7 @@ else if (x + deltaX < -right)
}
ZoomableTextureView.this.setTransform(matrix);
ZoomableTextureView.this.invalidate();
return true;
return ret;
}

private class ScaleListener extends ScaleGestureDetector.SimpleOnScaleGestureListener {
Expand Down

0 comments on commit 1f87183

Please sign in to comment.