SkyEpub SDK for Android 7
 All Classes Functions Variables
Public Member Functions | List of all members
com.skytree.epub.ReflowableControl Class Reference
Inheritance diagram for com.skytree.epub.ReflowableControl:

Public Member Functions

 ReflowableControl (Context context)
 
 ReflowableControl (Context context, int backgroundColor)
 
void changeBackgroundColor (int color)
 
void changeForegroundColor (int color)
 
void changeFontName (String name)
 
void changeFontSize (int size)
 
void changeLineSpacing (int lineSpace)
 
void changeFont (String fontName, int fontSize)
 
void changeFont (String fontName, int fontSize, int lineSpace)
 
void setFontName (String name)
 
void setFontSize (int size)
 
void setFont (String name, int size)
 
void setLineSpacing (int ls)
 
void setBackgroundColor (int color)
 
void setForegroundColor (int color)
 
void setPagesStackImage (Bitmap bitmap)
 
void setPagesCenterImage (Bitmap bitmap)
 
void setHorizontalGapRatio (double hgr)
 
void setVerticalGapRatio (double vgr)
 
void setNavigationAreaWidthRatio (float navigationAreaWidthRatio)
 
void useDOMForHighlight (boolean useDOM)
 
void setHighlightListener (HighlightListener highlightListener)
 
void setPageMovedListener (PageMovedListener pageMovedListener)
 
void setSelectionListener (SelectionListener selectionListener)
 
void setSearchListener (SearchListener searchListener)
 
void setStateListener (StateListener stateListener)
 
void setClickListener (ClickListener clickListener)
 
void setContentListener (ContentListener contentListener)
 
void searchKey (String key)
 
void stopSearch ()
 
void pauseSearch ()
 
void searchMore ()
 
void gotoPageByNavPointIndex (int index)
 
void gotoPageByHighlight (Highlight highlight)
 
void gotoPageByNavPoint (NavPoint navPoint)
 
void markSelection (int color, String note)
 
void gotoPageByPagePositionInBook (double pagePositionInBook)
 
void setDoublePagedForLandscape (boolean doublePaged)
 
void setStartPositionInBook (float startPositionInBook)
 
NavPoints getNavPoints ()
 
void setLayoutParams (ViewGroup.LayoutParams params)
 
void setBaseDirectory (String baseDirectory)
 
void setBookName (String bookName)
 
void setBookPath (String filePath)
 
String executeScript (String script)
 
void setBookCode (int bookCode)
 
String getNodeName (int x, int y)
 
String getNodeText (int x, int y)
 
String getNodeSource (int x, int y)
 
void reload ()
 
void lockRotation ()
 
void unlockRotation ()
 
void gotoPageInChapter (int pageIndex)
 
void gotoNextPageInChapter ()
 
void gotoPrevPageInChapter ()
 
int pageCountInChapter ()
 
int pageIndexInChapter ()
 
boolean isMediaOverlayAvailable ()
 
void playFirstParallelInPage ()
 
void pausePlayingParallel ()
 
void stopPlayingParallel ()
 
void playParallel (Parallel parallel)
 
void playParallelByIndex (int parallelIndex)
 
Parallel getParallelByIndex (int parallelIndex)
 
int parallelCountInChapter ()
 
void playNextParallel ()
 
void playPrevParallel ()
 
void resumePlayingParallel ()
 
boolean isPlayingPaused ()
 
boolean isPlayingStarted ()
 
void changeElementColor (String colorString, String hash)
 
void restoreElementColor ()
 
void setSequenceBasedForMediaOverlay (boolean isSequenceBased)
 
Rect getStartRect (Highlight highlight)
 
Rect getEndRect (Highlight highlight)
 
void debug0 (String msg)
 
void debug1 (String msg)
 
void debug2 (String msg)
 
void debug3 (String msg)
 
void debug4 (String msg)
 
void debug5 (String msg)
 
boolean isRTL ()
 
boolean isVerticalWriting ()
 
void setImmersiveMode (boolean isImmersiveMode)
 
void setSelectorColor (int selectorColor)
 
void setSelectionColor (int selectionColor)
 
void setRotationLocked (boolean locked)
 
void setLicenseKey (String key)
 
boolean isLicensed ()
 
int getVersion ()
 
void setPageTransition (PageTransition pageTransition)
 
void setPagingListener (PagingListener pagingListener)
 
void setGlobalPagination (boolean paging)
 
boolean isGlobalPagination ()
 
void setMediaOverlayListener (MediaOverlayListener mediaOverlayListener)
 
void setBookmarkListener (BookmarkListener bookmarkListener)
 
void repaint ()
 
void repaintAll ()
 
void setFingerTractionForSlide (boolean isFingerTraction)
 
boolean isFingerTraction ()
 
void setCurlQuality (double quality)
 
void changeHighlightColor (Highlight highlight, int color)
 
void changeHighlightNote (Highlight highlight, String note)
 
int getStartIndexInPage ()
 
int getEndIndexInPage ()
 
String getNodeTextByUniqueIndex (int index)
 
String getNodeNameByUniqueIndex (int index)
 
String getChapterTitle (int chapterIndex)
 
int getPageIndexInBook ()
 
int getNumberOfPagesInBook ()
 
int getPageIndexInChapter ()
 
