private void initBookmark() { int number = BookmarkDatabase.getInstance().getBookmarks(container.getName()).size(); final ListView bookmark = (ListView) findViewById(R.id.bookmark); String bookmarks = "Bookmarks (" + number + ")"; String[] bookmark_values = new String[] {bookmarks}; Class<?>[] classList = new Class<?>[] {BookmarksActivity.class}; this.setListViewContent(bookmark, bookmark_values, classList); }
@Override public void onBackPressed() { super.onBackPressed(); if (container != null) { ContainerHolder.getInstance().remove(container.getNativePtr()); // Close book (need to figure out if this is the best place...) EPub3.closeBook(container); } }