I have a layout with a ListView that contains EditText objects that can requestFocus() when the user chooses to edit the list item. I make sure to call setSelection() on the ListView when this happens, and then have the EditText request focus and then use InputMethodManager.showSoftInput to show the soft keyboard. However, when this happens, the list view is being resized correctly, but the selected list item remains below the fold and the user has to scroll up. This is working properly on 2.2, but is failing on 2.1. Any ideas for making sure the list selection remains visible?
I have a layout with a ListView that contains EditText objects that can requestFocus()
Share
As it turns out, I ended up recording the position I wanted on screen and then overriding onSizeChanged() on the list view. When the size changed and I had a position I wanted to scroll in to view, I called setSelection() on the list to bring it into view. Not terribly elegant, but it seems to be working.