kebernet / shortyz

Shortyz Crosswords
GNU General Public License v3.0
107 stars 56 forks source link

Would-be-nice-if puzzle were centered horizontally when zoomed-to-fit #5

Open jxyzn opened 8 years ago

jxyzn commented 8 years ago

When using Zoom > Fit to screen, the puzzle it aligned to the left edge of the screen, leaving lots of dead space on the right. Additionally, if the device has a raised bezel, this makes it difficult to tap the leftmost cells.

This would be overcome if the puzzle were instead displayed centered.

kebernet commented 8 years ago

Yeah. I need to look around and see if there is a more reasonable solution for the ScrollingImageView.

A bit of history here: In the time before time, Shortyz was one of the first apps to support MultiTouch on Android when it was very new, and there weren't good solutions for doing a zoomable image, so that code is all custom. In truth, I am sure there is a better solution somewhere now, but making sure that whatever it is supports (a) re-painting the image to a higher resolution after-zoom and maintaining the scroll position (otherwise you get pixelated text) and (b) allowing me to get the proper location of the action after it ends (so the box you zoomed around is still visible). Most of the Multi-touch image classes I have seen don't do this yet. Doing the math to maintain center is strangely harder than you would think it would be because of bugs in older Samsung devices around display metrics.

I will try to revisit this, though.