Home | History | Annotate | Download | only in widget

Lines Matching refs:direction

2171      * are no selectable positions in the specified direction from the starting
2172 * position, searches in the opposite direction from the starting position
2187 // First check after the starting position in the specified direction.
2405 * @param direction either {@link View#FOCUS_UP} or {@link View#FOCUS_DOWN}
2408 boolean pageScroll(int direction) {
2412 if (direction == FOCUS_UP) {
2415 } else if (direction == FOCUS_DOWN) {
2454 * @param direction either {@link View#FOCUS_UP} or {@link View#FOCUS_DOWN}
2457 boolean fullScroll(int direction) {
2459 if (direction == FOCUS_UP) {
2469 } else if (direction == FOCUS_DOWN) {
2495 * @param direction one of {View.FOCUS_LEFT, View.FOCUS_RIGHT}
2498 private boolean handleHorizontalFocusWithinListItem(int direction) {
2499 if (direction != View.FOCUS_LEFT && direction != View.FOCUS_RIGHT) {
2500 throw new IllegalArgumentException("direction must be one of"
2512 (ViewGroup) selectedView, currentFocus, direction);
2523 if (nextFocus.requestFocus(direction, focusedRect)) {
2532 (ViewGroup) getRootView(), currentFocus, direction);
2544 * @param direction either {@link View#FOCUS_UP} or {@link View#FOCUS_DOWN}
2548 boolean arrowScroll(int direction) {
2551 final boolean handled = arrowScrollImpl(direction);
2553 playSoundEffect(SoundEffectConstants.getContantForFocusDirection(direction));
2563 * to move to. This return a position in the direction given if the selected item
2568 * @param direction Direction to move in
2569 * @return Desired selected position after moving in the given direction
2572 View selectedView, int selectedPos, int direction) {
2575 if (direction == View.FOCUS_DOWN) {
2599 return lookForSelectablePosition(nextSelected, direction == View.FOCUS_DOWN);
2606 * @param direction Either {@link android.view.View#FOCUS_UP} or {@link android.view.View#FOCUS_DOWN}.
2609 private boolean arrowScrollImpl(int direction) {
2617 int nextSelectedPosition = nextSelectedPositionForDirection(selectedView, selectedPos, direction);
2618 int amountToScroll = amountToScroll(direction, nextSelectedPosition);
2621 final ArrowScrollFocusResult focusResult = mItemsCanFocus ? arrowScrollFocused(direction) : null;
2629 handleNewSelectionChange(selectedView, direction, nextSelectedPosition, focusResult != null);
2647 scrollListItemsBy((direction == View.FOCUS_UP) ? amountToScroll : -amountToScroll);
2696 * @param direction Either {@link android.view.View#FOCUS_UP} or
2702 private void handleNewSelectionChange(View selectedView, int direction, int newSelectedPosition,
2718 if (direction == View.FOCUS_UP) {
2821 * @param direction either {@link android.view.View#FOCUS_UP} or
2825 * @return The amount to scroll. Note: this is always positive! Direction
2828 private int amountToScroll(int direction, int nextSelectedPosition) {
2834 if (direction == View.FOCUS_DOWN) {
2935 * @param direction either {@link android.view.View#FOCUS_UP} or
2940 * selectable view on screen in the given direction.
2942 private int lookForSelectablePositionOnScreen(int direction) {
2944 if (direction == View.FOCUS_DOWN) {
2991 * @param direction either {@link android.view.View#FOCUS_UP} or
2995 private ArrowScrollFocusResult arrowScrollFocused(final int direction) {
3000 newFocus = FocusFinder.getInstance().findNextFocus(this, oldFocus, direction);
3002 if (direction == View.FOCUS_DOWN) {
3022 newFocus = FocusFinder.getInstance().findNextFocusFromRect(this, mTempRect, direction);
3031 final int selectablePosition = lookForSelectablePositionOnScreen(direction);
3033 ((direction == View.FOCUS_DOWN && selectablePosition < positionOfNewFocus) ||
3034 (direction == View.FOCUS_UP && selectablePosition > positionOfNewFocus))) {
3039 int focusScroll = amountToScrollToNewFocus(direction, newFocus, positionOfNewFocus);
3044 newFocus.requestFocus(direction);
3052 newFocus.requestFocus(direction);
3090 * @param direction either {@link android.view.View#FOCUS_UP} or
3094 * @return The amount to scroll. Note: this is always positive! Direction
3097 private int amountToScrollToNewFocus(int direction, View newFocus, int positionOfNewFocus) {
3101 if (direction == View.FOCUS_UP) {
3122 * direction.
3660 protected void onFocusChanged(boolean gainFocus, int direction, Rect previouslyFocusedRect) {
3661 super.onFocusChanged(gainFocus, direction, previouslyFocusedRect);
3692 int distance = getDistance(previouslyFocusedRect, otherRect, direction);