From 8e0655d9151e41ec0b42effcad7fa2622b71a24a Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Sun, 22 Nov 2009 21:23:49 +0000 Subject: [PATCH] add double-tap at top or bottom to jump to the top or bottom of the message --- src/com/android/email/activity/MessageView.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/com/android/email/activity/MessageView.java b/src/com/android/email/activity/MessageView.java index 63966523b..52511ae78 100644 --- a/src/com/android/email/activity/MessageView.java +++ b/src/com/android/email/activity/MessageView.java @@ -1464,6 +1464,20 @@ public class MessageView extends K9Activity class MyGestureDetector extends SimpleOnGestureListener { + @Override + public boolean onDoubleTap(MotionEvent ev) { + super.onDoubleTap(ev); + int height = getResources().getDisplayMetrics().heightPixels; + if (ev.getRawY() < (height/4)) { + mTopView.fullScroll(mTopView.FOCUS_UP); + + } else if (ev.getRawY() > (height - height/4)) { + mTopView.fullScroll(mTopView.FOCUS_DOWN); + + } + return false; + } + @Override public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {