Exemple #1
0
 public void setSelection(View selected) {
   if (selected != null) {
     clearSelection();
     mSelection = selected;
     promoteSelection();
     if (mStoryModeEnabled) {
       fadeOutBackground(mSelection);
     }
   }
 }
Exemple #2
0
 public void selectPrevious() {
   if (mStoryModeEnabled) {
     log("selectPrevious");
     if (hasSelection() && mOnDeck[PREV] != null) {
       placeOnDeck(mSelection, NEXT);
       mSelection = mOnDeck[PREV];
       mOnDeck[PREV] = null;
       promoteSelection();
     }
   } else {
     clearSelection();
   }
 }
Exemple #3
0
 public void selectNext() {
   if (mStoryModeEnabled) {
     log("selectNext");
     if (hasSelection() && mOnDeck[NEXT] != null) {
       placeOnDeck(mSelection, PREV);
       mSelection = mOnDeck[NEXT];
       mOnDeck[NEXT] = null;
       promoteSelection();
     }
   } else {
     clearSelection();
   }
 }
Exemple #4
0
 @Override
 public boolean onTouchEvent(MotionEvent event) {
   if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
     if (hasSelection()) {
       clearSelection();
     } else {
       if (mTapToExit && mDream != null) {
         mDream.finish();
       }
     }
     return true;
   }
   return false;
 }