int getNumberOfPagesInChapter ()
 
int getNumberOfChaptersInBook ()
 
int getChapterIndex ()
 
PageInformation getPageInformation (double pagePositionInBook)
 
PageInformation getPageInformationByPageIndex (int index)
 
void setBackgroundForLandscape (Bitmap backgroundForLandscape, Rect rectForLandscape, Rect contentRectForLandscape)
 
void setBackgroundForPortrait (Bitmap backgroundForPortrait, Rect rectForPortrait, Rect contentRectForPortrait)
 
void deleteHighlight (Highlight highlight)
 
boolean areHighlighsForSearchResultsDisplayed ()
 
void clearHighlightsForSearchResults ()
 
void gotoPageBySearchResult (SearchResult searchResult)
 
void gotoPageBySearchResult (SearchResult searchResult, ArrayList< SearchResult > searchResults)
 
void gotoPageBySearchResult (SearchResult searchResult, int color)
 
void gotoPageBySearchResult (SearchResult searchResult, ArrayList< SearchResult > searchResults, int color)
 
PagingInformation makePagingInformation (int chapterIndex)
 
void setMaxSizeForBackground (int maxLength)
 
void setScriptListener (ScriptListener scriptListener)
 
void setRawTextRequired (boolean isRequired)
 
void setContentProvider (ContentProvider contentProvider)
 
void setCustomDrawHighlight (boolean isCustomDraw)
 
void setCustomDrawCaret (boolean isCustomDraw)
 
void setFontUnit (String unit)
 
void setVideoListener (VideoListener videoListener)
 
void setSendingEventsToIFrameEnabled (boolean enabled)
 
void setSendingEventsToVideoEnabled (boolean enabled)
 
void setSendingEventsToAudioEnabled (boolean enabled)
 
void setGlobalOffset (boolean value)
 
void setExtractText (boolean value)
 
void setTTSLanguage (Locale ttsLocale)
 
void setTTSPitch (float pitch)
 
void setTTSSpeedRate (float rate)
 
void setTTSEnabled (boolean value)
 
boolean isTTSEnabled ()
 
void sayText (String text)
 
void setSystemSelectionEnabled (boolean value)
 
void keepBackgroundColor (boolean value)
 
void setScrollMode (boolean value)
 
boolean isScrollMode ()
 
void useSoftwareLayer ()
 
void setFullSearch (boolean value)
 
void setLongClickEnabled (boolean enabled)
 
void setUserSelectEnabled (boolean enabled)
 
void setDirectRead (boolean isDirectRead)
 
void registerExternalFont (String fontName, String fontPath)
 
void setRTL (boolean isRTL)
 
void destroy ()
 
void setSigilStyleEnabled (boolean enabled)
 
void setBookStyleEnabled (boolean enabled)
 
Book getBook ()
 
String getCoverURL ()
 
boolean isPaging ()
 
void setVibrationEnabled (boolean vi)
 
void setDrawingHighlightOnFront (boolean value)
 
void setHapticFeedback (boolean enabled)
 
int getWebViewVersion ()
 
boolean isDoublePaged ()
 
void showPages ()
 
void hidePages ()
 
void gotoLeft ()
 
void gotoRight ()
 
void gotoNextPage ()
 
void gotoPrevPage ()
 
void gotoNextChapter ()
 
void gotoPrevChapter ()
 
void stopPlayingMedia ()
 
void setContinuousCurling (boolean continous)
 
int getPageIndexInBookByPagePositionInBook (double pagePositionInBook)
 
int getChapterIndexByPageIndexInBook (int pageIndexInBook)
 
int getPageIndexByPageIndexInBook (int pageIndexInBook)
 
int getNumberOfPagesInChapter (int chapterIndex)
 
double getPagePositionByPageIndexInBook (int pageIndexInBook)
 
double getPagePositionInBookByPageIndexInBook (int pageIndexInBook)
 
int getChapterIndexByPagePositionInBook (double pagePositionInBook)
 
String getChapterURL (int chapterIndex)
 
void setStartPositionInBook (double startPositionInBook)
 
void setStartPosition (double startPositionInBook)
 
void setStartPosition (int chapterIndex, String hashLocation)
 
void setStartPosition (NavPoint navPoint)
 
PageInformation getPageInformation ()
 
void makeSelectionHighlight (int color, String note)
 
void markSelectionHighlight (int color, String note)
 
void markHighlight (final Highlight highlight)
 
void markParellelHighlight (final Parallel parallel, final int color)
 
void removeParallelHighlights ()
 

Detailed Description

ReflowableControl class is used for reflowable layout of epub. this class defines methods to handle every functions for reflowable layout. ReflowableControl class extends RelativeLayout. this class can be used like RelativeLayout usage in Android. and most of members in RelativeLayout is available.

Author
skytree

Constructor & Destructor Documentation

com.skytree.epub.ReflowableControl.ReflowableControl ( Context  context)

Contructor of ReflowableControl.

Parameters
contextandroid.content.Context
com.skytree.epub.ReflowableControl.ReflowableControl ( Context  context,
int  backgroundColor 
)

Contructor of ReflowableControl.

Parameters
contextandroid.content.Context
backgroundColorint Color

Member Function Documentation

boolean com.skytree.epub.ReflowableControl.areHighlighsForSearchResultsDisplayed ( )

