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
1 changed files with 13 additions and 0 deletions

View File

@ -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);
}