You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to set a listener for onFocusChange or onTextChanged on an EditText via Anvil does not work properly. Each time the listener gets called the EditText loses focus, even with an empty handler body.
This has been isolated to an Anvil issue, as my workaround to manually set the listener via Anvil.currentView<EditText>().onFocusChangeListener = MyChangeListener() works fine.
This is reproducible on multiple versions of Android on both physical and virtual devices.
The text was updated successfully, but these errors were encountered:
I detected the same issue. My workaround is to set it on the init method: init(() -> { Anvil.currentView().setOnFocusChangeListener((v, focus) -> { //my logic here }); });
With the onTextChanged I haven't found a passable solution yet. All the solution that come to my mind add to much boilerplate to the code.
Anvil version:
0.4.0
Trying to set a listener for
onFocusChange
oronTextChanged
on anEditText
via Anvil does not work properly. Each time the listener gets called theEditText
loses focus, even with an empty handler body.This has been isolated to an Anvil issue, as my workaround to manually set the listener via
Anvil.currentView<EditText>().onFocusChangeListener = MyChangeListener()
works fine.This is reproducible on multiple versions of Android on both physical and virtual devices.
The text was updated successfully, but these errors were encountered: