1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-28 04:02:19 -05:00

Fix pinch-to-zoom. Patch by achen.code. Fixes isue 2720

This commit is contained in:
Jesse Vincent 2010-11-30 01:42:00 +00:00
parent 174a62536e
commit 1ce9021ecd

View File

@ -223,6 +223,19 @@ public class MessageView extends K9Activity implements OnClickListener
// Text selection is finished. Allow scrolling again. // Text selection is finished. Allow scrolling again.
mToggleScrollView.setScrolling(true); 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); return super.dispatchTouchEvent(ev);
} }