Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ytRino/3736451 to your computer and use it in GitHub Desktop.
Save ytRino/3736451 to your computer and use it in GitHub Desktop.
caseなるほど
527 /**
528 * Set the descendant focusability of this view group. This defines the relationship
529 * between this view group and its descendants when looking for a view to
530 * take focus in {@link #requestFocus(int, android.graphics.Rect)}.
531 *
532 * @param focusability one of {@link #FOCUS_BEFORE_DESCENDANTS}, {@link #FOCUS_AFTER_DESCENDANTS},
533 * {@link #FOCUS_BLOCK_DESCENDANTS}.
534 */
535 public void setDescendantFocusability(int focusability) {
536 switch (focusability) {
537 case FOCUS_BEFORE_DESCENDANTS:
538 case FOCUS_AFTER_DESCENDANTS:
539 case FOCUS_BLOCK_DESCENDANTS:
540 break;
541 default:
542 throw new IllegalArgumentException("must be one of FOCUS_BEFORE_DESCENDANTS, "
543 + "FOCUS_AFTER_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS");
544 }
545 mGroupFlags &= ~FLAG_MASK_FOCUSABILITY;
546 mGroupFlags |= (focusability & FLAG_MASK_FOCUSABILITY);
547 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment