Search code examples
androidwebviewrenderepub

render the epub book in android?


I am try to show epub book in android pad. I can parse the html and css, in order to show the book's content and format, perhaps the book include pictures, It seems that I have two option:

  1. use Webview.
  2. Write a customer view, so that it can render html/css --- it seems a very complicated task.

Which is the good way? If I have to use WebView, how about the page break logic, since webview parse one html file in one page, I can not find the page break in webview.


Solution

  • Nice One, But in Question... :-)

    I don't think any Page Break logic for android webview is available, As per your concern WebView is the good choice to display .epub file (You can add many functionality like, highlight, search, bookmark etc..). And If you found that one then what about if device size is changed. What I am doing is, I just display WebPage in webview and disable scroll, Then I can find the max height of webview, and device screen size (Height and width), Now I have put two buttons for next and previous pages, which just scroll page according to height of device size..

    Something easy.. Try this if you want to... (This is my personal opinion may be I am wrong on this)