befora / Kuboo

Kotlin + Ubooquity = Kuboo
Apache License 2.0
83 stars 41 forks source link

Right to Left double page navigation #62

Closed gotson closed 5 years ago

gotson commented 5 years ago

I have some mangas (right to left reading order) composed of double pages scans, and i'm trying to read in half pages.

I set Kuboo in Aspect Fill so that only 1 of the 2 pages is shown at a time, and I set the reading order to RTL.

However there's some issues when navigating:

Basically at the moment:

Ideally the best navigation would be to have something like Comicrack Android has:

befora commented 5 years ago

Fixes are live in 1.2 on the beta channel.

gotson commented 5 years ago

Thanks, it fixes some of the issues, but touching the left side of the screen will only move to the next double page, and not scroll to the second part. That means navigation can only be achieved using scrolling, and not using touch or volume keys.

befora commented 5 years ago

Coffee, black, lets do this.

gotson commented 5 years ago

one more thing i noticed is that when arriving on a double page, it shows the section that was last shown. To ensure proper navigation, it should take into account where you are coming from.

So if browsing forward, it should show the right part in RTL (and left in LTR), but when browsing backward, it should show the left part in RTL (and right in LTR).

Normally that should not happen with the current behaviour, as one will always move to the second part of the double page before going to the next page, so when moving back it should show the last part shown, which was the second part.

Hope that's not too confusing ! 😅

befora commented 5 years ago

So if browsing forward, it should show the right part in RTL (and left in LTR), but when browsing backward, it should show the left part in RTL (and right in LTR).

Could you check if this is fixed, should be in the beta. Might not affect recycled fragments but immediate left and right are working.

commit https://github.com/sethchhim/Kuboo/commit/a2d89dae3453e93722fc0be33562cb324c67e742

befora commented 5 years ago

First draft of new feature available in 1.2.1 on the beta channel after Google approves it. That's all the time I have today, feedback is welcome.

befora commented 5 years ago

So if browsing forward, it should show the right part in RTL (and left in LTR), but when browsing backward, it should show the left part in RTL (and right in LTR).

I am able to recreate this issue. My earlier fix is not robust enough.

gotson commented 5 years ago

it's working, but now i'm not too sure if the different fit/fill options are making sense for double page.

Using aspect fill, it's filling the vertical, but given the ratios it doesn't display exactly half of a double page, but a little less. So when touching to go next, it will go maybe to the 2/3 of the page, and one more touch will go the last part.

Ideally we would need to have a double page display mode where it fills the viewport width with half of the page, in vertical mode. That would work for comics that are fully double page, but not when there is only a few in the book though. Somehow Comicrack managed this seamlessly, i'm not sure how they did that 🤔

I also noticed another potential bug, when using the existing double page mode (which switches to horizontal) and aspect fit, i can only scroll or touch to the right (whatever RTL or LTR).

befora commented 5 years ago

Using aspect fill, it's filling the vertical, but given the ratios it doesn't display exactly half of a double page, but a little less. So when touching to go next, it will go maybe to the 2/3 of the page, and one more touch will go the last part.

Hard coded a 12% negative offset, probably will make a setting in the advanced section.

Ideally we would need to have a double page display mode where it fills the viewport width with half of the page, in vertical mode. That would work for comics that are fully double page, but not when there is only a few in the book though. Somehow Comicrack managed this seamlessly, i'm not sure how they did that 🤔

This is just my implementation, I have no plans to rewrite it, only fix bugs. If this is critical, I am happy to review pull requests.

I also noticed another potential bug, when using the existing double page mode (which switches to horizontal) and aspect fit, i can only scroll or touch to the right (whatever RTL or LTR).

I am unable to recreate this issue.

befora commented 5 years ago

I also noticed another potential bug, when using the existing double page mode (which switches to horizontal) and aspect fit, i can only scroll or touch to the right (whatever RTL or LTR).

I am able to recreate this now.

befora commented 5 years ago

Using aspect fill, it's filling the vertical, but given the ratios it doesn't display exactly half of a double page, but a little less. So when touching to go next, it will go maybe to the 2/3 of the page, and one more touch will go the last part.

fixed https://github.com/sethchhim/Kuboo/commit/7fe9a1d5fcdedd45b28c3bb023588315deb9ed4e

I also noticed another potential bug, when using the existing double page mode (which switches to horizontal) and aspect fit, i can only scroll or touch to the right (whatever RTL or LTR).

fixed https://github.com/sethchhim/Kuboo/commit/b254cade2f2eb6e19a4d1999de16a7c013ad2103