I'm trying to get the values of a listview that has an edittext for the user to place the values, and I get them when saving the information. I got it; The problem is that I use listview.getchildat (i) and I can only get the children that are visible on the screen, but sometimes they are more than 50 children and I can not get more than the 8 visible, I would like to see if there is any way to get Values not visible. This is the code I have and I get only visible children:
for (i = 0; i < feedList.size(); i++) {
View v = lv.getChildAt(i);
System.out.println("Posicion i: " + i);
TextView cobro = null;
try {
cobro = (TextView) v.findViewById(R.id.col_cobro);
System.out.println("CobroValidador: " + cobro.getText().toString());
sumaValidaCobro += Convert(cobro.getText().toString());
tstSuma += Convert(cobro.getText().toString());
} catch (Exception ex) {
validaCobrado++;
System.out.println("Valida cobrado: " + validaCobrado);
// tstSuma += Convert(cobro.getText().toString());
}
}
I'm using a listview with 4 col, this is the adapter.
SimpleAdapter simpleAdapter = new SimpleAdapter(this, feedList, R.layout.view_item, new String[]{"doc", "emp", "original", "saldo", "cobro"}, new int[]{R.id.col_doc_id, R.id.col_emp, R.id.col_original, R.id.col_saldo, R.id.col_cobro});
lv.setAdapter(simpleAdapter);
I need to get the new values of the last col, it's an EditText
FeedList is the initial adapter with which the listview is loaded, but the user can enter the values manually in the listview. When I save I can not use the original, I need to get all the data that the user entered. Any way to achieve this?
Greetings.