Codota Logo
BookCollectionShadow
Code IndexAdd Codota to your IDE (free)

How to use
BookCollectionShadow
in
com.koolearn.android.kooreader.libraryService

Best Java code snippets using com.koolearn.android.kooreader.libraryService.BookCollectionShadow (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: ydcx/KooReader

  @Override
  public void onClick(View view) {
    myCollection.bindToService(EditBookmarkActivity.this, new Runnable() {
      public void run() {
        myCollection.deleteBookmark(myBookmark);
        finish();
      }
    });
  }
});
origin: ydcx/KooReader

@Override
public void onDestroy() {
  myCollection.unbind();
  super.onDestroy();
}
origin: ydcx/KooReader

  public void run() {
    if (myAllBooksAdapter != null) {
      return;
    }
    myAllBooksAdapter = new BookmarksAdapter(allBookListView, false);
    myCollection.addListener(BookMarksFragment.this);
    updateStyles();
    loadBookmarks();
  }
});
origin: ydcx/KooReader

private synchronized void deleteRootTree() {
  if (myRootTree != null) {
    myCollection.removeListener(this);
    myCollection.unbind();
    myRootTree = null;
  }
}
origin: ydcx/KooReader

private void gotoBookmark(Bookmark bookmark) {
  bookmark.markAsAccessed();
  myCollection.saveBookmark(bookmark);
  final Book book = myCollection.getBookById(bookmark.BookId);
  if (book != null) {
    KooReader.openBookActivity(this, book, bookmark);
  } else {
    UIMessageUtil.showErrorMessage(this, "cannotOpenBook");
  }
}
origin: Jiangzqts/EpubRead

myKooReaderApp = (KooReaderApp) KooReaderApp.Instance();
if (myKooReaderApp == null) {
  myKooReaderApp = new KooReaderApp(Paths.systemInfo(this), new BookCollectionShadow());
getCollection().bindToService(this, null); // 绑定libraryService
origin: ydcx/KooReader

      public void run() {
        synchronized (myBookmarksLock) {
          for (BookmarkQuery query = new BookmarkQuery(myBook, 50); ; query = query.next()) {
            final List<Bookmark> thisBookBookmarks = myCollection.bookmarks(query);
            if (thisBookBookmarks.isEmpty()) {
              break;
            }
            myThisBookAdapter.addAll(thisBookBookmarks);
//                        myAllBooksAdapter.addAll(thisBookBookmarks);
          }
//                    for (BookmarkQuery query = new BookmarkQuery(50); ; query = query.next()) {
//                        final List<Bookmark> allBookmarks = myCollection.bookmarks(query);
//                        if (allBookmarks.isEmpty()) {
//                            break;
//                        }
//                        myAllBooksAdapter.addAll(allBookmarks);
//                    }
        }
      }
    }).start();
origin: Jiangzqts/EpubRead

  public void run() {
    setProgressBarIndeterminateVisibility(!myCollection.status().IsComplete);
    myRootTree = new RootTree(myCollection, PluginCollection.Instance(Paths.systemInfo(LibraryActivity.this)));
    myCollection.addListener(LibraryActivity.this);
    init(getIntent());
  }
});
origin: ydcx/KooReader

private void updateStyles() {
  synchronized (myStyles) {
    myStyles.clear();
    for (HighlightingStyle style : myCollection.highlightingStyles()) {
      myStyles.put(style.Id, style);
    }
  }
}
origin: Jiangzqts/EpubRead

@Override
public boolean onContextItemSelected(MenuItem item) {
  final int position = ((AdapterView.AdapterContextMenuInfo) item.getMenuInfo()).position;
  final BookmarksAdapter adapter = myThisBookAdapter;
  final Bookmark bookmark = adapter.getItem(position);
  switch (item.getItemId()) {
    case OPEN_ITEM_ID:
      gotoBookmark(bookmark);
      return true;
    case EDIT_ITEM_ID:
      final Intent intent = new Intent(this, EditBookmarkActivity.class);
      intent.putExtra("bgColor", bgValue);
      KooReaderIntents.putBookmarkExtra(intent, bookmark);
      OrientationUtil.startActivity(this, intent);
      return true;
    case DELETE_ITEM_ID:
      myCollection.deleteBookmark(bookmark);
      return true;
  }
  return super.onContextItemSelected(item);
}
origin: ydcx/KooReader

  public void run() {
    myStyle = myCollection.getHighlightingStyle(getIntent().getIntExtra(STYLE_ID_KEY, -1));
    if (myStyle == null) {
      finish();
      return;
    }
    screen.addPreference(new NamePreference());
    screen.addPreference(new InvisiblePreference());
    myBgColorPreference = new BgColorPreference();
    screen.addPreference(myBgColorPreference);
  }
});
origin: ydcx/KooReader

  public void onReceive(Context context, Intent intent) {
    if (!hasListeners()) {
      return;
    }
    try {
      final String type = intent.getStringExtra("type");
      if (KooReaderIntents.Event.LIBRARY_BOOK.equals(intent.getAction())) {
        final Book book = SerializerUtil.deserializeBook(intent.getStringExtra("book"), BookCollectionShadow.this);
        fireBookEvent(BookEvent.valueOf(type), book);
      } else {
        fireBuildEvent(Status.valueOf(type));
      }
    } catch (Exception e) {
      // ignore
    }
  }
};
origin: ydcx/KooReader

