public static interface View.OnFocusChangeListener

android.view.View.OnFocusChangeListener



Interface definition for a callback to be invoked when the focus state of a view changed.

Summary

Public methods

abstract void onFocusChange(View v, boolean hasFocus)

Called when the focus state of a view has changed.

Public methods

onFocusChange

public abstract void onFocusChange (View v, 
                boolean hasFocus)

Called when the focus state of a view has changed.

Parameters
v View: The view whose state has changed.
hasFocus boolean: The new focus state of v.

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2025-02-10 UTC.