summaryrefslogtreecommitdiff
path: root/GymLog/src/main/java/com/mikemiller/gymlog/DoubleTapDetector.java
diff options
context:
space:
mode:
authormikem <mikem@oliodevices.com>2014-03-30 18:24:58 -0600
committermikem <mikem@oliodevices.com>2014-03-30 18:24:58 -0600
commit99bb04032209271f0ed416bb42ea5ab09de23eb8 (patch)
tree178db047ffd8194998ed81c7cf336ac9fa9ffcbd /GymLog/src/main/java/com/mikemiller/gymlog/DoubleTapDetector.java
downloadGymLog-99bb04032209271f0ed416bb42ea5ab09de23eb8.tar.xz
GymLog-99bb04032209271f0ed416bb42ea5ab09de23eb8.zip
Initial commit. Double tap to increment weight, long press to decrement, fling up/down in increment/decrement reps, swipe left/right to navigate through exercises.
Currently uses a hard-coded list of exercises that vary depending on the day of the week.
Diffstat (limited to 'GymLog/src/main/java/com/mikemiller/gymlog/DoubleTapDetector.java')
-rw-r--r--GymLog/src/main/java/com/mikemiller/gymlog/DoubleTapDetector.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/GymLog/src/main/java/com/mikemiller/gymlog/DoubleTapDetector.java b/GymLog/src/main/java/com/mikemiller/gymlog/DoubleTapDetector.java
new file mode 100644
index 0000000..4b42bc4
--- /dev/null
+++ b/GymLog/src/main/java/com/mikemiller/gymlog/DoubleTapDetector.java
@@ -0,0 +1,30 @@
+package com.mikemiller.gymlog;
+
+import android.content.Context;
+import android.view.GestureDetector;
+import android.view.MotionEvent;
+
+/**
+ * Created by Mike on 3/29/14. COPYRIGHT OLIO.
+ */
+public class DoubleTapDetector extends GestureDetector.SimpleOnGestureListener {
+ public Context context;
+ public String phno;
+
+ public DoubleTapDetector(Context con)
+ {
+ this.context=con;
+ }
+ @Override
+ public boolean onDown(MotionEvent e) {
+ return false;
+ }
+ @Override
+ public boolean onDoubleTap(MotionEvent e) {
+ return true;
+ }
+ @Override
+ public boolean onSingleTapUp(MotionEvent e) {
+ return false;
+ }
+} \ No newline at end of file