I have a ListView with some focusable components inside (mostly EditTexts). Yeah, I know this isn\'t exactly recommended, but in general, almost everything is w
I am sorry to tell you, I found my previous answer isn't the most perfect way to solve this problem.
So i try this :
Append a ScrollListener to your Activity, when listView start scrolling, clear current focus.
protected class MyScrollListener implements OnScrollListener {
@Override
public void onScroll(AbsListView view, int firstVisibleItem,
int visibleItemCount, int totalItemCount) {
// do nothing
}
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
if (SCROLL_STATE_TOUCH_SCROLL == scrollState) {
View currentFocus = getCurrentFocus();
if (currentFocus != null) {
currentFocus.clearFocus();
}
}
}
}