Problem: Use EditView in the ListView to eject the keypad when the focus is given to EditView for the first time. Make EditView lose focus.
Analysis: Because the first time you use EditView to eject the keypad, the GetView method is called again. Make EditView lose focus. When you click EditView for the second time, the keypad already exists so that the GetView method is not called and therefore does not lose focus.
Idea: When you click EditView, record the position of the currently clicked view while recording the EditView cursor offset position. This record is processed at the same time as the next call to GetView.
Define two marker bits
Private int selectindex =-1; // the location of the current item Private int currentselection = 0; // Offset Amount
Then add an event with EditView focus change in GetView to record the marker bit
AdHolder.edtPrice.setOnFocusChangeListener (new Onfocuschangelistener () { @Override Public void Boolean arg1) { if(arg1==false) { = position; = ((EditText) view). Getselectionstart (); " Item Location: "+position +", focus Position: "+currentselection);}} );
Use this marker bit when redrawing the view
if (Position = = Selectindex) { adHolder.edtPrice.requestFocus (); AdHolder.edtPrice.setSelection (currentselection);}
Android ListView in EditView again focus gets