Skip to content

Commit 4e92119

Browse files
sganovAndroid (Google) Code Review
authored andcommitted
Merge "Update the comment for View#clearFocus"
2 parents 80ec4ab + 13fd561 commit 4e92119

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

core/java/android/view/View.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3761,8 +3761,14 @@ public boolean requestRectangleOnScreen(Rect rectangle, boolean immediate) {
37613761
}
37623762

37633763
/**
3764-
* Called when this view wants to give up focus. This will cause
3765-
* {@link #onFocusChanged(boolean, int, android.graphics.Rect)} to be called.
3764+
* Called when this view wants to give up focus. If focus is cleared
3765+
* {@link #onFocusChanged(boolean, int, android.graphics.Rect)} is called.
3766+
* <p>
3767+
* <strong>Note:</strong> When a View clears focus the framework is trying
3768+
* to give focus to the first focusable View from the top. Hence, if this
3769+
* View is the first from the top that can take focus, then its focus will
3770+
* not be cleared nor will the focus change callback be invoked.
3771+
* </p>
37663772
*/
37673773
public void clearFocus() {
37683774
if (DBG) {

0 commit comments

Comments
 (0)