4
I would like to know how I can change data from a certain Listview position.
Here I upload from the database to Listview:
public void carregarEmails(Cliente cliente) {
ArrayList<Email> listaView = dao.pegarResultListaEmail(cliente);
listaEmail.setAdapter(new ClienteCadEmailBaseAdapter(getActivity(), listaView));
}
Code retrieving data from selected line:
private void informacaoSelecionadaEmail(View v) {
listaEmail = (ListView) v.findViewById(R.id.lstEmails);
listaEmail.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Object o = listaEmail.getItemAtPosition(position);
objEmail = (Email) o;
posicaoEmail = position;
edtEmail.setText(objEmail.getEmail());
}
});
}
Now to take the changed in Edittext and send to the line again that I have no idea how to do.
Welcome to Sopt. It would be nice to add the code of your attempts so that we can help you better =]
– Brunno
Hello, thank you very much, so I have no idea how to change, I can recover by getItemAtPosition, but to return the value changed to the position I have no idea how it does, I already researched something that could help me but I believe I’m looking for wrong
– lavaprato
So put in your current code and we’ll help you
– David Schrammel
added the bank capture and capture codes from Listview
– lavaprato