59 lines
1.7 KiB
Java
59 lines
1.7 KiB
Java
package c.o.a.q;
|
|
|
|
import android.view.GestureDetector;
|
|
import android.view.MotionEvent;
|
|
import androidx.annotation.NonNull;
|
|
import c.o.a.q.c;
|
|
import com.otaliastudios.cameraview.CameraView;
|
|
/* compiled from: TapGestureFinder */
|
|
public class g extends c {
|
|
public GestureDetector d;
|
|
public boolean e;
|
|
|
|
/* compiled from: TapGestureFinder */
|
|
public class a extends GestureDetector.SimpleOnGestureListener {
|
|
public a() {
|
|
}
|
|
|
|
@Override // android.view.GestureDetector.SimpleOnGestureListener, android.view.GestureDetector.OnGestureListener
|
|
public void onLongPress(MotionEvent motionEvent) {
|
|
g gVar = g.this;
|
|
gVar.e = true;
|
|
gVar.b = a.LONG_TAP;
|
|
}
|
|
|
|
@Override // android.view.GestureDetector.SimpleOnGestureListener, android.view.GestureDetector.OnGestureListener
|
|
public boolean onSingleTapUp(MotionEvent motionEvent) {
|
|
g gVar = g.this;
|
|
gVar.e = true;
|
|
gVar.b = a.TAP;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
public g(@NonNull c.a aVar) {
|
|
super(aVar, 1);
|
|
GestureDetector gestureDetector = new GestureDetector(((CameraView.b) aVar).g(), new a());
|
|
this.d = gestureDetector;
|
|
gestureDetector.setIsLongpressEnabled(true);
|
|
}
|
|
|
|
@Override // c.o.a.q.c
|
|
public float b(float f, float f2, float f3) {
|
|
return 0.0f;
|
|
}
|
|
|
|
public boolean c(@NonNull MotionEvent motionEvent) {
|
|
if (motionEvent.getAction() == 0) {
|
|
this.e = false;
|
|
}
|
|
this.d.onTouchEvent(motionEvent);
|
|
if (!this.e) {
|
|
return false;
|
|
}
|
|
this.f1502c[0].x = motionEvent.getX();
|
|
this.f1502c[0].y = motionEvent.getY();
|
|
return true;
|
|
}
|
|
}
|