tells whether Highlights for Search Results are displayed on screen or not

Returns
if displayed, true
void com.skytree.epub.ReflowableControl.changeBackgroundColor ( int  color)

changes background color of ReflowableControl and reload the current chapter.

Parameters
colorbackground color
void com.skytree.epub.ReflowableControl.changeElementColor ( String  colorString,
String  hash 
)

change the color of the element which has the hash

Parameters
colorStringString html/css3 color string (eg. #ffffff) String the name of hash
void com.skytree.epub.ReflowableControl.changeFont ( String  fontName,
int  fontSize 
)

changes the font name and size, and reload the current chapter.

Parameters
fontNamefont name
fontSizefont size
void com.skytree.epub.ReflowableControl.changeFont ( String  fontName,
int  fontSize,
int  lineSpace 
)

changes the font name, size and line space.

Parameters
fontNamefont name
fontSizefont size
lineSpaceline space
void com.skytree.epub.ReflowableControl.changeFontName ( String  name)

changes font name of ReflowableControl and reload the current chapter.

Parameters
namefont name name is the font name of html5/css3.
void com.skytree.epub.ReflowableControl.changeFontSize ( int  size)

changes font size of ReflowableControl and reload the current chapter.

Parameters
sizefont size size is the font size of html5/css3.
void com.skytree.epub.ReflowableControl.changeForegroundColor ( int  color)

changes foreground color of ReflowableControl and reload the current chapter.

Parameters
colorforeground color
void com.skytree.epub.ReflowableControl.changeHighlightColor ( Highlight  highlight,
int  color 
)

change the color of highlight

Parameters
highlightHighlight Object of which color should be changed
colorHighlight color to be set
void com.skytree.epub.ReflowableControl.changeHighlightNote ( Highlight  highlight,
String  note 
)

add a note to highlight

Parameters
highlightHighlight Object
notethe content of note
void com.skytree.epub.ReflowableControl.changeLineSpacing ( int  lineSpace)

changes the line spacing between lines and reload.

Parameters
lineSpaceline space between lines of text lineSpace is the line-height of html5/css3
void com.skytree.epub.ReflowableControl.clearHighlightsForSearchResults ( )

clears all Highlights for Search Results from screen

void com.skytree.epub.ReflowableControl.deleteHighlight ( Highlight  highlight)

delete the highlight

Parameters
highlightHighlight Object to delete
void com.skytree.epub.ReflowableControl.destroy ( )

destroy all objects in viewer call when leaving Activity

String com.skytree.epub.ReflowableControl.executeScript ( String  script)

execute javascript

Parameters
scriptscript to run eg) document.body.style.color="blue";
Returns
the result from script'execution
Book com.skytree.epub.ReflowableControl.getBook ( )

returns Book Object

int com.skytree.epub.ReflowableControl.getChapterIndex ( )

get the current chapter index

Returns
the current index of chapter
int com.skytree.epub.ReflowableControl.getChapterIndexByPageIndexInBook ( int  pageIndexInBook)

returns the chatperIndex by pageIndexInBook (only when globalPagination is on)

int com.skytree.epub.ReflowableControl.getChapterIndexByPagePositionInBook ( double  pagePositionInBook)

returns the chapterIndex by PagePositionInBook

String com.skytree.epub.ReflowableControl.getChapterTitle ( int  chapterIndex)

get the title text of chapter

Parameters
chapterIndexthe index of chapter that you want to get the title
Returns
the title of the chapter
String com.skytree.epub.ReflowableControl.getChapterURL ( int  chapterIndex)

returns the url of the chapter by chapterIndex

String com.skytree.epub.ReflowableControl.getCoverURL ( )

returns the url of cover

int com.skytree.epub.ReflowableControl.getEndIndexInPage ( )

get the end element index in page

Returns
the end element index in page, it is not accurate, do not use for critical purpose.
Rect com.skytree.epub.ReflowableControl.getEndRect ( Highlight  highlight)

get the end rect of highlight

Parameters
highlightHighlight Object
Returns
Rect the end coodination of highlight
NavPoints com.skytree.epub.ReflowableControl.getNavPoints ( )

gets NavPoints object which contains NapPoint list

Returns
NavPoints object
String com.skytree.epub.ReflowableControl.getNodeName ( int  x,
int  y 
)

get the name of node at x, y

Parameters
xx coordiantion.
yy coordination.
String com.skytree.epub.ReflowableControl.getNodeNameByUniqueIndex ( int  index)

get the name of node by unique index of element

Parameters
indexthe unique index for the element to see its element(node) name , eg) p, h1, h2
Returns
the text content for the element.
String com.skytree.epub.ReflowableControl.getNodeSource ( int  x,
int  y 
)

get the src of node at x, y

Parameters
xx coordiantion.
yy coordination.
String com.skytree.epub.ReflowableControl.getNodeText ( int  x,
int  y 
)

get the text of node at x, y

Parameters
xx coordiantion.
yy coordination.
String com.skytree.epub.ReflowableControl.getNodeTextByUniqueIndex ( int  index)

get the text of node by unique index of element

Parameters
indexthe unique index for the element to see its text content.
Returns
the text content for the element.
int com.skytree.epub.ReflowableControl.getNumberOfChaptersInBook ( )

