myefdok / apv

Automatically exported from code.google.com/p/apv
GNU General Public License v3.0
0 stars 0 forks source link

Zoom with two fingers #55

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I would really like to zoom in and out without using the + and - buttons. Is it 
possible to implement the multi-touch method used in Adobe Reader for Android?

Original issue reported on code.google.com by jostein....@gmail.com on 17 Aug 2011 at 6:29

GoogleCodeExporter commented 9 years ago
It is possible ;)

Original comment by mpietrzak on 19 Aug 2011 at 3:16

GoogleCodeExporter commented 9 years ago
Or at least an option to hide the obstructive zoom buttons.

Original comment by rodolfo....@gmail.com on 25 Aug 2011 at 10:46

GoogleCodeExporter commented 9 years ago
Can you give me a hint on how to do the multi-touch zoom method? Which code I 
can change? Thank you for your help

Original comment by ikate...@gmail.com on 6 Sep 2011 at 6:08

GoogleCodeExporter commented 9 years ago
I am not sure, but it might be in the gestureDetector-methods in 
cx.hell.android.lib.pagesview/PagesView.java

Original comment by jostein....@gmail.com on 6 Sep 2011 at 6:34

GoogleCodeExporter commented 9 years ago
Thank you!

Original comment by ikate...@gmail.com on 6 Sep 2011 at 6:48

GoogleCodeExporter commented 9 years ago
#3, could you post your solution? I'm trying but i didn't find how to do it. 
Thanks! :)

Original comment by mobilebr...@gmail.com on 14 Oct 2011 at 12:54

GoogleCodeExporter commented 9 years ago
My wife got a Kindle Fire, so I started implementing this.  The pinch detection 
is trivial.  Unfortunately, the obvious implementation failed because APV was 
re-rendering the pdf file at each zoom level, which was ridiculously slow.

One way to do it is to just rescale the cached tiles, and then when the user 
lets go of the screen, re-render fully.  This won't look great, but it should 
work.

Original comment by arpruss on 14 Dec 2011 at 12:22

GoogleCodeExporter commented 9 years ago
I also tried to implement this. My achieved performance was quite low, the 
rendering was very laggy. Same problem as described by arpruss@gmail.com.

Original comment by ge...@gogreenpost.com on 14 Dec 2011 at 3:56

GoogleCodeExporter commented 9 years ago
Did you do this by simply re-rendering, or just by re-sizing pre-cached tiles?

The latter should work pretty quickly.  It's just that if you zoom out past the 
cached area, you'll get black squares around until you let go.  But it's better 
than nothing, I think.

Original comment by arpruss on 14 Dec 2011 at 6:50

GoogleCodeExporter commented 9 years ago

Original comment by arpruss on 14 Dec 2011 at 6:50

GoogleCodeExporter commented 9 years ago
@arpruss

I didn't try to resize cached tiles. It was just re-rendering. Zooming 
pre-cached files is not that easy right?

Original comment by ge...@gogreenpost.com on 1 Jan 2012 at 12:51

GoogleCodeExporter commented 9 years ago
@arpruss

Could you please give some light on how to first zoom in pre-cached tiles 
instead of re-rendering so that we can implement it? Or please contribute, may 
be as an experimental feature?

Thanks, Geeth.

Original comment by ge...@gogreenpost.com on 1 Jan 2012 at 12:54

GoogleCodeExporter commented 9 years ago
I just implemented it and put it in the repository.

Original comment by arpruss on 20 Apr 2012 at 2:33

GoogleCodeExporter commented 9 years ago
@arpruss

Hi, I did checkout the code to a very new repo. but cannot see changes. How to 
get zoom checked out?

Original comment by karunadh...@gmail.com on 22 Aug 2012 at 7:13

GoogleCodeExporter commented 9 years ago
@arpruss pinch zoom now is working as expected. Thanks!

Original comment by karunadh...@gmail.com on 27 Aug 2013 at 12:15