Get values from a listview

0

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 I save the information. This I got; 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 visible 8, I would like see if there is any way to get the values not visible. This is the code I have and it only gets the 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());

                }
            }

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 obtain all the data that the user entered.  Any way to achieve this?

Greetings.

    
asked by Heisenberg06 15.05.2017 в 22:08
source

0 answers