I need to make a ListView that contains for each element a EditText . If EditText receives focus, I need to display a dialog - this condition is strictly for when EditText receives focus, and not when pressed, because it can be selected even if it is not pressed ...
To do this, I use the focus listener on EditText , but onFocusChanged gets three times instead of three times instead of clicking the EditText button, this means that the dialog is called twice ...
This is the sequence of calls:
- Has focus
- Lost focus
- Has focus
I have no other special handling of ListView or EditText .. so it must be out of the system in some way, maybe because I use EditText in ListView, which is a focused View too ..
Does anyone have any idea why this is happening and how I can βfixβ it?
Thanks in advance.
source share