Update:
, ViewHolder, HailNaRoz. HailNaRoz , , ViewHolder View , Google Android Dev. ViewHolder Views (EditText, TextView, ImageView ..) , .
RecyclerView, , . RecyclerView , ββ gradle
. (Recycler View)
:
, EditText . TextView , , EditText.
, EditText reset getView().
TextWatcher if/else getView():
holder.editText.addTextChangedListener(new TextWatcher() {
public void onTextChanged(CharSequence s, int start,
int before, int count) {
}
public void beforeTextChanged(CharSequence s, int start,
int count, int after) {
}
public void afterTextChanged(Editable s) {
editTextList.put(position,s.toString());
}
});
HashMap, . position int getView(). .
HashMap:
private HashMap<Integer,String> editTextList =new HashMap<Integer,String>();
, TextView, EditText:
holder.text.setText(s);
holder.editText.setText(editTextList.get(position));
This should contain the current position EditTextin the correct field EditText.