NightWhistler / PageTurner

Android e-book reader with cloud synchronization
pageturner-reader.org
GNU General Public License v3.0
466 stars 221 forks source link

BookView get scrolled and text get cut off #555

Closed TLHP closed 10 years ago

TLHP commented 10 years ago

Hi,

You can see at the right side with scrollbar and text on top get cut off

screenshot_2014-06-25-23-52-52

Cheers

NightWhistler commented 10 years ago

Hi,

There are a number of issues where the text measuring seems to give incorrect results, causing glitches like this. I haven't been able to figure out why though.

TLHP commented 10 years ago

Do you have any suggestion where to look for? I will try to dig deeper into it and let you know :)

NightWhistler commented 10 years ago

If you look in FixedPagesStrategy, there's a method called

public List<Integer> getPageOffsets(CharSequence text, boolean includePageNumbers ) {

It uses a StaticLayout to calculate where pages should end. My current theory is that this gets the numbers subtly wrong sometimes. I might be wrong though.

NightWhistler commented 10 years ago

Closing this issue since TLHP was kind enough to send a pull request with a fix.