I'm working with a custom ListView with custom Adapter which only has EditText and TextView in each row, the problem is in scroll, when there is something in the first row, for example, it doesn't matter how long is the text in the field, if it goes out of the screen while scrolling, then if I get back to it, it looses the text it had
@Override
public View getView(int i, View view, ViewGroup viewGroup) {
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View itemView = inflater.inflate(R.layout.campos, viewGroup, false);
TextView tv= itemView.findViewById(R.id.lblNumeroCampo);
EditText txtCampo = itemView.findViewById(R.id.txtCampo);
txtCampo.setText(elementos.get(i));
tvNumero.setText("" + (i +1));
return itemView;
}
I just want not to lose text that is in any field of the list, thanks to those who want to help me.