From 1ce9021ecd15365aac6f3571c12d401965c91cb4 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Tue, 30 Nov 2010 01:42:00 +0000 Subject: [PATCH] Fix pinch-to-zoom. Patch by achen.code. Fixes isue 2720 --- src/com/fsck/k9/activity/MessageView.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/com/fsck/k9/activity/MessageView.java b/src/com/fsck/k9/activity/MessageView.java index ffdf3198b..23996d9f3 100644 --- a/src/com/fsck/k9/activity/MessageView.java +++ b/src/com/fsck/k9/activity/MessageView.java @@ -223,6 +223,19 @@ public class MessageView extends K9Activity implements OnClickListener // Text selection is finished. Allow scrolling again. mToggleScrollView.setScrolling(true); } + else if (K9.zoomControlsEnabled()) + { + // If we have system zoom controls enabled, disable scrolling so the screen isn't wiggling around while + // trying to zoom. + if (ev.getAction() == MotionEvent.ACTION_POINTER_2_DOWN) + { + mToggleScrollView.setScrolling(false); + } + else if (ev.getAction() == MotionEvent.ACTION_POINTER_2_UP) + { + mToggleScrollView.setScrolling(true); + } + } return super.dispatchTouchEvent(ev); }