In my application, I have activity to add / remove / edit entries inside SortedMap. This activity is being implemented as an extension ListActivity. I used custom ArrayAdapterfor collection items.
Each element ListView(which corresponds to the base record) consists of TextViews, EditTexts and Buttonfor deleting the record itself. The layout looks something like this:
ListView
----------------------------------------------------
[TextView] [EditText] [TextView] [EditText] [Button]
----------------------------------------------------
[TextView] [EditText] [TextView] [EditText] [Button]
My goal is to process the input that the user enters into EditTextas soon as the user finishes editing, i.e. when the user moves away EditTextor the user pressed back to close the on-screen keyboard.
I tried to implement this by processing onFocusChanged, process the text visible in EditText. However, this method does not work correctly, the method onFocusChangedis called very often and arbitrarily even for unselected and unedited EditTexts. This is probably due to this article on the Android blog of this issue qaru.site/questions/404474 / ... .
Is there a better way to do this?
source
share