public void setSelection(View selected) { if (selected != null) { clearSelection(); mSelection = selected; promoteSelection(); if (mStoryModeEnabled) { fadeOutBackground(mSelection); } } }
public void selectPrevious() { if (mStoryModeEnabled) { log("selectPrevious"); if (hasSelection() && mOnDeck[PREV] != null) { placeOnDeck(mSelection, NEXT); mSelection = mOnDeck[PREV]; mOnDeck[PREV] = null; promoteSelection(); } } else { clearSelection(); } }
public void selectNext() { if (mStoryModeEnabled) { log("selectNext"); if (hasSelection() && mOnDeck[NEXT] != null) { placeOnDeck(mSelection, PREV); mSelection = mOnDeck[NEXT]; mOnDeck[NEXT] = null; promoteSelection(); } } else { clearSelection(); } }
@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; }