コード例 #1
0
ファイル: Reviewer.java プロジェクト: JoseFaeti/Anki-Android
 private void setWhiteboardEnabledState(boolean state) {
   mPrefWhiteboard = state;
   MetaDB.storeWhiteboardState(this, getParentDid(), state);
   if (state && mWhiteboard == null) {
     createWhiteboard();
   }
 }
コード例 #2
0
ファイル: Reviewer.java プロジェクト: JoseFaeti/Anki-Android
  @Override
  protected void onCollectionLoaded(Collection col) {
    super.onCollectionLoaded(col);
    // Load the first card and start reviewing. Uses the answer card
    // task to load a card, but since we send null
    // as the card to answer, no card will be answered.

    mPrefWhiteboard = MetaDB.getWhiteboardState(this, getParentDid());
    if (mPrefWhiteboard) {
      setWhiteboardEnabledState(true);
      setWhiteboardVisibility(true);
    }

    col.getSched().reset(); // Reset schedule incase card had previous been loaded
    DeckTask.launchDeckTask(
        DeckTask.TASK_TYPE_ANSWER_CARD, mAnswerCardHandler, new DeckTask.TaskData(mSched, null, 0));

    disableDrawerSwipeOnConflicts();
    // Add a weak reference to current activity so that scheduler can talk to to Activity
    mSched.setContext(new WeakReference<Activity>(this));
  }
コード例 #3
0
ファイル: ReadText.java プロジェクト: algakzru/Anki-Android
 public static String getLanguage(long did, int ord, int qa) {
   return MetaDB.getLanguage(mReviewer.get(), did, ord, qa);
 }