2011-09-28 4 views
1

지금은 전자 책 리더에서 일하고 있습니다 .i는이 http://www.siegmann.nl/epublib/android에서 epub 라이브러리를 얻었습니다.하지만 내용을 한 줄씩 읽고 프로젝트에있는 내용을 강조하는 옵션이 있습니다. 만드는 방법 그것은 가능합니다 .. 미리 감사드립니다.android에서 epub 파일을 읽는 방법은 무엇입니까?

+0

정확하게 문제는 무엇입니까? –

+0

나는 가능한 한 textview.is에 epub 교과서를 보여주고 싶다? f yes how? 적절한 대답은 ... – daffodils

+0

@ daffodils 나는 그 사이트에서 다운로드되었지만 작동하지 않는다. – PankajAndroid

답변

1

그래서 나는 그 대답을 어떻게 생각해 냈는지 모르겠다.

귀하의 현재 질문에 대해 척추 색인 (정보가 메타 데이터에있는 경우)이 목차와 달리 차별화 된 내용 또는 목차를 볼 수 있습니다. 이제 척추 인덱스가 어떻게

:

이제
Spine spine = new Spine(book.getTableOfContents()); 
List<SpineReference> spineList = spine.getSpineReferences(); //List of spine information 
Resource res = spine.getResource(1);//1 is an example to proper utilize this you have to store the information on which part you are in and how much you rendered. I suggest keeping a static integer on what your location is and after this part is done you can go to the next one and so on. 
InputStream is = res.getInputStream();//getting the inputstream 
StringBuilder string = new StringBuilder();//Create a builder as we will add more information to the string 
BufferedReader reader = new BufferedReader(new InputStreamReader(is)); 
string html,line = null; 
while ((line = reader.readLine()) != null) {//start reading the information line by line 
html = string.append(line + "\n").toString();//get information for line by line basis 
} 

올바른 정보를 얻을 수있는 텍스트에서 HTML 정보를 분석 할 필요가가는 내용의 테이블에 대한 지금

1 줄의 변경을 제외하고는 상단과 동일해야합니다.

ArrayList<TOCReference> book_list = new ArrayList<TOCReference>(amBook().getTableOfContents().getTocReferences()); 

같은 방식으로 읽는 것이 좋습니다. BufferReader -> Inputstream

+0

-1, 나는 그가 html로 readinring하지 않고 epub 파일을 읽는 것에 대해 질문하고 있다고 생각한다. –

+0

흠 .... 네가 내 대답을 바꿀거야. – wesdfgfgd

+0

완료되었습니다. 변경했습니다. – wesdfgfgd

관련 문제