get the number of chapters in book

Returns
the number of chapters in book
int com.skytree.epub.ReflowableControl.getNumberOfPagesInBook ( )

get the number of pages in book

Returns
the number of pages in book in global pagination mode
int com.skytree.epub.ReflowableControl.getNumberOfPagesInChapter ( )

get the number of pages in chapter

Returns
the number of pages in chapter
int com.skytree.epub.ReflowableControl.getNumberOfPagesInChapter ( int  chapterIndex)

return the number of pages for given chapterIndex

int com.skytree.epub.ReflowableControl.getPageIndexByPageIndexInBook ( int  pageIndexInBook)

returns the pageIndexInChapter by pageIndexInBook (only when globalPagination is on)

int com.skytree.epub.ReflowableControl.getPageIndexInBook ( )

get the current page index in gloabal pagination mode

Returns
the current page index in global pagination mode
int com.skytree.epub.ReflowableControl.getPageIndexInBookByPagePositionInBook ( double  pagePositionInBook)

returns the pageIndexInBook (only when globalPagination is on) by pagePositionInBook

int com.skytree.epub.ReflowableControl.getPageIndexInChapter ( )

get the current page index in chapter

Returns
the current page index in chapter
PageInformation com.skytree.epub.ReflowableControl.getPageInformation ( double  pagePositionInBook)

get PageInformation Object for the position in book.

Parameters
pagePositionInBookthe position in book, the value should be between 0 and 1
Returns
PageInformation Object
PageInformation com.skytree.epub.ReflowableControl.getPageInformation ( )

returns the current pageInformation

PageInformation com.skytree.epub.ReflowableControl.getPageInformationByPageIndex ( int  index)

get the PageInformation for the page index

Parameters
indexthe page index to get the PageInformation
Returns
PageInformation Object
double com.skytree.epub.ReflowableControl.getPagePositionByPageIndexInBook ( int  pageIndexInBook)

returns the pagePositionInChapter by PageIndexInBook (only when globalPagination is on)

double com.skytree.epub.ReflowableControl.getPagePositionInBookByPageIndexInBook ( int  pageIndexInBook)

returns the pagePositionInBook by PageIndexInBook (only when globalPagination is on)

Parallel com.skytree.epub.ReflowableControl.getParallelByIndex ( int  parallelIndex)

get the parallel at parallelIndx

int com.skytree.epub.ReflowableControl.getStartIndexInPage ( )

get the start element index in page

Returns
the start element index in page, it is not accurate, do not use for critical purpose.
Rect com.skytree.epub.ReflowableControl.getStartRect ( Highlight  highlight)

get the start rect of highlight

Parameters
highlightHighlight Object
Returns
Rect the start coodination of highlight
int com.skytree.epub.ReflowableControl.getVersion ( )

get the version of sdk

Returns
the version of this sdk
int com.skytree.epub.ReflowableControl.getWebViewVersion ( )

returns Android Webview Version

void com.skytree.epub.ReflowableControl.gotoLeft ( )

turns page to left

void com.skytree.epub.ReflowableControl.gotoNextChapter ( )

goto the next chapter

void com.skytree.epub.ReflowableControl.gotoNextPage ( )

moves to the next page

void com.skytree.epub.ReflowableControl.gotoNextPageInChapter ( )

goto the next page in this chapter

void com.skytree.epub.ReflowableControl.gotoPageByHighlight ( Highlight  highlight)

goes to the page by Highlight object

Parameters
highlightHighlight object
void com.skytree.epub.ReflowableControl.gotoPageByNavPoint ( NavPoint  navPoint)

goes to the page by NavPoint object

Parameters
navPointNavPoint object in NavMap
void com.skytree.epub.ReflowableControl.gotoPageByNavPointIndex ( int  index)

goes to the page by NavPoint index

Parameters
indexNavPoint index in NavMap
void com.skytree.epub.ReflowableControl.gotoPageByPagePositionInBook ( double  pagePositionInBook)

goes to the page by global position in book.

Parameters
pagePositionInBookglobal position in book.
void com.skytree.epub.ReflowableControl.gotoPageBySearchResult ( SearchResult  searchResult)

goto the page by Search Result

Parameters
searchResultSearchResult Object to go
void com.skytree.epub.ReflowableControl.gotoPageBySearchResult ( SearchResult  searchResult,
ArrayList< SearchResult searchResults 
)

goto the page by Search Result, and display all search results on screen for the same key.

Parameters
searchResultSearchResult Object to go
searchResultsArrayList of SearchResults to be shown on the screen
void com.skytree.epub.ReflowableControl.gotoPageBySearchResult ( SearchResult  searchResult,
int  color 
)

goto the page by Search Result

Parameters
searchResultSearchResult Object to go
colorthe color for the search Result
void com.skytree.epub.ReflowableControl.gotoPageBySearchResult ( SearchResult  searchResult,
ArrayList< SearchResult searchResults,
int  color 
)

goto the page by Search Result, and display all search results on screen for the same key.

Parameters
searchResultSearchResult Object to go
searchResultsArrayList of SearchResults to be shown on the screen
colorthe color for the search Result
void com.skytree.epub.ReflowableControl.gotoPageInChapter ( int  pageIndex)

goto the page of pageIndex in this chapter

