I have a ListView with one EditText on each row (in addition to a couple of non-editable TextView\'s). When I\'m editing the text in the EditText, the soft keyboard has \"N
I have no idea about holder, so I found a way to do without it. Inside getView add onEditorActionListener.
EditText editView = (EditText)convertView;
editView.editText.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(final TextView view, int actionId, KeyEvent event){
if(actionId == EditorInfo.IME_ACTION_NEXT){
int lastPos = lv.getLastVisiblePosition();
lv.smoothScrollToPosition(position + 1);
if(position >= lastPos){
lv.postDelayed(new Runnable(){
@Override
public void run(){
final int posTop = lv.getFirstVisiblePosition();
TextView nextView = (EditText)lv.getChildAt(position - posTop + 1);
nextView.requestFocus();
}
}, 200);
}
//Delay is not required
else{
final int posTop = lv.getFirstVisiblePosition();
TextView nextView = (EditText)lv.getChildAt(position - posTop + 1);
nextView.requestFocus();
}
}
}
});