Created
September 17, 2012 09:38
-
-
Save ytRino/3736451 to your computer and use it in GitHub Desktop.
caseなるほど
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
http://tools.oesf.biz/android-4.1.1_r1.0/xref/frameworks/base/core/java/android/view/ViewGroup.java