void com.skytree.epub.ReflowableControl.gotoPrevChapter ( )

goto the previous chapter

void com.skytree.epub.ReflowableControl.gotoPrevPage ( )

moves to the previous page

void com.skytree.epub.ReflowableControl.gotoPrevPageInChapter ( )

goto the prev page in this chapter

void com.skytree.epub.ReflowableControl.gotoRight ( )

turns page to right

void com.skytree.epub.ReflowableControl.hidePages ( )

hide the book page

boolean com.skytree.epub.ReflowableControl.isDoublePaged ( )

tells whether book is double paged or not

boolean com.skytree.epub.ReflowableControl.isFingerTraction ( )

tells sdk is supporting finger traction or not.

Returns
tells sdk is supporting finger traction or not.
boolean com.skytree.epub.ReflowableControl.isGlobalPagination ( )

returns the view is set to Global Pagination or not.

boolean com.skytree.epub.ReflowableControl.isLicensed ( )

returns whether this sdk is licensed or not

boolean com.skytree.epub.ReflowableControl.isMediaOverlayAvailable ( )

returns MediaOverlay available

boolean com.skytree.epub.ReflowableControl.isPaging ( )

returns true while pagination is being processed

boolean com.skytree.epub.ReflowableControl.isPlayingPaused ( )

tells whether playing is paused or not.

boolean com.skytree.epub.ReflowableControl.isPlayingStarted ( )

tells whether medaiOverlay started or not.

boolean com.skytree.epub.ReflowableControl.isRTL ( )

returns whether this book is Right To Left mode or not

boolean com.skytree.epub.ReflowableControl.isScrollMode ( )

tells whether scroll mode is activated or not

boolean com.skytree.epub.ReflowableControl.isTTSEnabled ( )

tells TTS is activated or not

boolean com.skytree.epub.ReflowableControl.isVerticalWriting ( )

returns whether this book is Vertical Writing mode or not

void com.skytree.epub.ReflowableControl.keepBackgroundColor ( boolean  value)

keep background color of book or not

void com.skytree.epub.ReflowableControl.lockRotation ( )

lock the rotation of device.

PagingInformation com.skytree.epub.ReflowableControl.makePagingInformation ( int  chapterIndex)

returns the PagingInformation Object which contains information about the width, height, landscape or etc. this function can be used as key to search the paging information from the persistent storage like database

Parameters
chapterIndexthe index of chapter to get the relative PagingInformation
Returns
PagingInformation Object which contains information about the width, height, landscape or etc.
void com.skytree.epub.ReflowableControl.makeSelectionHighlight ( int  color,
String  note 
)

make selection highlight (valid only when useDOMForHighlight is true)

Parameters
colorthe color of highlight
notethe text of note
void com.skytree.epub.ReflowableControl.markHighlight ( final Highlight  highlight)

mark highlight by Highlight object

void com.skytree.epub.ReflowableControl.markParellelHighlight ( final Parallel  parallel,
final int  color 
)

mark the parallel to highlight with color

Parameters
parallel
color
void com.skytree.epub.ReflowableControl.markSelection ( int  color,
String  note 
)

marks selection highlight using color and note

Parameters
colorhighlight color
notetext memo for the hightlight
void com.skytree.epub.ReflowableControl.markSelectionHighlight ( int  color,
String  note 
)

mark selection highlight

Parameters
colorthe color of highlight
notethe text of note
int com.skytree.epub.ReflowableControl.pageCountInChapter ( )

get page count of this chapter

int com.skytree.epub.ReflowableControl.pageIndexInChapter ( )

get the current pageIndex in this chapter

int com.skytree.epub.ReflowableControl.parallelCountInChapter ( )

get the count of parallels in this chapter

void com.skytree.epub.ReflowableControl.pausePlayingParallel ( )

pause playing parallel

void com.skytree.epub.ReflowableControl.pauseSearch ( )

pauses searching

void com.skytree.epub.ReflowableControl.playFirstParallelInPage ( )

play the first Parallel in this page

void com.skytree.epub.ReflowableControl.playNextParallel ( )

play the next parallel

void com.skytree.epub.ReflowableControl.playParallel ( Parallel  parallel)

play the parallel

void com.skytree.epub.ReflowableControl.playParallelByIndex ( int  parallelIndex)

play the parallel at parallelIndx

void com.skytree.epub.ReflowableControl.playPrevParallel ( )

play the prev parallel

void com.skytree.epub.ReflowableControl.registerExternalFont ( String  fontName,
String  fontPath 
)

register external font

Parameters
fontName
fontPath
void com.skytree.epub.ReflowableControl.reload ( )

reloads the current chapter. it can be also used to repaint or redraw the screen.

void com.skytree.epub.ReflowableControl.removeParallelHighlights ( )

remove all highlights created for parallels

void com.skytree.epub.ReflowableControl.repaint ( )

make sdk to repaint the screen again.

void com.skytree.epub.ReflowableControl.repaintAll ( )

make sdk to repaint the screen again and make sdk to capture adjacent pages into memery for Curl animation.

void com.skytree.epub.ReflowableControl.restoreElementColor ( )

restore the color of element

void com.skytree.epub.ReflowableControl.resumePlayingParallel ( )

resume playing the paused parallel

void com.skytree.epub.ReflowableControl.sayText ( String  text)

let sdk to say text

Parameters
text
void com.skytree.epub.ReflowableControl.searchKey ( String  key)

searches epub for the key.

Parameters
keysearch key
void com.skytree.epub.ReflowableControl.searchMore ( )

searches the key more

void com.skytree.epub.ReflowableControl.setBackgroundColor ( int  color)

sets the background color

Parameters
colorbackground color
void com.skytree.epub.ReflowableControl.setBackgroundForLandscape ( Bitmap  backgroundForLandscape,
Rect  rectForLandscape,
Rect  contentRectForLandscape 
)

set the Background Image(Bitmap) for Landscape Orientation

Parameters
backgroundForLandscapeBitmap Object for Landscape Orientation
rectForLandscapeRect Object for the size of bitmap (eg. new Rect(0,0,2004,1506) means that the size of bitmap is 2004, 1506)
contentRectForLandscapeRect Object for the content area inside of bitmap. (eg. new Rect(32 ,0,2004-32,1506) means that the content area (left 32, right 2004-32, top 0, bottom 1506, so the width of content area is 2004-(32+32) )
void com.skytree.epub.ReflowableControl.setBackgroundForPortrait ( Bitmap  backgroundForPortrait,
Rect  rectForPortrait,
Rect  contentRectForPortrait 
)

set the Background Image(Bitmap) for Portrait Orientation

Parameters
backgroundForPortraitBitmap Object for Portrait Orientation
rectForPortraitRect Object for the size of bitmap (eg. new Rect(0,0,1002,1506) means that the size of bitmap is 1002,1506)
contentRectForPortraitRect Object for the content area inside of bitmap. (eg. new Rect(0 ,0,1002-32,1506)) means that the content area (left 0, right 0,1002-32, top 0, bottom 1506, so the width of content area is 0,1002-(0+32) )
void com.skytree.epub.ReflowableControl.setBaseDirectory ( String  baseDirectory)

sets the base directory which is root position of specific epub in file system of device.

Parameters
baseDirectorythe root directory of the epub to open.
void com.skytree.epub.ReflowableControl.setBookCode ( int  bookCode)

set the unique code for book

Parameters
bookCodethe unique code for book this code is used for many listeners.
void com.skytree.epub.ReflowableControl.setBookmarkListener ( BookmarkListener  bookmarkListener)

set the BookmarkListener

Parameters
bookmarkListenerBookmarkListener object to communicate with sdk when bookmark informations and events are needed.
void com.skytree.epub.ReflowableControl.setBookName ( String  bookName)

sets the epub file name

Parameters
bookNameepub file name like "sample01.epub"
void com.skytree.epub.ReflowableControl.setBookPath ( String  filePath)

sets the epub file path

Parameters
filePaththe file path for the epub to open.
void com.skytree.epub.ReflowableControl.setBookStyleEnabled ( boolean  enabled)

enable/disable the style sheet of epub

Parameters
enabledif not, the css of the epub will be ignored and replaced by the values which are provided skyepub sdk.
void com.skytree.epub.ReflowableControl.setClickListener ( ClickListener  clickListener)

sets the ClickListener

Parameters
clickListenerClickListener object
void com.skytree.epub.ReflowableControl.setContentListener ( ContentListener  contentListener)

sets the listener for custom reader for epub content.

Parameters
contentListenerContentListener object
void com.skytree.epub.ReflowableControl.setContentProvider ( ContentProvider  contentProvider)

set the ContentProvider to handle each content inside epub

Parameters
ContentProvidercontentProvider , default is SkyProvider
void com.skytree.epub.ReflowableControl.setContinuousCurling ( boolean  continous)

set sdk to curling continuously when the new chapter is loaded

void com.skytree.epub.ReflowableControl.setCurlQuality ( double  quality)

set the quality for the image used while curing effect.

Parameters
qualitythe value between 0 to 1 to set the image quality for Transition.Curl, if too low value is set, image quality will be very poor when curling , and if too high value is set, memory problem can be occurred for large screen tablet.
void com.skytree.epub.ReflowableControl.setCustomDrawCaret ( boolean  isCustomDraw)

enable/disable custom drawing for Caret

Parameters
isCustomDrawif true, sdk uses custom drawing routine for caret.
void com.skytree.epub.ReflowableControl.setCustomDrawHighlight ( boolean  isCustomDraw)

enable/disable custom drawing for Highlight

Parameters
isCustomDrawif true, sdk uses custom drawing routine instead of simple rectangle.
void com.skytree.epub.ReflowableControl.setDirectRead ( boolean  isDirectRead)

let sdk to read a content directly from file system

Parameters
isDirectReadif false, sdk will read a content via ContentProvider.
void com.skytree.epub.ReflowableControl.setDoublePagedForLandscape ( boolean  doublePaged)

sets the double paged mode for landscape view.

Parameters
doublePageddoublePage in landscape.
void com.skytree.epub.ReflowableControl.setDrawingHighlightOnFront ( boolean  value)

enforce to draw highlight on front of book.

Parameters
valueif true, sdk will draw highlight on the front of book content for the case that the background of epub is not transparent.
void com.skytree.epub.ReflowableControl.setExtractText ( boolean  value)

enforce the sdk to generate the text information about currentPage and entire chapter if true, sdk will generate PageInformation.pageDescription with the text of current page and passes it with onPageMoved event.

void com.skytree.epub.ReflowableControl.setFingerTractionForSlide ( boolean  isFingerTraction)

set the finger traction mode for slide effect.

Parameters
isFingerTractionto set the sdk to track finger movement for Transition.Slide
void com.skytree.epub.ReflowableControl.setFont ( String  name,
int  size 
)

sets the font name and size

Parameters
namefont name
sizefont size
void com.skytree.epub.ReflowableControl.setFontName ( String  name)

sets the font name before loading epub or chapter.

Parameters
namefont name
void com.skytree.epub.ReflowableControl.setFontSize ( int  size)

set the font size

Parameters
sizefont size
void com.skytree.epub.ReflowableControl.setFontUnit ( String  unit)

set the unit of font size

Parameters
unitdefault unit is px.
void com.skytree.epub.ReflowableControl.setForegroundColor ( int  color)

sets the foreground color

Parameters
colorforeground(text) color
void com.skytree.epub.ReflowableControl.setFullSearch ( boolean  value)

set SDK to search text with pageIndex.

Parameters
valueif true, SDK returns search result with pageIndex
void com.skytree.epub.ReflowableControl.setGlobalOffset ( boolean  value)

enable/disable Global Offset if global offset is enabled, the startIndex,endIndex will be 0 and startOffset and endOffset are set based on the first character of the chapter.

void com.skytree.epub.ReflowableControl.setGlobalPagination ( boolean  paging)

enable/disable the global pagination mode

Parameters
pagingif true, tell sdk to use Global Pagination for book instead of Local Pagination for chapter.
void com.skytree.epub.ReflowableControl.setHapticFeedback ( boolean  enabled)

allow Haptic Feedback

void com.skytree.epub.ReflowableControl.setHighlightListener ( HighlightListener  highlightListener)

sets the listener to handle highlight events.

Parameters
highlightListenerHighlightListener object
void com.skytree.epub.ReflowableControl.setHorizontalGapRatio ( double  hgr)

sets the horizontal margin on both sides

Parameters
hgrbetween 0.0 to 1.0
void com.skytree.epub.ReflowableControl.setImmersiveMode ( boolean  isImmersiveMode)

set Immersive mode to use full screen in KITKAT

Parameters
isImmersiveModeif true , set immersiveMode for KITKAT
void com.skytree.epub.ReflowableControl.setLayoutParams ( ViewGroup.LayoutParams  params)

sets LayoutParams

Parameters
paramsViewGroup.LayoutParams object
void com.skytree.epub.ReflowableControl.setLicenseKey ( String  key)

set the license key for activation.

Parameters
keythe serial key to activate the viewer
void com.skytree.epub.ReflowableControl.setLineSpacing ( int  ls)

sets the line space

Parameters
lsline space between lines.
void com.skytree.epub.ReflowableControl.setLongClickEnabled ( boolean  enabled)

enable/disable user's long click guesture to select text

Parameters
enabledif false, text selection by long click will be disabled.
void com.skytree.epub.ReflowableControl.setMaxSizeForBackground ( int  maxLength)

set the maximum length of background image

Parameters
maxLengththe maximum length of height or width of background image.
void com.skytree.epub.ReflowableControl.setMediaOverlayListener ( MediaOverlayListener  mediaOverlayListener)

set the MediaOverlayListener

Parameters
mediaOverlayListenerMediaOverlayListener object to get the information when media overlay related events occurred.
void com.skytree.epub.ReflowableControl.setNavigationAreaWidthRatio ( float  navigationAreaWidthRatio)

sets the width of both sides for moving previous or next page by touching.

Parameters
navigationAreaWidthRatiothe value between 0.0 to 1.0
void com.skytree.epub.ReflowableControl.setPageMovedListener ( PageMovedListener  pageMovedListener)

sets the listener to handle the events for page moving.

Parameters
pageMovedListenerPageMovedListener object
void com.skytree.epub.ReflowableControl.setPagesCenterImage ( Bitmap  bitmap)

sets the image for the center of two pages.

Parameters
bitmapthe bitmap for the center of two pages.
void com.skytree.epub.ReflowableControl.setPagesStackImage ( Bitmap  bitmap)

set the image for the stack of pages on both sides.

Parameters
bitmapthe bitmap for the stack of pages
void com.skytree.epub.ReflowableControl.setPageTransition ( PageTransition  pageTransition)

set the page transition type.

Parameters
pageTransition- Transition.None, Transition.Slide and Transition.Curl can be selected
void com.skytree.epub.ReflowableControl.setPagingListener ( PagingListener  pagingListener)

set the PagingListener

Parameters
pagingListenerPagingListener object to communicate when Pagination will be happened.
void com.skytree.epub.ReflowableControl.setRawTextRequired ( boolean  isRequired)

enforce the sdk to return the raw text without encrypting for some devices, when unicode is broken set this value to true.

Parameters
isRequiredif true, sdk will return raw text for selected, highlighted, searched text
void com.skytree.epub.ReflowableControl.setRotationLocked ( boolean  locked)

enable/disable the rotation of device.

Parameters
lockedif true, the rotation of device will be locked
void com.skytree.epub.ReflowableControl.setRTL ( boolean  isRTL)

enforce SDK to make reading flow RTL (Right to Left)

void com.skytree.epub.ReflowableControl.setScriptListener ( ScriptListener  scriptListener)

set the ScriptListener which is used to insert custom javascript into sdk.

Parameters
scriptListenerthe custom script Listener
void com.skytree.epub.ReflowableControl.setScrollMode ( boolean  value)

set ScrollMode enabled or not

Parameters
valueif true,scrollMode will be activated
void com.skytree.epub.ReflowableControl.setSearchListener ( SearchListener  searchListener)

sets the listener for search events.

Parameters
searchListenerSearchListener object
void com.skytree.epub.ReflowableControl.setSelectionColor ( int  selectionColor)

set the color of selection area

Parameters
selectionColorthe color for text selection area
void com.skytree.epub.ReflowableControl.setSelectionListener ( SelectionListener  selectionListener)

sets the listener to handle the events when text selected.

Parameters
selectionListenerSelectionListener object
void com.skytree.epub.ReflowableControl.setSelectorColor ( int  selectorColor)

set the color for selector

Parameters
selectorColorthe color of selector
void com.skytree.epub.ReflowableControl.setSendingEventsToAudioEnabled ( boolean  enabled)

enable/disable user interaction on audio tag

Parameters
enabledif true, user interaction such as touch,dragging is enabled.
void com.skytree.epub.ReflowableControl.setSendingEventsToIFrameEnabled ( boolean  enabled)

enable/disable user interaction on iframe

Parameters
enabledif true, user interaction such as touch,dragging is enabled.
void com.skytree.epub.ReflowableControl.setSendingEventsToVideoEnabled ( boolean  enabled)

enable/disable user interaction on video tag

Parameters
enabledif true, user interaction such as touch,dragging is enabled.
void com.skytree.epub.ReflowableControl.setSequenceBasedForMediaOverlay ( boolean  isSequenceBased)

set to play based on the Sequece of Paralles or play based on media file

void com.skytree.epub.ReflowableControl.setSigilStyleEnabled ( boolean  enabled)

enable/disable the style sheet which Sigil editor created

Parameters
enabledif not, the css of the epub by Sigil editor will be ignored.
void com.skytree.epub.ReflowableControl.setStartPosition ( double  startPositionInBook)

set the startPostionInBook when book is newly opened

void com.skytree.epub.ReflowableControl.setStartPosition ( int  chapterIndex,
String  hashLocation 
)

set the start chapterIndex and hashLocation when book is newly opened

void com.skytree.epub.ReflowableControl.setStartPosition ( NavPoint  navPoint)

set the start navPoint when book is newly opened

void com.skytree.epub.ReflowableControl.setStartPositionInBook ( float  startPositionInBook)

sets the start position in book before loading epub

Parameters
startPositionInBookglobal position in book.
void com.skytree.epub.ReflowableControl.setStartPositionInBook ( double  startPositionInBook)

set the startPostionInBook when book is newly opened

void com.skytree.epub.ReflowableControl.setStateListener ( StateListener  stateListener)

sets the listner for state change.

Parameters
stateListenerStateListener Object
void com.skytree.epub.ReflowableControl.setSystemSelectionEnabled ( boolean  value)

set Android System Selection enabled or disabled

Parameters
value
void com.skytree.epub.ReflowableControl.setTTSEnabled ( boolean  value)

set enabled/disabled of TTS

Parameters
enabled
void com.skytree.epub.ReflowableControl.setTTSLanguage ( Locale  ttsLocale)

set the Locale for Text To Speech

Parameters
ttsLocalethe locale of TTS if not set, SkyEpub SDK set this by the meta information of book automatically.
void com.skytree.epub.ReflowableControl.setTTSPitch ( float  pitch)

set the pitch of Text To Speech

Parameters
pitchthe pitch of TTS
void com.skytree.epub.ReflowableControl.setTTSSpeedRate ( float  rate)

set the speed rate of Text To Speech

Parameters
ratethe speed rate of TTS
void com.skytree.epub.ReflowableControl.setUserSelectEnabled ( boolean  enabled)

enable/disable text selection

Parameters
enabledif false, text selection will be disabled.
void com.skytree.epub.ReflowableControl.setVerticalGapRatio ( double  vgr)

sets the vertical margin on top and bottom.

Parameters
vgrbetween 0.0 to 1.0
void com.skytree.epub.ReflowableControl.setVibrationEnabled ( boolean  vi)

set the device to allow vibration

void com.skytree.epub.ReflowableControl.setVideoListener ( VideoListener  videoListener)

set the videoListener

Parameters
VideoListenervideoListener object
void com.skytree.epub.ReflowableControl.showPages ( )

show the book page

void com.skytree.epub.ReflowableControl.stopPlayingMedia ( )

stop playing video/audio

void com.skytree.epub.ReflowableControl.stopPlayingParallel ( )

stop playing parallel

void com.skytree.epub.ReflowableControl.stopSearch ( )

stops searching

void com.skytree.epub.ReflowableControl.unlockRotation ( )

unlock the rotation of device.

void com.skytree.epub.ReflowableControl.useSoftwareLayer ( )

enforce sdk to render only by software layer


The documentation for this class was generated from the following file: