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:
parent
30459125aa
commit
8e0655d915
@ -1464,6 +1464,20 @@ public class MessageView extends K9Activity
|
|||||||
|
|
||||||
|
|
||||||
class MyGestureDetector extends SimpleOnGestureListener {
|
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
|
@Override
|
||||||
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
|
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user