xpe*_*int 8 android epub epublib
我在Android上玩http://www.siegmann.nl/epublib.有人可以解释正确的方法
这是10倍.
小智 5
关于你的问题:
我不确定你是什么意思.你想要所有的内容吗?或具体的东西?所有内容都可以使用Book.getContent().
我会用WebView它.虽然我没有尝试过.
我不知道哪种方法效果最好.
nl.siegmann.epublib.searchepublib-tools中的包具有简单搜索功能的代码.
答案#2:
protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.epub_reader);
webView = (WebView) findViewById(R.id.webview);
Book book = (new EpubReader()).readEpub(new FileInputStream(filename);
String baseUrl="file://mnt/sdcard/epub/OEBPS/"
String data = new String(book.getContents().get(2).getData());
webView.loadDataWithBaseURL(baseUrl, data, "text/html", "UTF-8", null);
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5804 次 |
| 最近记录: |