I want to make a multipage ebook reader using viewPager. suppose I have a full screen textView inside a viewPager. Now I want to insert the exact number of text characters which will be fit inside the textView. You might be observed this strategy in Moon reader, fb reader. I can handle all the coding part except calculating the number of caracters can fit inside the textView. Any suggestion will be appreciated.
Asked
Active
Viewed 81 times
0
-
1The number of characters that will fit depends on which characters are there. You can fit a lot more i's than W's. It also depends on your text-wrapping. If you do word-wrapping, then it depends on the length of your words. In short, you cannot *predict* with any accuracy. – Andreas Jan 17 '19 at 03:40
-
1I am not sure about Thease apps . But you can try such thing with `TextView#getPaint()` . See [This](https://stackoverflow.com/questions/5970640/how-to-find-android-textview-number-of-characters-per-line) and similar links . – ADM Jan 17 '19 at 03:41