I\'ve got a few EditText fields in a ListView. When I tap on one of the EditText fields, the keyboard slides into view (as it should), but the EditText field I tapped loses
For those who come here with Xamarin or Xamarin.Forms:
I had the same issue as well but only with Android 5.x - all newer Versions including 8.1 worked well.
Obviously sheltond was right by saying:
In my case, this is happening because when the ListView resizes, it re-creates all of the list items (i.e. it calls getView() again for each visible list item).
My listview was resizing as well and no, Franks solution to set windowSoftInputMode="adjustPan" was no option for me because that means that the keyboard moves the listview partly off the screen.
All I had to do after hours of focus-debugging was setting the cell caching strategy of the Xamarin Forms ListView:
From
CachingStrategy="RecycleElement"
To
CachingStrategy="RetainElement"
This will stop the cells from being recreated. However, this might result in bad performance and high memory consumption for huge lists. Be aware.