예제 #1
0
 private void setWhiteboardEnabledState(boolean state) {
   mPrefWhiteboard = state;
   MetaDB.storeWhiteboardState(this, getParentDid(), state);
   if (state && mWhiteboard == null) {
     createWhiteboard();
   }
 }
예제 #2
0
  @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
 public static String getLanguage(long did, int ord, int qa) {
   return MetaDB.getLanguage(mReviewer.get(), did, ord, qa);
 }