switch (mNavigationMode) { case ActionBar.NAVIGATION_MODE_TABS: mTabs.getView().addFocusables(views, direction, focusableMode); break; mSpinner.getView().addFocusables(views, direction, focusableMode); break; getCustomView().addFocusables(views, direction, focusableMode);
ItemInfo ii = infoForChild(child); if (ii != null && ii.position == mCurItem) { child.addFocusables(views, direction, focusableMode);
ItemInfo ii = infoForChild(child); if (ii != null && ii.position == mCurItem) { child.addFocusables(views, direction, focusableMode);
ItemInfo ii = infoForChild(child); if (ii != null && ii.position == mCurItem) { child.addFocusables(views, direction, focusableMode);
@Override public void addFocusables(ArrayList<View> views, int direction, int focusableMode) { int selectedIndex = mHighlighted - getFirstVisiblePosition(); if (!hasFocus() && selectedIndex >= 0 && selectedIndex < getChildCount() && direction == FOCUS_LEFT) { // This will force focus on the highlighted item. setSelection(mHighlighted); getChildAt(selectedIndex).addFocusables(views, direction, focusableMode); } else { super.addFocusables(views, direction, focusableMode); } }
ItemInfo ii = infoForChild(child); if (ii != null && ii.position == mCurItem) { child.addFocusables(views, direction, focusableMode);
@Override public void addFocusables(ArrayList<View> views, int direction, int focusableMode) { // XXX-RTL: This will be fixed in a future CL if (mCurrentPage >= 0 && mCurrentPage < getPageCount()) { getPageAt(mCurrentPage).addFocusables(views, direction, focusableMode); } if (direction == View.FOCUS_LEFT) { if (mCurrentPage > 0) { getPageAt(mCurrentPage - 1).addFocusables(views, direction, focusableMode); } } else if (direction == View.FOCUS_RIGHT){ if (mCurrentPage < getPageCount() - 1) { getPageAt(mCurrentPage + 1).addFocusables(views, direction, focusableMode); } } }
@Override public void addFocusables(ArrayList<View> views, int direction, int focusableMode) { View topView = AbstractFloatingView.getTopOpenView(mLauncher); if (topView != null) { topView.addFocusables(views, direction); } else { super.addFocusables(views, direction, focusableMode); } }
@Override public void addFocusables(ArrayList<View> views, int direction, int focusableMode) { View topView = mLauncher.getTopFloatingView(); if (topView != null) { topView.addFocusables(views, direction); } else { super.addFocusables(views, direction, focusableMode); } }
@Override public void addFocusables(ArrayList<View> views, int direction, int focusableMode) { View topView = mLauncher.getTopFloatingView(); if (topView != null) { topView.addFocusables(views, direction); } else { super.addFocusables(views, direction, focusableMode); } }
@Override public void addFocusables(ArrayList<View> views, int direction, int focusableMode) { // XXX-RTL: This will be fixed in a future CL if (mCurrentPage >= 0 && mCurrentPage < getPageCount()) { getPageAt(mCurrentPage).addFocusables(views, direction, focusableMode); } if (direction == View.FOCUS_LEFT) { if (mCurrentPage > 0) { getPageAt(mCurrentPage - 1).addFocusables(views, direction, focusableMode); } } else if (direction == View.FOCUS_RIGHT){ if (mCurrentPage < getPageCount() - 1) { getPageAt(mCurrentPage + 1).addFocusables(views, direction, focusableMode); } } }
@Override public void addFocusables(ArrayList<View> views, int direction, int focusableMode) { // XXX-RTL: This will be fixed in a future CL if (mCurrentPage >= 0 && mCurrentPage < getPageCount()) { getPageAt(mCurrentPage).addFocusables(views, direction, focusableMode); } if (direction == View.FOCUS_LEFT) { if (mCurrentPage > 0) { getPageAt(mCurrentPage - 1).addFocusables(views, direction, focusableMode); } } else if (direction == View.FOCUS_RIGHT){ if (mCurrentPage < getPageCount() - 1) { getPageAt(mCurrentPage + 1).addFocusables(views, direction, focusableMode); } } }
@Override public void addFocusables(ArrayList<View> views, int direction, int focusableMode) { // XXX-RTL: This will be fixed in a future CL if (mCurrentPage >= 0 && mCurrentPage < getPageCount()) { getPageAt(mCurrentPage).addFocusables(views, direction, focusableMode); } if (direction == View.FOCUS_LEFT) { if (mCurrentPage > 0) { getPageAt(mCurrentPage - 1).addFocusables(views, direction, focusableMode); } } else if (direction == View.FOCUS_RIGHT){ if (mCurrentPage < getPageCount() - 1) { getPageAt(mCurrentPage + 1).addFocusables(views, direction, focusableMode); } } }
@Override public void addFocusables(ArrayList<View> views, int direction, int focusableMode) { if (getDescendantFocusability() == FOCUS_BLOCK_DESCENDANTS) { return; } // XXX-RTL: This will be fixed in a future CL if (mCurrentPage >= 0 && mCurrentPage < getPageCount()) { getPageAt(mCurrentPage).addFocusables(views, direction, focusableMode); } if (direction == View.FOCUS_LEFT) { if (mCurrentPage > 0) { getPageAt(mCurrentPage - 1).addFocusables(views, direction, focusableMode); } } else if (direction == View.FOCUS_RIGHT){ if (mCurrentPage < getPageCount() - 1) { getPageAt(mCurrentPage + 1).addFocusables(views, direction, focusableMode); } } }
ItemInfo ii = infoForChild(child); if (ii != null && ii.position == mCurItem) { child.addFocusables(views, direction, focusableMode);
ItemInfo ii = infoForChild(child); if (ii != null && ii.position == mCurItem) { child.addFocusables(views, direction, focusableMode);
ItemInfo ii = infoForChild(child); if (ii != null && ii.position == mCurItem) { child.addFocusables(views, direction, focusableMode);
ItemInfo ii = infoForChild(child); if (ii != null && ii.position == mCurItem) { child.addFocusables(views, direction, focusableMode);
@Override public boolean onAddFocusables(RecyclerView recyclerView, ArrayList<View> views, int direction, int focusableMode) { final int currentPosition = getCurrentPosition(); final View currentView = findViewByPosition(currentPosition); if (currentView == null) return true; if (recyclerView.hasFocus()) { final int movement = getMovement(direction); if (movement != DIRECTION_NO_WHERE) { final int targetPosition = movement == DIRECTION_BACKWARD ? currentPosition - 1 : currentPosition + 1; recyclerView.smoothScrollToPosition(targetPosition); } } else { currentView.addFocusables(views, direction, focusableMode); } return true; }
@Override public boolean onAddFocusables(RecyclerView recyclerView, ArrayList<View> views, int direction, int focusableMode) { final int currentPosition = getCurrentPosition(); final View currentView = findViewByPosition(currentPosition); if (currentView == null) return true; if (recyclerView.hasFocus()) { final int movement = getMovement(direction); if (movement != DIRECTION_NO_WHERE) { final int targetPosition = movement == DIRECTION_BACKWARD ? currentPosition - 1 : currentPosition + 1; recyclerView.smoothScrollToPosition(targetPosition); } } else { currentView.addFocusables(views, direction, focusableMode); } return true; }