As the link you posted says,
Interface definition for a callback to be invoked when the focus state of a view changed.
and if you read what the params
mean
Parameters
v The view whose state has changed.
hasFocus The new focus state of v.
So if you set this on a EditText
, or multiple EditText
s, you can use the v
param to know which View
s focus has changed. And you can use hasFocus
to determine if it did just gain focus (returns true
) or if it has just lost focus because it was given to someone else (returns false
).
So, maybe you want to start some animation
on a View
when focus is changed on it or another View
, you set this listener and when it is invoked you can start the animation
if hasFocus
returns true
.
If you are still confused then please explain what you don't understand about it.
As for the docs not giving much information, they assume that when reading this you have adequate information of what listeners
and methods do and about how to use parameters
that it takes and returns. The docs also expect a certain knowledge of Java. So for your other question, I know if I don't understand something because I don't think the Android docs have covered it thoroughly, then I would check the Java docs.