ailiboy / ebookdroid

Automatically exported from code.google.com/p/ebookdroid
0 stars 0 forks source link

In some situation multi touch throws an exception. #138

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Down 1st finger.
2. Down 2nd finger.
3. Down 3rd finger.
4. Up 3rd finger.
5. Down 3rd finger.
6. Up 2nd finger.
7. Down 2nd finger.

What is the expected output? What do you see instead?
Everything should without error. I see an error message.

What version of the product are you using? On what operating system?
ebookdroid r870, Android 3.2.1

What device are you using?
Archos 80 G9

Please provide any additional information below.
A fix for this issue:
File MultiTouchZoomImpl.

    private float getZoomDistance(final MotionEvent ev) {
        if (ev.getPointerCount() > 1) {
            // We do not need actual distance. Square also goes well.
            final float x0 = ev.getX(0);
            final float x1 = ev.getX(1);
            final float y0 = ev.getY(0);
            final float y1 = ev.getY(1);
            final float dx = (x0 - x1);
            final float dy = (y0 - y1);
            return (dx * dx + dy * dy);
        }
        return lastZoomDistance;
    }

Sorry can't attach patch file, your project attachment quota exceeded.

Original issue reported on code.google.com by Zerd...@gmail.com on 29 Jan 2012 at 3:09

GoogleCodeExporter commented 9 years ago
Just did some tests. On my acer iconia both implementations works the same. So 
if on archos your code works better I think we can use it.

Original comment by Andrei.K...@gmail.com on 29 Jan 2012 at 7:27

GoogleCodeExporter commented 9 years ago
Fixed in trunk

Original comment by Andrei.K...@gmail.com on 30 Jan 2012 at 12:09