I have some text in a file [~100 KB] that needs to be displayed to the user in a TextView. I want to split the text into pages.
This is the idea I have in mind to implement pagination:
- Determine screen width and screen height, say
320 x 480. - Calculate 75% of height, [360
px] to accommodate buttons etc. - Determine font size
- Calculate number of characters [
N] that can be displayed. - Read from file and display only
Nnumber of characters.
This seems like it would work, but it seems crude and error-prone. Does anyone have better ideas?