private void gotoBookmark(Bookmark bookmark) {
  bookmark.markAsAccessed();
  myCollection.saveBookmark(bookmark);
  final Book book = myCollection.getBookById(bookmark.BookId);
  if (book != null) {
    KooReader.openBookActivity(this, book, bookmark);
  } else {
    UIMessageUtil.showErrorMessage(this, "cannotOpenBook");
  }
}
origin: Jiangzqts/EpubRead

private synchronized void deleteRootTree() {
  if (myRootTree != null) {
    myCollection.removeListener(this);
    myCollection.unbind();
    myRootTree = null;
  }
}
origin: ydcx/KooReader

myKooReaderApp = (KooReaderApp) KooReaderApp.Instance();
if (myKooReaderApp == null) {
  myKooReaderApp = new KooReaderApp(Paths.systemInfo(this), new BookCollectionShadow());
getCollection().bindToService(this, null); // 绑定libraryService
origin: Jiangzqts/EpubRead

      public void run() {
        synchronized (myBookmarksLock) {
          for (BookmarkQuery query = new BookmarkQuery(myBook, 50); ; query = query.next()) {
            final List<Bookmark> thisBookBookmarks = myCollection.bookmarks(query);
            if (thisBookBookmarks.isEmpty()) {
              break;
            }
            myThisBookAdapter.addAll(thisBookBookmarks);
//                        myAllBooksAdapter.addAll(thisBookBookmarks);
          }
//                    for (BookmarkQuery query = new BookmarkQuery(50); ; query = query.next()) {
//                        final List<Bookmark> allBookmarks = myCollection.bookmarks(query);
//                        if (allBookmarks.isEmpty()) {
//                            break;
//                        }
//                        myAllBooksAdapter.addAll(allBookmarks);
//                    }
        }
      }
    }).start();
origin: ydcx/KooReader

  public void run() {
    setProgressBarIndeterminateVisibility(!myCollection.status().IsComplete);
    myRootTree = new RootTree(myCollection, PluginCollection.Instance(Paths.systemInfo(LibraryActivity.this)));
    myCollection.addListener(LibraryActivity.this);
    init(getIntent());
  }
});
origin: Jiangzqts/EpubRead

private void updateStyles() {
  synchronized (myStyles) {
    myStyles.clear();
    for (HighlightingStyle style : myCollection.highlightingStyles()) {
      myStyles.put(style.Id, style);
    }
  }
}
origin: ydcx/KooReader

@Override
public boolean onContextItemSelected(MenuItem item) {
  final int position = ((AdapterView.AdapterContextMenuInfo) item.getMenuInfo()).position;
  final String tag = myTabHost.getCurrentTabTag();
  final BookmarksAdapter adapter;
  if ("thisBook".equals(tag)) {
    adapter = myThisBookAdapter;
  } else if ("allBooks".equals(tag)) {
    adapter = myAllBooksAdapter;
  } else if ("search".equals(tag)) {
    adapter = mySearchResultsAdapter;
  } else {
    throw new RuntimeException("Unknown tab tag: " + tag);
  }
  final Bookmark bookmark = adapter.getItem(position);
  switch (item.getItemId()) {
    case OPEN_ITEM_ID:
      gotoBookmark(bookmark);
      return true;
    case EDIT_ITEM_ID:
      final Intent intent = new Intent(this, EditBookmarkActivity.class);
      KooReaderIntents.putBookmarkExtra(intent, bookmark);
      OrientationUtil.startActivity(this, intent);
      return true;
    case DELETE_ITEM_ID:
      myCollection.deleteBookmark(bookmark);
      return true;
  }
  return super.onContextItemSelected(item);
}
origin: Jiangzqts/EpubRead

  public void run() {
    myStyle = myCollection.getHighlightingStyle(getIntent().getIntExtra(STYLE_ID_KEY, -1));
    if (myStyle == null) {
      finish();
      return;
    }
    screen.addPreference(new NamePreference());
    screen.addPreference(new InvisiblePreference());
    myBgColorPreference = new BgColorPreference();
    screen.addPreference(myBgColorPreference);
  }
});
com.koolearn.android.kooreader.libraryServiceBookCollectionShadow

Most used methods

  • bindToService
  • unbind
  • <init>
  • addListener
  • bookmarks
  • deleteBookmark
  • getBookById
  • getHighlightingStyle
  • hasListeners
  • highlightingStyles
  • listCall
  • removeListener
  • listCall,
  • removeListener,
  • saveBookmark,
  • saveHighlightingStyle,
  • setDefaultHighlightingStyleId,
  • status,
  • addToRecentlyOpened,
  • getBookByFile,
  • recentlyOpenedBooks,
  • saveBook

Popular in Java

  • Reading from database using SQL prepared statement
  • putExtra (Intent)
  • onCreateOptionsMenu (Activity)
  • getContentResolver (Context)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Kernel (java.awt.image)
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Set (java.util)
    A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Runner (org.openjdk.jmh.runner)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now