1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-24 10:22:15 -05:00

add double-tap at top or bottom to jump to the top or bottom of the message

This commit is contained in:
Jesse Vincent 2009-11-22 21:23:49 +00:00
parent 30459125aa
commit 8e0655d915

View File

@ -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) {